Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: check against
npm
version in issue validator (#38915)
I did some experimenting to see if we can grab the latest version from npm instead of GitHub releases since that's the version the user can actually use. The npm registry sends the package metadata in a gigantic (~8mb for `next`) JSON response and parsing it with `res.json()` takes several seconds, but using `ReadableStream`, we only care about the first chunk. This way we can grab the relevant version information in a few ms. ~I added `undici` which implements `res.body.getReader()`.~ Using Node 18/native `fetch`.
- Loading branch information