Skip to content

Commit de158b2

Browse files
authored
feat(NODE-5415)!: bump minimum Node.js version to v16.20.1 (#3760)
1 parent cd923c8 commit de158b2

File tree

7 files changed

+29
-89
lines changed

7 files changed

+29
-89
lines changed

.evergreen/ci_matrix_constants.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const MONGODB_VERSIONS = ['latest', 'rapid', '7.0', '6.0', '5.0', '4.4', '4.2', '4.0', '3.6'];
22
const versions = [
3-
{ codeName: 'fermium', versionNumber: 14 },
43
{ codeName: 'gallium', versionNumber: 16 },
54
{ codeName: 'hydrogen', versionNumber: 18 },
65
{ codeName: 'iron', versionNumber: 20 }

.evergreen/config.yml

+18-71
Original file line numberDiff line numberDiff line change
@@ -2584,23 +2584,23 @@ tasks:
25842584
commands:
25852585
- func: install dependencies
25862586
vars:
2587-
NODE_LTS_VERSION: 14
2587+
NODE_LTS_VERSION: 16
25882588
- func: run unit tests
25892589
- name: run-lint-checks
25902590
tags:
25912591
- run-lint-checks
25922592
commands:
25932593
- func: install dependencies
25942594
vars:
2595-
NODE_LTS_VERSION: 14
2595+
NODE_LTS_VERSION: 16
25962596
- func: run lint checks
25972597
- name: check-types-typescript-next
25982598
tags:
25992599
- check-types-typescript-next
26002600
commands:
26012601
- func: install dependencies
26022602
vars:
2603-
NODE_LTS_VERSION: 14
2603+
NODE_LTS_VERSION: 16
26042604
- func: check types
26052605
vars:
26062606
TS_VERSION: next
@@ -2610,7 +2610,7 @@ tasks:
26102610
commands:
26112611
- func: install dependencies
26122612
vars:
2613-
NODE_LTS_VERSION: 14
2613+
NODE_LTS_VERSION: 16
26142614
- func: compile driver
26152615
vars:
26162616
TS_VERSION: current
@@ -2620,7 +2620,7 @@ tasks:
26202620
commands:
26212621
- func: install dependencies
26222622
vars:
2623-
NODE_LTS_VERSION: 14
2623+
NODE_LTS_VERSION: 16
26242624
- func: check types
26252625
vars:
26262626
TS_VERSION: current
@@ -2630,7 +2630,7 @@ tasks:
26302630
commands:
26312631
- func: install dependencies
26322632
vars:
2633-
NODE_LTS_VERSION: 14
2633+
NODE_LTS_VERSION: 16
26342634
- func: check types
26352635
vars:
26362636
TS_VERSION: 4.1.6
@@ -2660,7 +2660,7 @@ tasks:
26602660
commands:
26612661
- func: install dependencies
26622662
vars:
2663-
NODE_LTS_VERSION: 14
2663+
NODE_LTS_VERSION: 16
26642664
- func: bootstrap mongo-orchestration
26652665
vars:
26662666
VERSION: '5.0'
@@ -2675,7 +2675,7 @@ tasks:
26752675
commands:
26762676
- func: install dependencies
26772677
vars:
2678-
NODE_LTS_VERSION: 14
2678+
NODE_LTS_VERSION: 16
26792679
- func: bootstrap mongo-orchestration
26802680
vars:
26812681
VERSION: '5.0'
@@ -2690,7 +2690,7 @@ tasks:
26902690
commands:
26912691
- func: install dependencies
26922692
vars:
2693-
NODE_LTS_VERSION: 14
2693+
NODE_LTS_VERSION: 16
26942694
- func: bootstrap mongo-orchestration
26952695
vars:
26962696
VERSION: rapid
@@ -2705,7 +2705,7 @@ tasks:
27052705
commands:
27062706
- func: install dependencies
27072707
vars:
2708-
NODE_LTS_VERSION: 14
2708+
NODE_LTS_VERSION: 16
27092709
- func: bootstrap mongo-orchestration
27102710
vars:
27112711
VERSION: rapid
@@ -2720,7 +2720,7 @@ tasks:
27202720
commands:
27212721
- func: install dependencies
27222722
vars:
2723-
NODE_LTS_VERSION: 14
2723+
NODE_LTS_VERSION: 16
27242724
- func: bootstrap mongo-orchestration
27252725
vars:
27262726
VERSION: latest
@@ -2735,7 +2735,7 @@ tasks:
27352735
commands:
27362736
- func: install dependencies
27372737
vars:
2738-
NODE_LTS_VERSION: 14
2738+
NODE_LTS_VERSION: 16
27392739
- func: bootstrap mongo-orchestration
27402740
vars:
27412741
VERSION: latest
@@ -3500,59 +3500,6 @@ buildvariants:
35003500
run_on: rhel90-dbx-perf-large
35013501
tasks:
35023502
- run-spec-benchmark-tests-node-18-server-6.0
3503-
- name: rhel80-large-fermium
3504-
display_name: rhel8 Node14
3505-
run_on: rhel80-large
3506-
expansions:
3507-
NODE_LTS_VERSION: 14
3508-
CLIENT_ENCRYPTION: true
3509-
tasks:
3510-
- test-latest-server
3511-
- test-latest-replica_set
3512-
- test-latest-sharded_cluster
3513-
- test-rapid-server
3514-
- test-rapid-replica_set
3515-
- test-rapid-sharded_cluster
3516-
- test-7.0-server
3517-
- test-7.0-replica_set
3518-
- test-7.0-sharded_cluster
3519-
- test-6.0-server
3520-
- test-6.0-replica_set
3521-
- test-6.0-sharded_cluster
3522-
- test-5.0-server
3523-
- test-5.0-replica_set
3524-
- test-5.0-sharded_cluster
3525-
- test-4.4-server
3526-
- test-4.4-replica_set
3527-
- test-4.4-sharded_cluster
3528-
- test-4.2-server
3529-
- test-4.2-replica_set
3530-
- test-4.2-sharded_cluster
3531-
- test-4.0-server
3532-
- test-4.0-replica_set
3533-
- test-4.0-sharded_cluster
3534-
- test-3.6-server
3535-
- test-3.6-replica_set
3536-
- test-3.6-sharded_cluster
3537-
- test-latest-server-v1-api
3538-
- test-atlas-connectivity
3539-
- test-atlas-data-lake
3540-
- test-5.0-load-balanced
3541-
- test-6.0-load-balanced
3542-
- test-latest-load-balanced
3543-
- test-auth-kerberos
3544-
- test-auth-ldap
3545-
- test-auth-oidc
3546-
- test-socks5
3547-
- test-socks5-csfle
3548-
- test-socks5-tls
3549-
- test-zstd-compression
3550-
- test-snappy-compression
3551-
- test-tls-support-latest
3552-
- test-tls-support-6.0
3553-
- test-tls-support-5.0
3554-
- test-tls-support-4.4
3555-
- test-tls-support-4.2
35563503
- name: rhel80-large-gallium
35573504
display_name: rhel8 Node16
35583505
run_on: rhel80-large
@@ -3883,13 +3830,13 @@ buildvariants:
38833830
- test-tls-support-5.0
38843831
- test-tls-support-4.4
38853832
- test-tls-support-4.2
3886-
- name: rhel8-node14-test-csfle-mongocryptd
3887-
display_name: rhel 8 Node14 test mongocryptd
3833+
- name: rhel8-node16-test-csfle-mongocryptd
3834+
display_name: rhel 8 Node16 test mongocryptd
38883835
run_on: rhel80-large
38893836
expansions:
38903837
CLIENT_ENCRYPTION: true
38913838
RUN_WITH_MONGOCRYPTD: true
3892-
NODE_LTS_VERSION: 14
3839+
NODE_LTS_VERSION: 16
38933840
tasks:
38943841
- test-latest-csfle-mongocryptd
38953842
- test-rapid-csfle-mongocryptd
@@ -3904,7 +3851,7 @@ buildvariants:
39043851
expansions:
39053852
CLIENT_ENCRYPTION: true
39063853
RUN_WITH_MONGOCRYPTD: true
3907-
NODE_LTS_VERSION: 14
3854+
NODE_LTS_VERSION: 16
39083855
tasks:
39093856
- test-latest-csfle-mongocryptd
39103857
- test-rapid-csfle-mongocryptd
@@ -3952,7 +3899,7 @@ buildvariants:
39523899
display_name: MONGODB-AWS Auth test
39533900
run_on: ubuntu1804-large
39543901
expansions:
3955-
NODE_LTS_VERSION: 14
3902+
NODE_LTS_VERSION: 16
39563903
tasks:
39573904
- aws-latest-auth-test-run-aws-auth-test-with-regular-aws-credentials
39583905
- aws-latest-auth-test-run-aws-auth-test-with-assume-role-credentials
@@ -4044,7 +3991,7 @@ buildvariants:
40443991
display_name: Serverless Test
40453992
run_on: rhel80-large
40463993
expansions:
4047-
NODE_LTS_VERSION: 14
3994+
NODE_LTS_VERSION: 16
40483995
tasks:
40493996
- serverless_task_group
40503997
- name: rhel8-test-gcp-kms

.evergreen/generate_evergreen_tasks.js

-2
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,6 @@ for (const {
426426
});
427427

428428
for (const NODE_LTS_VERSION of testedNodeVersions) {
429-
if (NODE_LTS_VERSION === 14 && os.match(/^windows/)) continue;
430-
431429
const nodeLTSCodeName = versions.find(({ versionNumber }) => versionNumber === NODE_LTS_VERSION).codeName;
432430
const nodeLtsDisplayName = `Node${NODE_LTS_VERSION}`;
433431
const name = `${osName}-${NODE_LTS_VERSION >= 20 ? nodeLtsDisplayName : nodeLTSCodeName}`;

.evergreen/install-dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -o errexit # Exit the script with error if any of the commands fail
33

4-
NODE_LTS_VERSION=${NODE_LTS_VERSION:-14}
4+
NODE_LTS_VERSION=${NODE_LTS_VERSION:-16}
55

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

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
},
107107
"license": "Apache-2.0",
108108
"engines": {
109-
"node": ">=14.20.1"
109+
"node": ">=16.20.1"
110110
},
111111
"bugs": {
112112
"url": "https://jira.mongodb.org/projects/NODE/issues/"

test/integration/node-specific/errors.ts renamed to test/integration/node-specific/errors.test.ts

+7-11
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,24 @@ describe('Error (Integration)', function () {
1616
message: 'message 1, message 2'
1717
}
1818
]) {
19-
it(
20-
`constructs the message properly with an array of ${errors.length} errors`,
21-
{ requires: { nodejs: '>=16' } },
22-
() => {
23-
const error = new AggregateError(errors);
24-
const mongoError = new MongoError(error);
19+
it(`constructs the message properly with an array of ${errors.length} errors`, () => {
20+
const error = new AggregateError(errors);
21+
const mongoError = new MongoError(error);
2522

26-
expect(mongoError.message).to.equal(message);
27-
}
28-
);
23+
expect(mongoError.message).to.equal(message);
24+
});
2925
}
3026

3127
context('when the message on the AggregateError is non-empty', () => {
32-
it(`uses the AggregateError's message`, { requires: { nodejs: '>=16' } }, () => {
28+
it(`uses the AggregateError's message`, () => {
3329
const error = new AggregateError([new Error('non-empty')]);
3430
error.message = 'custom error message';
3531
const mongoError = new MongoError(error);
3632
expect(mongoError.message).to.equal('custom error message');
3733
});
3834
});
3935

40-
it('sets the AggregateError to the cause property', { requires: { nodejs: '>=16' } }, () => {
36+
it('sets the AggregateError to the cause property', () => {
4137
const error = new AggregateError([new Error('error 1')]);
4238
const mongoError = new MongoError(error);
4339
expect(mongoError.cause).to.equal(error);

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"checkJs": false,
55
"strict": true,
66
"alwaysStrict": true,
7-
"target": "ES2020",
7+
"target": "ES2021",
88
"module": "commonJS",
99
"moduleResolution": "node",
1010
"skipLibCheck": true,
1111
"lib": [
12-
"es2020"
12+
"es2021"
1313
],
1414
// We don't make use of tslib helpers, all syntax used is supported by target engine
1515
"importHelpers": false,

0 commit comments

Comments
 (0)