Skip to content

Commit ea8a33f

Browse files
feat(NODE-6593): add support for [email protected] (#4346)
1 parent ed83f36 commit ea8a33f

File tree

8 files changed

+161
-66
lines changed

8 files changed

+161
-66
lines changed

.evergreen/config.in.yml

+1
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ functions:
321321
params:
322322
working_dir: src
323323
script: |
324+
source ${DRIVERS_TOOLS}/.evergreen/init-node-and-npm-env.sh
324325
npm install --force ${PACKAGE}
325326
326327
"run lint checks":

.evergreen/config.yml

+48-7
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ functions:
287287
params:
288288
working_dir: src
289289
script: |
290+
source ${DRIVERS_TOOLS}/.evergreen/init-node-and-npm-env.sh
290291
npm install --force ${PACKAGE}
291292
run lint checks:
292293
- command: subprocess.exec
@@ -2105,7 +2106,23 @@ tasks:
21052106
- func: install dependencies
21062107
- func: bootstrap mongo-orchestration
21072108
- func: run socks5 tests
2108-
- name: test-zstd-compression
2109+
- name: test-snappy-compression
2110+
tags:
2111+
- latest
2112+
- snappy
2113+
commands:
2114+
- command: expansions.update
2115+
type: setup
2116+
params:
2117+
updates:
2118+
- {key: VERSION, value: latest}
2119+
- {key: TOPOLOGY, value: replica_set}
2120+
- {key: AUTH, value: auth}
2121+
- {key: COMPRESSOR, value: snappy}
2122+
- func: install dependencies
2123+
- func: bootstrap mongo-orchestration
2124+
- func: run-compression-tests
2125+
- name: test-zstd-1.x-compression
21092126
tags:
21102127
- latest
21112128
- zstd
@@ -2120,11 +2137,14 @@ tasks:
21202137
- {key: COMPRESSOR, value: zstd}
21212138
- func: install dependencies
21222139
- func: bootstrap mongo-orchestration
2140+
- func: install package
2141+
vars:
2142+
PACKAGE: '@mongodb-js/[email protected]'
21232143
- func: run-compression-tests
2124-
- name: test-snappy-compression
2144+
- name: test-zstd-2.x-compression
21252145
tags:
21262146
- latest
2127-
- snappy
2147+
- zstd
21282148
commands:
21292149
- command: expansions.update
21302150
type: setup
@@ -2133,7 +2153,7 @@ tasks:
21332153
- {key: VERSION, value: latest}
21342154
- {key: TOPOLOGY, value: replica_set}
21352155
- {key: AUTH, value: auth}
2136-
- {key: COMPRESSOR, value: snappy}
2156+
- {key: COMPRESSOR, value: zstd}
21372157
- func: install dependencies
21382158
- func: bootstrap mongo-orchestration
21392159
- func: run-compression-tests
@@ -4785,6 +4805,9 @@ buildvariants:
47854805
- test-socks5
47864806
- test-socks5-csfle
47874807
- test-socks5-tls
4808+
- test-snappy-compression
4809+
- test-zstd-1.x-compression
4810+
- test-zstd-2.x-compression
47884811
- test-tls-support-latest
47894812
- test-tls-support-8.0
47904813
- test-tls-support-7.0
@@ -4841,6 +4864,9 @@ buildvariants:
48414864
- test-socks5
48424865
- test-socks5-csfle
48434866
- test-socks5-tls
4867+
- test-snappy-compression
4868+
- test-zstd-1.x-compression
4869+
- test-zstd-2.x-compression
48444870
- test-tls-support-latest
48454871
- test-tls-support-8.0
48464872
- test-tls-support-7.0
@@ -4897,6 +4923,9 @@ buildvariants:
48974923
- test-socks5
48984924
- test-socks5-csfle
48994925
- test-socks5-tls
4926+
- test-snappy-compression
4927+
- test-zstd-1.x-compression
4928+
- test-zstd-2.x-compression
49004929
- test-tls-support-latest
49014930
- test-tls-support-8.0
49024931
- test-tls-support-7.0
@@ -4953,8 +4982,9 @@ buildvariants:
49534982
- test-socks5
49544983
- test-socks5-csfle
49554984
- test-socks5-tls
4956-
- test-zstd-compression
49574985
- test-snappy-compression
4986+
- test-zstd-1.x-compression
4987+
- test-zstd-2.x-compression
49584988
- test-tls-support-latest
49594989
- test-tls-support-8.0
49604990
- test-tls-support-7.0
@@ -5009,8 +5039,9 @@ buildvariants:
50095039
- test-auth-ldap
50105040
- test-socks5-csfle
50115041
- test-socks5-tls
5012-
- test-zstd-compression
50135042
- test-snappy-compression
5043+
- test-zstd-1.x-compression
5044+
- test-zstd-2.x-compression
50145045
- test-tls-support-latest
50155046
- test-tls-support-8.0
50165047
- test-tls-support-7.0
@@ -5055,6 +5086,9 @@ buildvariants:
50555086
- test-latest-server-v1-api
50565087
- test-socks5
50575088
- test-socks5-tls
5089+
- test-snappy-compression
5090+
- test-zstd-1.x-compression
5091+
- test-zstd-2.x-compression
50585092
- test-tls-support-latest
50595093
- test-tls-support-8.0
50605094
- test-tls-support-7.0
@@ -5099,6 +5133,9 @@ buildvariants:
50995133
- test-latest-server-v1-api
51005134
- test-socks5
51015135
- test-socks5-tls
5136+
- test-snappy-compression
5137+
- test-zstd-1.x-compression
5138+
- test-zstd-2.x-compression
51025139
- test-tls-support-latest
51035140
- test-tls-support-8.0
51045141
- test-tls-support-7.0
@@ -5143,6 +5180,9 @@ buildvariants:
51435180
- test-latest-server-v1-api
51445181
- test-socks5
51455182
- test-socks5-tls
5183+
- test-snappy-compression
5184+
- test-zstd-1.x-compression
5185+
- test-zstd-2.x-compression
51465186
- test-tls-support-latest
51475187
- test-tls-support-8.0
51485188
- test-tls-support-7.0
@@ -5187,8 +5227,9 @@ buildvariants:
51875227
- test-latest-server-v1-api
51885228
- test-socks5
51895229
- test-socks5-tls
5190-
- test-zstd-compression
51915230
- test-snappy-compression
5231+
- test-zstd-1.x-compression
5232+
- test-zstd-2.x-compression
51925233
- test-tls-support-latest
51935234
- test-tls-support-8.0
51945235
- test-tls-support-7.0

.evergreen/generate_evergreen_tasks.js

+54-26
Original file line numberDiff line numberDiff line change
@@ -211,23 +211,60 @@ TASKS.push(
211211
]
212212
);
213213

