diff --git a/.evergreen/functions.yml b/.evergreen/functions.yml index c1f32d78bc7..c04aaf8e973 100644 --- a/.evergreen/functions.yml +++ b/.evergreen/functions.yml @@ -40,7 +40,7 @@ variables: EVERGREEN_VERSION_ID: ${version_id} EVERGREEN_WORKDIR: ${workdir} EVERGREEN_CREATED_AT: ${created_at} - NODE_JS_VERSION: '22.15.1' + NODE_JS_VERSION: '22.21.1' NPM_VERSION: '10.2.4' # secrets HADRON_METRICS_INTERCOM_APP_ID: ${metrics_intercom_app_id} diff --git a/.github/workflows/authors-and-third-party-notices.yaml b/.github/workflows/authors-and-third-party-notices.yaml index 603f84138c3..3da46af2436 100644 --- a/.github/workflows/authors-and-third-party-notices.yaml +++ b/.github/workflows/authors-and-third-party-notices.yaml @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 22.15.1 + node-version: 22.21.1 cache: 'npm' - name: Install npm@10.2.4 diff --git a/.github/workflows/bump-packages.yaml b/.github/workflows/bump-packages.yaml index 6d04ddaad75..dd2aa4d6ee1 100644 --- a/.github/workflows/bump-packages.yaml +++ b/.github/workflows/bump-packages.yaml @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 22.15.1 + node-version: 22.21.1 cache: 'npm' - name: Install npm@10.2.4 diff --git a/.github/workflows/publish-compass.yaml b/.github/workflows/publish-compass.yaml index a5d034d7f44..bf6d835b170 100644 --- a/.github/workflows/publish-compass.yaml +++ b/.github/workflows/publish-compass.yaml @@ -25,7 +25,7 @@ jobs: - name: Setup Node.js Environment uses: actions/setup-node@v4 with: - node-version: 22.15.1 + node-version: 22.21.1 cache: 'npm' - name: Install npm@10.2.4 diff --git a/.github/workflows/publish-packages.yaml b/.github/workflows/publish-packages.yaml index e7961cf3981..dc8b9ded9db 100644 --- a/.github/workflows/publish-packages.yaml +++ b/.github/workflows/publish-packages.yaml @@ -37,7 +37,7 @@ jobs: - name: 'Use Node.js' uses: actions/setup-node@v4 with: - node-version: 22.15.1 + node-version: 22.21.1 - name: Install npm@10.2.4 run: npm install -g npm@10.2.4 diff --git a/.github/workflows/start-beta.yml b/.github/workflows/start-beta.yml index b88f5a3145a..7ba4b36352a 100644 --- a/.github/workflows/start-beta.yml +++ b/.github/workflows/start-beta.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 22.15.1 + node-version: 22.21.1 cache: 'npm' - name: Install npm@10.2.4 diff --git a/.github/workflows/start-ga.yaml b/.github/workflows/start-ga.yaml index dc5d0c74cf1..cdc122104b9 100644 --- a/.github/workflows/start-ga.yaml +++ b/.github/workflows/start-ga.yaml @@ -33,7 +33,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 22.15.1 + node-version: 22.21.1 cache: 'npm' - name: Install npm@10.2.4 diff --git a/.github/workflows/test-installers.yml b/.github/workflows/test-installers.yml index b62f6576800..f265fe11194 100644 --- a/.github/workflows/test-installers.yml +++ b/.github/workflows/test-installers.yml @@ -189,7 +189,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 22.15.1 + node-version: 22.21.1 cache: 'npm' - name: Run post-checkout command diff --git a/.github/workflows/update-dependencies.yaml b/.github/workflows/update-dependencies.yaml index 9d791093f30..e72885fd9fd 100644 --- a/.github/workflows/update-dependencies.yaml +++ b/.github/workflows/update-dependencies.yaml @@ -66,7 +66,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 22.15.1 + node-version: 22.21.1 cache: 'npm' - name: Install npm@10.2.4 diff --git a/.tool-versions b/.tool-versions index fa62860b819..98c84e7ee29 100644 --- a/.tool-versions +++ b/.tool-versions @@ -3,4 +3,4 @@ # This Node.js version matches the one required in # the "engines" in the package.json. -nodejs 22.17.1 +nodejs 22.21.1 diff --git a/configs/mocha-config-compass/index.js b/configs/mocha-config-compass/index.js index 6a755d1b524..dcde079561b 100644 --- a/configs/mocha-config-compass/index.js +++ b/configs/mocha-config-compass/index.js @@ -12,4 +12,15 @@ module.exports = { path.resolve(__dirname, 'register', 'resolve-from-source-register.js'), path.resolve(__dirname, 'register', 'node-env-register.js'), ], + 'node-option': [ + // TODO(COMPASS-10162): starting with Node.js 22.15+ there is an issue + // seemingly caused by Node.js still parsing files with .ts extension even + // if experimental-strip-types option is not enabled. Explicitly disabling + // experimental-strip-types option seems to work around this, but long term + // a proper solution would be to switch our usage of ts-node (and a related + // load from source mocha register functionality) from relying on cjs module + // system to esm one (meaning we should use ts-node/esm instead of just + // ts-node register) + 'no-experimental-strip-types', + ], }; diff --git a/configs/mocha-config-compass/react.js b/configs/mocha-config-compass/react.js index e8effb04630..55d5f5d6259 100644 --- a/configs/mocha-config-compass/react.js +++ b/configs/mocha-config-compass/react.js @@ -12,4 +12,8 @@ module.exports = { path.resolve(__dirname, 'register', 'jsdom-extra-mocks-register.js'), path.resolve(__dirname, 'register', 'node-env-register.js'), ], + 'node-option': [ + // TODO(COMPASS-10162): see ./index.js + 'no-experimental-strip-types', + ], }; diff --git a/package-lock.json b/package-lock.json index 7dfa7ec7353..2dd8d58d983 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "node-gyp": "^10.2.0" }, "engines": { - "node": ">=22.15.1", + "node": ">=22.21.1", "npm": ">=10.2.4" } }, diff --git a/package.json b/package.json index c832d29992e..3b1d0eb5124 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "node-gyp": "^10.2.0" }, "engines": { - "node": ">=22.15.1", + "node": ">=22.21.1", "npm": ">=10.2.4" }, "bugs": {