Skip to content

Commit 6c7beae

Browse files
committed
ci(NODE-7496): pin npm to 11.11.1 for Node 20 and 22 build variants
1 parent 5d414cc commit 6c7beae

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.evergreen/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3520,6 +3520,7 @@ buildvariants:
35203520
run_on: rhel80-large
35213521
expansions:
35223522
NODE_LTS_VERSION: 20.19.0
3523+
NPM_VERSION: 11.11.1
35233524
CLIENT_ENCRYPTION: 'true'
35243525
TEST_CSFLE: 'true'
35253526
tasks:
@@ -3575,6 +3576,7 @@ buildvariants:
35753576
run_on: rhel80-large
35763577
expansions:
35773578
NODE_LTS_VERSION: 22
3579+
NPM_VERSION: 11.11.1
35783580
CLIENT_ENCRYPTION: 'true'
35793581
TEST_CSFLE: 'true'
35803582
tasks:
@@ -3738,6 +3740,7 @@ buildvariants:
37383740
run_on: windows-2022-latest-large
37393741
expansions:
37403742
NODE_LTS_VERSION: 20.19.0
3743+
NPM_VERSION: 11.11.1
37413744
CLIENT_ENCRYPTION: 'false'
37423745
TEST_CSFLE: 'false'
37433746
tasks:
@@ -3782,6 +3785,7 @@ buildvariants:
37823785
run_on: windows-2022-latest-large
37833786
expansions:
37843787
NODE_LTS_VERSION: 22
3788+
NPM_VERSION: 11.11.1
37853789
CLIENT_ENCRYPTION: 'false'
37863790
TEST_CSFLE: 'false'
37873791
tasks:

.evergreen/generate_evergreen_tasks.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,13 @@ for (const {
397397
const expansions = { NODE_LTS_VERSION };
398398
const taskNames = tasks.map(({ name }) => name);
399399

400+
// bundled npm version in node 20 (v10.8.x) and in node 22 (v10.9.x) can't upgrade to latest 11.12,
401+
// so we need to pin npm version for these variants to latest "upgradable" version
402+
const major = parseInt(NODE_LTS_VERSION, 10);
403+
if (major < 24) {
404+
expansions.NPM_VERSION = '11.11.1';
405+
}
406+
400407
expansions.CLIENT_ENCRYPTION = String(!!clientEncryption);
401408
expansions.TEST_CSFLE = expansions.CLIENT_ENCRYPTION;
402409

0 commit comments

Comments
 (0)