diff --git a/.tav.yml b/.tav.yml index 70a079d03f..bddc350dea 100644 --- a/.tav.yml +++ b/.tav.yml @@ -505,10 +505,16 @@ aws-sdk: # - In undici@4.7.1 the `request.origin` property was added, which we need # in the 'undici:request:create' diagnostic message. undici: - versions: '4.7.1 || 4.10.4 || 5.1.1 || 5.12.0 || 5.22.0 || 5.27.1 || ^5.28.2' - commands: node test/instrumentation/modules/undici/undici.test.js - # Test v4.7.1, latest v5 and 5 versions in between. - update-versions: - mode: max-5 - include: '>=4.7.1 <6' + - versions: '^6.0.0' + node: '>=18' + commands: node test/instrumentation/modules/undici/undici.test.js + update-versions: + mode: max-5 + include: '>=6.0.0 <7' + - versions: '4.7.1 || 4.10.4 || 5.1.1 || 5.12.0 || 5.22.0 || 5.27.1 || ^5.28.2' + commands: node test/instrumentation/modules/undici/undici.test.js + # Test v4.7.1, latest v5 and 5 versions in between. + update-versions: + mode: max-5 + include: '>=4.7.1 <6' diff --git a/package-lock.json b/package-lock.json index 4c1cc24218..4a53741319 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "thunky": "^1.1.0", "tree-kill": "^1.2.2", "typescript": "^5.0.2", - "undici": "^5.8.0", + "undici": "^6.2.1", "vasync": "^2.2.0", "wait-on": "^7.0.1", "ws": "^7.2.1" @@ -4292,6 +4292,18 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/@elastic/transport/node_modules/undici": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", + "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "dev": true, + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -17607,15 +17619,15 @@ } }, "node_modules/undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.2.1.tgz", + "integrity": "sha512-7Wa9thEM6/LMnnKtxJHlc8SrTlDmxqJecgz1iy8KlsN0/iskQXOQCuPkrZLXbElPaSw5slFFyKIKXyJ3UtbApw==", "dev": true, "dependencies": { "@fastify/busboy": "^2.0.0" }, "engines": { - "node": ">=14.0" + "node": ">=18.0" } }, "node_modules/undici-types": { @@ -21463,6 +21475,15 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true + }, + "undici": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", + "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "dev": true, + "requires": { + "@fastify/busboy": "^2.0.0" + } } } }, @@ -31890,9 +31911,9 @@ "dev": true }, "undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.2.1.tgz", + "integrity": "sha512-7Wa9thEM6/LMnnKtxJHlc8SrTlDmxqJecgz1iy8KlsN0/iskQXOQCuPkrZLXbElPaSw5slFFyKIKXyJ3UtbApw==", "dev": true, "requires": { "@fastify/busboy": "^2.0.0" diff --git a/package.json b/package.json index de39da8d01..91d318238d 100644 --- a/package.json +++ b/package.json @@ -206,7 +206,7 @@ "thunky": "^1.1.0", "tree-kill": "^1.2.2", "typescript": "^5.0.2", - "undici": "^5.8.0", + "undici": "^6.2.1", "vasync": "^2.2.0", "wait-on": "^7.0.1", "ws": "^7.2.1" diff --git a/test/_is_undici_incompat.js b/test/_is_undici_incompat.js index 1cfaafd5db..f2ac0a9da7 100644 --- a/test/_is_undici_incompat.js +++ b/test/_is_undici_incompat.js @@ -6,7 +6,7 @@ 'use strict'; -var semver = require('semver'); +const { satisfies } = require('semver'); /** * Return whether the current 'undici' version is incompatible with the @@ -29,9 +29,11 @@ function isUndiciIncompat() { const undiciVer = require('undici/package.json').version; const msg = `undici@${undiciVer} is incompatible with node@${nodeVer}`; - if ( - semver.satisfies(undiciVer, '>=5.28.0') && - semver.satisfies(nodeVer, '<14.18.0') + if (satisfies(undiciVer, '>=6.0.0') && satisfies(nodeVer, '<18.0.0')) { + return msg; + } else if ( + satisfies(undiciVer, '>=5.28.0') && + satisfies(nodeVer, '<14.18.0') ) { return msg; }