mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
1 parent
9fe7634c12
commit
cb67a925e9
1 file changed
+4
-8
@@ -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
|
||||
)"
|
||||
|
||||
|
||||
Reference in new issue
Block a user