Skip to content

Commit 022d9c6

Browse files
trentmPeterEinberger
authored andcommitted
test(tedious): stop testing some older tedious versions with Node.js 14 (elastic#3927)
This was necessitated by a transitive dep of tedious (`@azure/core-rest-pipeline`) breaking support for Node.js versions earlier than 16. Closes: elastic#3926
1 parent d536b14 commit 022d9c6

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

.tav.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -318,24 +318,28 @@ pug:
318318
- node test/instrumentation/modules/hapi/set-framework.test.js
319319

320320
tedious:
321-
# latest majors subset of '>=1.9.0 <4.0.0 || >4.0.1 <11'
322-
- versions: '1.9.0 || 1.15.0 || 2.7.1 || 3.0.1 || 4.2.0 || 5.0.3 || 6.7.1 || 7.0.0 || 8.3.1 || 9.2.3 || 10.0.0'
321+
- versions:
322+
include: '>=1 <11'
323+
mode: latest-majors
323324
node: '>=6'
324325
commands: node test/instrumentation/modules/tedious.test.js
325-
- versions: '11.0.0 || 11.8.0' # first and last subset of '11.x'
326+
- versions:
327+
include: '>=11 <12'
328+
mode: latest-majors
326329
node: '>=10.17.0'
327330
commands: node test/instrumentation/modules/tedious.test.js
328-
# first and last majors subset of '12.x || 13.x || 14.x'
329-
- versions: '12.0.0 || 12.3.0 || 13.0.0 || 13.2.0 || 14.0.0 || 14.7.0 || >14.7.0 <15'
330-
node: '>=12.3.0'
331-
commands: node test/instrumentation/modules/tedious.test.js
332-
- versions: '15.0.0 || 15.1.3 || >15.1.3 <16' # first and last majors subset of '15.x'
333-
node: '>=14'
334-
commands: node test/instrumentation/modules/tedious.test.js
335-
- versions: '16.0.0 || 16.1.0 || >16.1.0 <17' # first and last majors subset of '16.x'
331+
# Tedious v12,v13,v14 advertise a min-supported Node.js version of 12.3.0.
332+
# Tedious v15 advertises a min-supported Node.js version of 14.
333+
# However, as of @azure/core-rest-pipeline@1.15.0 they effectively have a
334+
# min-working Node.js of >=16 (possibly >=18).
335+
- versions:
336+
include: '>=12 <17'
337+
mode: latest-majors
336338
node: '>=16'
337339
commands: node test/instrumentation/modules/tedious.test.js
338-
- versions: '>=17.0.0 <19' # first and last majors subset of '17.x' (as for now there is only v17.0.0)
340+
- versions:
341+
include: '>=17 <19'
342+
mode: latest-majors
339343
node: '18.x || >=20'
340344
commands: node test/instrumentation/modules/tedious.test.js
341345

test/instrumentation/modules/tedious.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ const tediousVer =
2525
const semver = require('semver');
2626
if (
2727
(semver.gte(tediousVer, '17.0.0') && semver.lt(process.version, '18.0.0')) ||
28-
(semver.gte(tediousVer, '16.0.0') && semver.lt(process.version, '16.0.0')) ||
29-
(semver.gte(tediousVer, '15.0.0') && semver.lt(process.version, '14.0.0')) ||
30-
(semver.gte(tediousVer, '12.0.0') && semver.lt(process.version, '12.3.0')) ||
31-
(semver.gte(tediousVer, '11.0.0') && semver.lt(process.version, '10.17.0'))
28+
// tedious@11 and later depend on @azure/identity v1 or v2. As of
29+
// @azure/core-rest-pipeline@1.15.0 (a dep of @azure/identity), support for
30+
// Node.js <16 has been broken.
31+
(semver.gte(tediousVer, '11.0.0') && semver.lt(process.version, '16.0.0'))
3232
) {
3333
console.log(
3434
`# SKIP tedious@${tediousVer} does not support node ${process.version}`,

0 commit comments

Comments
 (0)