Skip to content

feat(NODE-5415)!: bump minimum Node.js version to v16.20.1 #3760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2023
Merged
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
1 change: 0 additions & 1 deletion .evergreen/ci_matrix_constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const MONGODB_VERSIONS = ['latest', 'rapid', '7.0', '6.0', '5.0', '4.4', '4.2', '4.0', '3.6'];
const versions = [
{ codeName: 'fermium', versionNumber: 14 },
{ codeName: 'gallium', versionNumber: 16 },
{ codeName: 'hydrogen', versionNumber: 18 },
{ codeName: 'iron', versionNumber: 20 }
Expand Down
89 changes: 18 additions & 71 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2584,23 +2584,23 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: run unit tests
- name: run-lint-checks
tags:
- run-lint-checks
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: run lint checks
- name: check-types-typescript-next
tags:
- check-types-typescript-next
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: check types
vars:
TS_VERSION: next
Expand All @@ -2610,7 +2610,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: compile driver
vars:
TS_VERSION: current
Expand All @@ -2620,7 +2620,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: check types
vars:
TS_VERSION: current
Expand All @@ -2630,7 +2630,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: check types
vars:
TS_VERSION: 4.1.6
Expand Down Expand Up @@ -2660,7 +2660,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: bootstrap mongo-orchestration
vars:
VERSION: '5.0'
Expand All @@ -2675,7 +2675,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: bootstrap mongo-orchestration
vars:
VERSION: '5.0'
Expand All @@ -2690,7 +2690,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: bootstrap mongo-orchestration
vars:
VERSION: rapid
Expand All @@ -2705,7 +2705,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: bootstrap mongo-orchestration
vars:
VERSION: rapid
Expand All @@ -2720,7 +2720,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
Expand All @@ -2735,7 +2735,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
Expand Down Expand Up @@ -3500,59 +3500,6 @@ buildvariants:
run_on: rhel90-dbx-perf-large
tasks:
- run-spec-benchmark-tests-node-18-server-6.0
- name: rhel80-large-fermium
display_name: rhel8 Node14
run_on: rhel80-large
expansions:
NODE_LTS_VERSION: 14
CLIENT_ENCRYPTION: true
tasks:
- test-latest-server
- test-latest-replica_set
- test-latest-sharded_cluster
- test-rapid-server
- test-rapid-replica_set
- test-rapid-sharded_cluster
- test-7.0-server
- test-7.0-replica_set
- test-7.0-sharded_cluster
- test-6.0-server
- test-6.0-replica_set
- test-6.0-sharded_cluster
- test-5.0-server
- test-5.0-replica_set
- test-5.0-sharded_cluster
- test-4.4-server
- test-4.4-replica_set
- test-4.4-sharded_cluster
- test-4.2-server
- test-4.2-replica_set
- test-4.2-sharded_cluster
- test-4.0-server
- test-4.0-replica_set
- test-4.0-sharded_cluster
- test-3.6-server
- test-3.6-replica_set
- test-3.6-sharded_cluster
- test-latest-server-v1-api
- test-atlas-connectivity
- test-atlas-data-lake
- test-5.0-load-balanced
- test-6.0-load-balanced
- test-latest-load-balanced
- test-auth-kerberos
- test-auth-ldap
- test-auth-oidc
- test-socks5
- test-socks5-csfle
- test-socks5-tls
- test-zstd-compression
- test-snappy-compression
- test-tls-support-latest
- test-tls-support-6.0
- test-tls-support-5.0
- test-tls-support-4.4
- test-tls-support-4.2
- name: rhel80-large-gallium
display_name: rhel8 Node16
run_on: rhel80-large
Expand Down Expand Up @@ -3883,13 +3830,13 @@ buildvariants:
- test-tls-support-5.0
- test-tls-support-4.4
- test-tls-support-4.2
- name: rhel8-node14-test-csfle-mongocryptd
display_name: rhel 8 Node14 test mongocryptd
- name: rhel8-node16-test-csfle-mongocryptd
display_name: rhel 8 Node16 test mongocryptd
run_on: rhel80-large
expansions:
CLIENT_ENCRYPTION: true
RUN_WITH_MONGOCRYPTD: true
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
tasks:
- test-latest-csfle-mongocryptd
- test-rapid-csfle-mongocryptd
Expand All @@ -3904,7 +3851,7 @@ buildvariants:
expansions:
CLIENT_ENCRYPTION: true
RUN_WITH_MONGOCRYPTD: true
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
tasks:
- test-latest-csfle-mongocryptd
- test-rapid-csfle-mongocryptd
Expand Down Expand Up @@ -3952,7 +3899,7 @@ buildvariants:
display_name: MONGODB-AWS Auth test
run_on: ubuntu1804-large
expansions:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
tasks:
- aws-latest-auth-test-run-aws-auth-test-with-regular-aws-credentials
- aws-latest-auth-test-run-aws-auth-test-with-assume-role-credentials
Expand Down Expand Up @@ -4044,7 +3991,7 @@ buildvariants:
display_name: Serverless Test
run_on: rhel80-large
expansions:
NODE_LTS_VERSION: 14
NODE_LTS_VERSION: 16
tasks:
- serverless_task_group
- name: rhel8-test-gcp-kms
Expand Down
2 changes: 0 additions & 2 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,6 @@ for (const {
});

for (const NODE_LTS_VERSION of testedNodeVersions) {
if (NODE_LTS_VERSION === 14 && os.match(/^windows/)) continue;

const nodeLTSCodeName = versions.find(({ versionNumber }) => versionNumber === NODE_LTS_VERSION).codeName;
const nodeLtsDisplayName = `Node${NODE_LTS_VERSION}`;
const name = `${osName}-${NODE_LTS_VERSION >= 20 ? nodeLtsDisplayName : nodeLTSCodeName}`;
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -o errexit # Exit the script with error if any of the commands fail

NODE_LTS_VERSION=${NODE_LTS_VERSION:-14}
NODE_LTS_VERSION=${NODE_LTS_VERSION:-16}

source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
"license": "Apache-2.0",
"engines": {
"node": ">=14.20.1"
"node": ">=16.20.1"
},
"bugs": {
"url": "https://jira.mongodb.org/projects/NODE/issues/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,24 @@ describe('Error (Integration)', function () {
message: 'message 1, message 2'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch with the file name 😅

}
]) {
it(
`constructs the message properly with an array of ${errors.length} errors`,
{ requires: { nodejs: '>=16' } },
() => {
const error = new AggregateError(errors);
const mongoError = new MongoError(error);
it(`constructs the message properly with an array of ${errors.length} errors`, () => {
const error = new AggregateError(errors);
const mongoError = new MongoError(error);

expect(mongoError.message).to.equal(message);
}
);
expect(mongoError.message).to.equal(message);
});
}

context('when the message on the AggregateError is non-empty', () => {
it(`uses the AggregateError's message`, { requires: { nodejs: '>=16' } }, () => {
it(`uses the AggregateError's message`, () => {
const error = new AggregateError([new Error('non-empty')]);
error.message = 'custom error message';
const mongoError = new MongoError(error);
expect(mongoError.message).to.equal('custom error message');
});
});

it('sets the AggregateError to the cause property', { requires: { nodejs: '>=16' } }, () => {
it('sets the AggregateError to the cause property', () => {
const error = new AggregateError([new Error('error 1')]);
const mongoError = new MongoError(error);
expect(mongoError.cause).to.equal(error);
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"checkJs": false,
"strict": true,
"alwaysStrict": true,
"target": "ES2020",
"target": "ES2021",
"module": "commonJS",
"moduleResolution": "node",
"skipLibCheck": true,
"lib": [
"es2020"
"es2021"
],
// We don't make use of tslib helpers, all syntax used is supported by target engine
"importHelpers": false,
Expand Down