214-
for (const compressor of ['zstd', 'snappy']) {
215-
TASKS.push({
216-
name: `test-${compressor}-compression`,
217-
tags: ['latest', compressor],
218-
commands: [
219-
updateExpansions({
220-
VERSION: 'latest',
221-
TOPOLOGY: 'replica_set',
222-
AUTH: 'auth',
223-
COMPRESSOR: compressor
224-
}),
225-
{ func: 'install dependencies' },
226-
{ func: 'bootstrap mongo-orchestration' },
227-
{ func: 'run-compression-tests' }
228-
]
229-
});
230-
}
214+
TASKS.push({
215+
name: `test-snappy-compression`,
216+
tags: ['latest', 'snappy'],
217+
commands: [
218+
updateExpansions({
219+
VERSION: 'latest',
220+
TOPOLOGY: 'replica_set',
221+
AUTH: 'auth',
222+
COMPRESSOR: 'snappy'
223+
}),
224+
{ func: 'install dependencies' },
225+
{ func: 'bootstrap mongo-orchestration' },
226+
{ func: 'run-compression-tests' }
227+
]
228+
});
229+
230+
TASKS.push({
231+
name: `test-zstd-1.x-compression`,
232+
tags: ['latest', 'zstd'],
233+
commands: [
234+
updateExpansions({
235+
VERSION: 'latest',
236+
TOPOLOGY: 'replica_set',
237+
AUTH: 'auth',
238+
COMPRESSOR: 'zstd'
239+
}),
240+
{ func: 'install dependencies' },
241+
{ func: 'bootstrap mongo-orchestration' },
242+
{
243+
func: 'install package',
244+
vars: {
245+
PACKAGE: '@mongodb-js/[email protected]'
246+
}
247+
},
248+
{ func: 'run-compression-tests' }
249+
]
250+
});
251+
252+
TASKS.push({
253+
name: `test-zstd-2.x-compression`,
254+
tags: ['latest', 'zstd'],
255+
commands: [
256+
updateExpansions({
257+
VERSION: 'latest',
258+
TOPOLOGY: 'replica_set',
259+
AUTH: 'auth',
260+
COMPRESSOR: 'zstd'
261+
}),
262+
{ func: 'install dependencies' },
263+
{ func: 'bootstrap mongo-orchestration' },
264+
// no need to manually install zstd - we specify 2.x as a dev dependency in package.json
265+
{ func: 'run-compression-tests' }
266+
]
267+
});
231268

232269
const AWS_LAMBDA_HANDLER_TASKS = [];
233270
// Add task for testing lambda example without aws auth.
@@ -766,15 +803,6 @@ BUILD_VARIANTS.push({
766803
tasks: ['.resource-management']
767804
});
768805

769-
// TODO(NODE-4575): unskip zstd and snappy on node 16
770-
for (const variant of BUILD_VARIANTS.filter(
771-
variant => variant.expansions && [16, 18, 20].includes(variant.expansions.NODE_LTS_VERSION)
772-
)) {
773-
variant.tasks = variant.tasks.filter(
774-
name => !['test-zstd-compression', 'test-snappy-compression'].includes(name)
775-
);
776-
}
777-
778806
// TODO(NODE-4897): Debug socks5 tests on node latest
779807
for (const variant of BUILD_VARIANTS.filter(
780808
variant => variant.expansions && ['latest'].includes(variant.expansions.NODE_LTS_VERSION)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ For exhaustive server and runtime version compatibility matrices, please refer t
8383

8484
The following table describes add-on component version compatibility for the Node.js driver. Only packages with versions in these supported ranges are stable when used in combination.
8585

86-
| Component | `[email protected]` | `[email protected]` | `[email protected]` | `mongodb@<6.11` | `mongodb@>=6.11`|
86+
| Component | `[email protected]` | `[email protected]` | `[email protected]` | `mongodb@<6.12` | `mongodb@>=6.12`|
8787
| ------------------------------------------------------------------------------------ | ------------------ | ------------------ | ------------------ | --------------- | --------------- |
8888
| [bson](https://www.npmjs.com/package/bson) | ^1.0.0 | ^4.0.0 | ^5.0.0 | ^6.0.0 | ^6.0.0 |
8989
| [bson-ext](https://www.npmjs.com/package/bson-ext) | ^1.0.0 \|\| ^2.0.0 | ^4.0.0 | N/A | N/A | N/A |

0 commit comments

Comments
 (0)