chore: bump autocomplete, @types/node - #2492
Merged
Merged
Conversation
lerouxb
commented
Jun 30, 2025
| // we wait until it finally completes (which should happen immediately) | ||
| await Promise.race([ | ||
| once(this.bus, 'mongosh:eval-interrupted'), | ||
| once(this.bus as any, 'mongosh:eval-interrupted'), |
Member
Author
There was a problem hiding this comment.
~~~~~~~~~~~~~~
src/mongosh-repl.ts:926:12 - error TS2769: No overload matches this call.
Overload 1 of 2, '(emitter: EventEmitter<DefaultEventMap>, eventName: string | symbol, options?: StaticEventEmitterOptions | undefined): Promise<...>', gave the following error.
Argument of type 'MongoshBus' is not assignable to parameter of type 'EventEmitter<DefaultEventMap>'.
Type 'MongoshBus' is missing the following properties from type 'EventEmitter<DefaultEventMap>': addListener, removeListener, off, removeAllListeners, and 8 more.
Overload 2 of 2, '(emitter: EventTarget, eventName: string, options?: StaticEventEmitterOptions | undefined): Promise<any[]>', gave the following error.
Argument of type 'MongoshBus' is not assignable to parameter of type 'EventTarget'.
Type 'MongoshBus' is missing the following properties from type 'EventTarget': addEventListener, dispatchEvent, removeEventListener
926 once(this.bus, 'mongosh:eval-interrupted'),
~~~~~~~~
Member
Author
There was a problem hiding this comment.
(I know this is not ideal, just trying to get a build so I can test if I'm making progress towards autocomplete working.)
Collaborator
There was a problem hiding this comment.
I'd just go with
Suggested change
| once(this.bus as any, 'mongosh:eval-interrupted'), | |
| new Promise<void>((resolve) => | |
| this.bus.once('mongosh:eval-interrupted', resolve) | |
| ), |
in this case, although it's a bit annoying that once() is typed this restrictively
lerouxb
commented
Jun 30, 2025
| if ( | ||
| (stat.uid !== execPathStat.uid && stat.uid !== process.getuid()) || | ||
| (stat.gid !== execPathStat.gid && stat.gid !== process.getgid()) || | ||
| (stat.uid !== execPathStat.uid && stat.uid !== process.getuid?.()) || |
Member
Author
There was a problem hiding this comment.
115 (stat.uid !== execPathStat.uid && stat.uid !== process.getuid()) ||
~~~~~~~~~~~~~~
src/crypt-library-paths.ts:115:52 - error TS18048: 'process.getuid' is possibly 'undefined'.
115 (stat.uid !== execPathStat.uid && stat.uid !== process.getuid()) ||
~~~~~~~~~~~~~~
src/crypt-library-paths.ts:116:52 - error TS2722: Cannot invoke an object which is possibly 'undefined'.
116 (stat.gid !== execPathStat.gid && stat.gid !== process.getgid()) ||
~~~~~~~~~~~~~~
src/crypt-library-paths.ts:122:27 - error TS2722: Cannot invoke an object which is possibly 'undefined'.
122 currentUser: { uid: process.getuid(), gid: process.getgid() },
~~~~~~~~~~~~~~
src/crypt-library-paths.ts:122:50 - error TS2722: Cannot invoke an object which is possibly 'undefined'.
122 currentUser: { uid: process.getuid(), gid: process.getgid() },
addaleax
approved these changes
Jun 30, 2025
addaleax
left a comment
Collaborator
There was a problem hiding this comment.
One suggestion but otherwise LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix the autocomplete debug output so it is more useful and hopefully make sure Typescript is seeing newer node types.