Commit 5694672
authored
feat: package on Node.js 24 instead of 20 MONGOSH-3062 (#2622)
* feat: package on Node.js 24 instead of 20
* chore: Update the aws-sdk to the latest 2x (unmaintained)
The depepdency to the aws-sdk 2 will be removed once we
start using the MongoDB Node.js driver 7.0.0
* chore: Use --legacy-peer-deps with npm@11 and upgrade Lerna to 9.0.3
npm@11 handles peer dependencies differently, so when bootstrapping
mongosh with Node.js 24 it breaks the package-lock.json for Node.js
20. This is an issue if we want to keep backwards compatiblity for
some time, so we have to use --legacy-peer-deps. However, lerna 8x
uses nx in a way it's incompatible with --legacy-peer-deps, which
required upgrading to 9.0.3.
* chore: Remove patches already merged upstream
* chore: Fix run-if-package-requested.js for Node.js v24
It seems a change broke it and because Node.js 24 pipelines
do not run by default it wasn't catched.
* chore: Drop support for building in macos-11
Node.js 24 drops support for macos older than 13, as
documented in:
https://github.com/nodejs/node/blob/v24.12.0/BUILDING.md#platform-list
* chore: Update windows distro to use windows-2022-large
Windows-vsCurrent-small does not have the clang module for
msbuild, so use a more modern one that does have it. This
change mimicks what we've done in boxednode to have the
Windows build working.
* chore: Force GYP to use the correct Python installation
It has to use 3.11 to avoid issues with _ctypes.
* chore: Upgrade clang in osx machines
* chore: Run tests also in Node.js 24 now
We should be able to run all the tests in Node.js 24 and detect
any outstanding issue that has to be fixed in code.
Eventually, we will want to get rid of running the tests in
Node.js 20
* chore: Update mongodb-crypt-library-version to a Node.js 24 compatible version
* chore: Upgrade Amazon2 to the latest version with an updated toolchain
* chore: Add memfd_create patch as we've done in our toolchain
* chore: Fix tests where the Node.js repl prompt uses '|'
* chore: revert unnecessary changes on distros and disable n20
* chore: Add the aws-sdk as a peer dependency
As it's necessary for the build and the driver
* chore: Add explicit dependency to aws-sdk/credential-providers
* chore: Hoist buffer in package-lock.json
With the change to npm@11, npm seems to hvae decided unhost buffer,
which makes some tests fail. Here we are forcing buffer to be
hoisted by doing:
`npm install buffer && git reset -- package.json && npm install`
In case in the future we see a similar issue, hoisting it manually
seems to solve it.
* chore: Fix issue with the change from '...' to '|' for unterminated outputs
* chore: Update devtools-connect to the latest version
* chore: Update macos-export-certificate-and-key for Node.js 24 support
* chore: Compile in vcdev env for Windows
* chore: Hoist macos-export-certificate-and-key
* chore: Update system-ca and transitive deps to Node.js 24
* chore: Force updating mongodb-client-encryption to 7.0.0
It's the first version that supports Node.js 24
* chore: Update devtools-connect and proxy support
* chore: Patch kerberos to make private fields non linkable
* chore: Support delayed-template-parsing due to clang constrains
* chore: Use latest 2022 version
* chore: Remove patch for older compilers
* chore: Do not enable ltcg by default on release builds
* chore: Try to use the inherited vcdev
* chore: Fix hoisting problem on mongodb-client-encryption
We need a few overrides because we still depend on the
6.x branch of the driver, but we need to upgrade
the client encryption to 7.x to support Node.js 24.
* fix: Update oidc-plugin to latest version
The latest version changes how we use spawn and avoids
deprecation warnings.
* chore: Allow runNpm to return the stdout on failures for specific commands
Right now npm outdated exits with a non-zero status. We have some
additional checks where, if the stderr is empty, we consider the
command to be successful. However, npm prints warnings to stderr,
so a successful command with a warning fails.
For cases where we really don't care about the status code, like
npm ls or npm outdated, we pass the lenient flag, that will tell
runNpm to ignore the exitCode and return stdout either way.
* chore: Use a smaller instance for signature verification
* fix: Fix tests related to the Node.js 24 update.
There is a bug in the Node.js REPL that we will need to fix upstream
or with a patch whenever we compile Node.js, so unless it runs on
a patched Node.js version, some tests will still fail.
* chore: Remove error handling for history loading
In Node.js 24, the REPL itself will shallow the error
and print the error itself, so we don't need to catch
the error anymore.
* chore: Monkey-patch Node.js 24 if we detect the history rewrite bug
In Node.js 24 there is a bug in the history handling where, in the
event that an input fails, and the next works fine, the failed
input is rewritten. This monkey-patch detects the issue and rewrites
the internal history handler to ignore errors, as really don't care
about them at this point.
* chore: Typing error
* chore: Fix tests that depend on Node.js 24 REPL formatting and behaviour
* chore: Fix the rest of the tests that depend on formatting
* chore: Fix dependencies with oktokit (< n24)
* chore: Fix package-lock inconsistencies after the merge with main
* chore: Remove duplicate keys
* chore: Ensure that we test on windows pre-2022
* chore: Disable RHEL10 tests
Enabling them depends on DEVPROD-27117
* fix: Drop support for macos-11 hosts
* chore: Run pkg_test_ssh on pre-2022 machines
* chore: Compile in Sequoia but target Ventura
Also, add e2e tests in Sequoia.
* chore: Use GUI variants as we have a bigger pool
* chore: Add macos-15 for distro uploadlist regex1 parent aaf5689 commit 5694672
26 files changed
Lines changed: 2303 additions & 2397 deletions
File tree
- .evergreen
- build-variants
- packages
- build/src/compile
- cli-repl/src
- e2e-tests
- test
- service-provider-node-driver
- snippet-manager/src
- scripts
- nodejs-patches
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| 324 | + | |
322 | 325 | | |
323 | 326 | | |
324 | 327 | | |
| |||
327 | 330 | | |
328 | 331 | | |
329 | 332 | | |
| 333 | + | |
330 | 334 | | |
331 | 335 | | |
332 | 336 | | |
| |||
370 | 374 | | |
371 | 375 | | |
372 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
373 | 395 | | |
374 | 396 | | |
375 | 397 | | |
| |||
391 | 413 | | |
392 | 414 | | |
393 | 415 | | |
394 | | - | |
| 416 | + | |
395 | 417 | | |
396 | 418 | | |
397 | 419 | | |
398 | 420 | | |
399 | 421 | | |
400 | | - | |
| 422 | + | |
401 | 423 | | |
402 | 424 | | |
403 | 425 | | |
| |||
409 | 431 | | |
410 | 432 | | |
411 | 433 | | |
412 | | - | |
| 434 | + | |
413 | 435 | | |
414 | 436 | | |
415 | 437 | | |
| |||
419 | 441 | | |
420 | 442 | | |
421 | 443 | | |
422 | | - | |
| 444 | + | |
423 | 445 | | |
424 | 446 | | |
425 | 447 | | |
426 | 448 | | |
427 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
428 | 467 | | |
429 | 468 | | |
430 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
0 commit comments