chore: bump ts autocomplete - #2755
Conversation
|
There is an existing patch(es) for this commit SHA: Please note that the status that is posted is not in the context of this PR but rather the (latest) existing patch and that may affect some tests that may depend on the particular PR. If your tests do not rely on any PR-specific values (like base or head branch name) then your tests will report the same status. If you would like a patch to run in the context of this PR and abort the other(s), comment 'evergreen retry'. |
There was a problem hiding this comment.
Pull request overview
This PR updates TypeScript-driven autocomplete dependencies and aligns the codebase/tests with updated Node/typing expectations introduced by the newer packages.
Changes:
- Bump
@mongodb-js/mongodb-ts-autocompletefrom^0.4.0to^0.4.1across relevant packages (and lockfile). - Bump
@types/nodefrom^14.14.6to^22.15.30(and lockfile), including new transitiveundici-types. - Adjust tests/runtime code to satisfy newer typings (e.g.,
process.getuid?.(), event busonce()usage, and readonlyprocess.version).
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shell-api/src/integration.spec.ts | Adjusts event-listener wiring to accommodate updated typings around once(). |
| packages/shell-api/package.json | Bumps @mongodb-js/mongodb-ts-autocomplete to ^0.4.1. |
| packages/e2e-tests/test/e2e.spec.ts | Updates root-detection logic to handle optional process.getuid/geteuid typings. |
| packages/e2e-tests/package.json | Bumps @types/node to ^22.15.30. |
| packages/cli-repl/src/mongosh-repl.ts | Reworks interrupt waiting logic to avoid typing issues around events.once(). |
| packages/cli-repl/src/crypt-library-paths.ts | Updates UID/GID access to use optional chaining for newer Node typings. |
| packages/cli-repl/src/cli-repl.spec.ts | Adds TS/ESLint suppressions for readonly process.version mutations in tests. |
| packages/cli-repl/package.json | Bumps @types/node to ^22.15.30. |
| packages/browser-runtime-core/package.json | Bumps @mongodb-js/mongodb-ts-autocomplete to ^0.4.1. |
| packages/autocomplete/package.json | Bumps @mongodb-js/mongodb-ts-autocomplete to ^0.4.1. |
| package.json | Bumps root @types/node to ^22.15.30. |
| package-lock.json | Locks updated versions for autocomplete packages, @types/node, and transitive dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) { | ||
| return { | ||
| libraryStat: { uid: stat.uid, gid: stat.gid, mode: stat.mode }, | ||
| mongoshStat: { uid: execPathStat.uid, gid: stat.gid }, |
| new Promise<void>((resolve) => | ||
| this.bus.once('mongosh:eval-interrupted', resolve) | ||
| ), | ||
| new Promise(setImmediate), |
| it('emits an event when a deprecated method is called', async function () { | ||
| const deprecatedCall = once(instanceState.messageBus, 'mongosh:api-call'); | ||
| const deprecatedCall = once( | ||
| instanceState.messageBus as any, |
| delete (process as any).version; | ||
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
| // @ts-ignore version is readonly | ||
| process.version = 'v8.0.0'; |
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
| // @ts-ignore version is readonly | ||
| process.version = `v${process.versions.node}`; |
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
| // @ts-ignore version is readonly | ||
| process.version = '18.20.0'; |
Some types changed here which might affect autocomplete so I'm just bumping it now rather than someone else dealing with it later.