Skip to content

Commit

Permalink
chore: drop node 16 from CI matrix MONGOSH-1898 (#2255)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev authored Dec 17, 2024
1 parent 2536f15 commit e8f0450
Show file tree
Hide file tree
Showing 8 changed files with 6,624 additions and 11,091 deletions.
17,642 changes: 6,609 additions & 11,033 deletions .evergreen.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .evergreen/InstallNode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Get-ChildItem -Path $PSScriptRoot
Set-Location -Path $node_dir
Remove-Item .\npm
Remove-Item .\npm.cmd
if (Test-Path .\npm.ps1) { Remove-Item .\npm.ps1 }
Remove-Item .\npx
Remove-Item .\npx.cmd
if (Test-Path .\npx.ps1) { Remove-Item .\npx.ps1 }
Move-Item .\node_modules\npm -Destination .\node_modules\npm2
.\node.exe .\node_modules\npm2\bin\npm-cli.js i -g npm@6
6 changes: 2 additions & 4 deletions .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
const path = require('path');

const NODE_JS_VERSION_20 = require('./node-20-latest.json').version;
const NODE_JS_VERSION_16 = require('./node-16-latest.json').version;

const MONGODB_VERSIONS = [
{ shortName: '42xc', versionSpec: '4.2.x' },
Expand All @@ -20,8 +19,7 @@ const MONGODB_VERSIONS = [
{ shortName: 'latest', versionSpec: 'latest-alpha-enterprise' }
];
const NODE_VERSIONS = [
{ shortName: '20', versionSpec: NODE_JS_VERSION_20, skipNodeVersionCheck: '' },
{ shortName: '16', versionSpec: NODE_JS_VERSION_16, skipNodeVersionCheck: '' }
{ shortName: '20', versionSpec: NODE_JS_VERSION_20, skipNodeVersionCheck: '' }
];

const pathToPackages = path.join(__dirname, '..', 'packages');
Expand Down Expand Up @@ -1139,7 +1137,7 @@ tasks:

###
# UNIT TESTS
# E.g. test_m60xc_n16 stands for mongod 6.0.x, community edition, Node.js 16
# E.g. test_m60xc_n20 stands for mongod 6.0.x, community edition, Node.js 20
###
<% for (const { id, packageName } of ALL_UNIT_TESTS) { %>
- name: test_<% out(id) %>
Expand Down
6 changes: 1 addition & 5 deletions .evergreen/install-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ set -e
set -x
export BASEDIR="$PWD/.evergreen"

if echo $NODE_JS_VERSION | grep -q ^16 ; then
NPM_VERSION=9.9.2 # 9.9.3 does not install well on Windows
else
NPM_VERSION=10.8.3 # 10.9.0 does not install well on Windows
fi
NPM_VERSION=10.8.3 # 10.9.0 does not install well on Windows

if [ "$OS" == "Windows_NT" ]; then
powershell "$(cygpath -w "$BASEDIR")"/InstallNode.ps1
Expand Down
43 changes: 0 additions & 43 deletions .evergreen/node-16-latest.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/cron-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: ^16.x
node-version: ^20.x
cache: "npm"

- name: Install npm@8
run: |
npm install -g npm@8
npm install -g npm@10
- name: Install Dependencies and Compile
run: |
Expand Down
5 changes: 4 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"create-purls-file": "node scripts/create-purls.js .sbom/dependencies.json .sbom/node-js-dep.json > .sbom/purls.txt",
"preupdate-third-party-notices": "npm run create-dependency-sbom-lists",
"update-third-party-notices": "mongodb-sbom-tools generate-3rd-party-notices --product='mongosh' --dependencies=.sbom/dependencies.json > THIRD_PARTY_NOTICES.md",
"update-node-js-versions": "npx @pkgjs/nv ls v20 > .evergreen/node-20-latest.json && npx @pkgjs/nv ls v16 > .evergreen/node-16-latest.json",
"update-node-js-versions": "npx @pkgjs/nv ls v20 > .evergreen/node-20-latest.json",
"update-evergreen-config": "npm run test-evergreen-expansions && node .evergreen/generate-evergreen-yml.js .evergreen/evergreen.yml.in > .evergreen.yml",
"update-cli-usage-text": "node scripts/update-cli-usage-text.js",
"update-security-test-summary": "ts-node scripts/generate-security-test-summary.ts > docs/security-test-summary.md",
Expand Down Expand Up @@ -107,7 +107,6 @@
"@types/which": "^1.3.2",
"chai": "^4.2.0",
"cross-env": "^6.0.3",
"depcheck": "^1.4.7",
"duplexpair": "^1.0.2",
"find-up": "^5.0.0",
"glob": "^10.3.12",
Expand All @@ -131,7 +130,9 @@
"webpack-bundle-analyzer": "^4.7.0",
"webpack-cli": "^4.3.1",
"which": "^2.0.2",
"yaml": "^1.10.0"
"yaml": "^1.10.0",
"depcheck": "^1.4.7",
"@pkgjs/nv": "^0.2.2"
},
"optionalDependencies": {
"lerna": "^8.1.8"
Expand Down

0 comments on commit e8f0450

Please sign in to comment.