File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,15 +17,12 @@ NPM="$ROOT/deps/npm/bin/npm-cli.js"
1717. " $ROOT /tools/dep_updaters/utils.sh"
1818
1919NEW_VERSION=" $( " $NODE " --input-type=module << 'EOF '
20- const res = await fetch('https://api.github.com/repos/nodejs/undici/releases/latest',
21- process.env.GITHUB_TOKEN && {
22- headers: {
23- "Authorization": `Bearer ${process.env.GITHUB_TOKEN}`
24- },
25- });
20+ const res = await fetch('https://registry.npmjs.org/undici');
2621if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res });
27- const { tag_name } = await res.json();
28- console.log(tag_name.replace('v', ''));
22+ const pkg = await res.json();
23+ const version = pkg['dist-tags']?.seven;
24+ if (!version) throw new Error('No "seven" dist-tag found');
25+ console.log(version);
2926EOF
3027) "
3128
You can’t perform that action at this time.
0 commit comments