| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9fe7634 commit cb67a92
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,15 +17,11 @@ NPM="$ROOT/deps/npm/bin/npm-cli.js" | |||
| 17 | 17 | . "$ROOT/tools/dep_updaters/utils.sh" | |
| 18 | 18 | ||
| 19 | 19 | NEW_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/seven'); | ||
| 26 | 21 | if (!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 { version } = await res.json(); | ||
| 23 | + if (!version) throw new Error('No "seven" dist-tag found'); | ||
| 24 | + console.log(version); | ||
| 29 | 25 | EOF | |
| 30 | 26 | )" | |
| 31 | 27 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments