deps: use npm undici@seven tag in update-undici.sh

Node.js 24 is using Undici 7 rather than the latest version.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/62739
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Matteo Collina authored and GitHub committed 2026-04-28 16:12:49 +02:00
1 parent 9fe7634c12
commit cb67a925e9
1 file changed
+4 -8
+4 -8
View File
@@ -17,15 +17,11 @@ NPM="$ROOT/deps/npm/bin/npm-cli.js"
. "$ROOT/tools/dep_updaters/utils.sh"
NEW_VERSION="$("$NODE" --input-type=module <<'EOF'
const res = await fetch('https://api.github.com/repos/nodejs/undici/releases/latest',
process.env.GITHUB_TOKEN && {
headers: {
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`
},
});
const res = await fetch('https://registry.npmjs.org/undici/seven');
if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res });
const { tag_name } = await res.json();
console.log(tag_name.replace('v', ''));
const { version } = await res.json();
if (!version) throw new Error('No "seven" dist-tag found');
console.log(version);
EOF
)"