Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,6 @@ tasks:
updates:
- { key: NODE_LTS_VERSION, value: "20.19.0" }
- func: install dependencies
vars:
NPM_VERSION: "11.11.1"
- func: switch source
vars:
SOURCE_REV: refs/tags/v7.0.0
Expand All @@ -1020,8 +1018,6 @@ tasks:
- { key: CLIENT_ENCRYPTION, value: "false" }
- { key: NODE_LTS_VERSION, value: "20.19.0" }
- func: install dependencies
vars:
NPM_VERSION: "11.11.1"
- func: bootstrap mongo-orchestration
- func: switch source
vars:
Expand All @@ -1045,8 +1041,6 @@ tasks:
- { key: CLIENT_ENCRYPTION, value: "false" }
- { key: NODE_LTS_VERSION, value: "20.19.0" }
- func: install dependencies
vars:
NPM_VERSION: "11.11.1"
- func: bootstrap mongo-orchestration
- func: switch source
vars:
Expand All @@ -1070,8 +1064,6 @@ tasks:
- { key: CLIENT_ENCRYPTION, value: "false" }
- { key: NODE_LTS_VERSION, value: "20.19.0" }
- func: install dependencies
vars:
NPM_VERSION: "11.11.1"
- func: bootstrap mongo-orchestration
- func: switch source
vars:
Expand Down
12 changes: 0 additions & 12 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,6 @@ tasks:
updates:
- {key: NODE_LTS_VERSION, value: 20.19.0}
- func: install dependencies
vars:
NPM_VERSION: 11.11.1
- func: switch source
vars:
SOURCE_REV: refs/tags/v7.0.0
Expand All @@ -943,8 +941,6 @@ tasks:
- {key: CLIENT_ENCRYPTION, value: 'false'}
- {key: NODE_LTS_VERSION, value: 20.19.0}
- func: install dependencies
vars:
NPM_VERSION: 11.11.1
- func: bootstrap mongo-orchestration
- func: switch source
vars:
Expand All @@ -967,8 +963,6 @@ tasks:
- {key: CLIENT_ENCRYPTION, value: 'false'}
- {key: NODE_LTS_VERSION, value: 20.19.0}
- func: install dependencies
vars:
NPM_VERSION: 11.11.1
- func: bootstrap mongo-orchestration
- func: switch source
vars:
Expand All @@ -991,8 +985,6 @@ tasks:
- {key: CLIENT_ENCRYPTION, value: 'false'}
- {key: NODE_LTS_VERSION, value: 20.19.0}
- func: install dependencies
vars:
NPM_VERSION: 11.11.1
- func: bootstrap mongo-orchestration
- func: switch source
vars:
Expand Down Expand Up @@ -1993,8 +1985,6 @@ tasks:
updates:
- {key: NODE_LTS_VERSION, value: '22'}
- func: install dependencies
vars:
NPM_VERSION: 11.11.1
- func: run unit tests
- name: run-unit-tests-node-24
tags:
Expand Down Expand Up @@ -3578,7 +3568,6 @@ buildvariants:
run_on: rhel80-large
expansions:
NODE_LTS_VERSION: 22
NPM_VERSION: 11.11.1
CLIENT_ENCRYPTION: 'true'
TEST_CSFLE: 'true'
tasks:
Expand Down Expand Up @@ -3787,7 +3776,6 @@ buildvariants:
run_on: windows-2022-latest-large
expansions:
NODE_LTS_VERSION: 22
NPM_VERSION: 11.11.1
CLIENT_ENCRYPTION: 'false'
TEST_CSFLE: 'false'
tasks:
Expand Down
18 changes: 1 addition & 17 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ const {
GRAVITON_OS
} = require('./ci_matrix_constants');

// TODO(NODE-7499): unpin npm version once Node 22 ships a bundled npm that can upgrade itself
const NODE22_NPM_VERSION = '11.11.1';

/** Returns the major version number from a Node.js version string (e.g. 'v22.11.0', '20.19.0', 22). */
function nodeMajorVersion(version) {
return semver.coerce(String(version))?.major;
}

const OPERATING_SYSTEMS = [
{
name: DEFAULT_OS,
Expand Down Expand Up @@ -406,12 +398,6 @@ for (const {
const expansions = { NODE_LTS_VERSION };
const taskNames = tasks.map(({ name }) => name);

// bundled npm version in node v22.22.2 (v10.9.7) can't upgrade itself to @latest,
// so we need to pin npm version for these variants to latest "upgradable" version
if (nodeMajorVersion(NODE_LTS_VERSION) === 22) {
expansions.NPM_VERSION = NODE22_NPM_VERSION;
}

expansions.CLIENT_ENCRYPTION = String(!!clientEncryption);
expansions.TEST_CSFLE = expansions.CLIENT_ENCRYPTION;

Expand Down Expand Up @@ -494,9 +480,7 @@ const unitTestTasks = Array.from(
updateExpansions({
NODE_LTS_VERSION
}),
nodeMajorVersion(NODE_LTS_VERSION) === 22
? { func: 'install dependencies', vars: { NPM_VERSION: NODE22_NPM_VERSION } }
: { func: 'install dependencies' },
{ func: 'install dependencies' },
{ func: 'run unit tests' }
]
};
Expand Down
7 changes: 4 additions & 3 deletions .evergreen/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ set -o errexit # Exit the script with error if any of the commands fail
## a full nodejs version, in the format v<major>.<minor>.patch
if [ -z ${NODE_LTS_VERSION+omitted} ]; then echo "NODE_LTS_VERSION is unset" && exit 1; fi

# npm version can be defined in the environment for cases where we need to install
# a version lower than latest to support EOL Node versions. When not provided will
# be handled by this script in drivers tools.
# Use the npm bundled with the installed Node.js release instead of upgrading to
# npm@latest. The bundled npm is version-matched to the Node release and avoids
# pulling an npm@latest that no longer supports our (often pinned) Node version.
export SKIP_NPM_UPGRADE=true
source $DRIVERS_TOOLS/.evergreen/install-node.sh

# On Windows, install-node.sh resolves SCRIPT_DIR via realpath which may follow an NTFS
Expand Down
Loading