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`.
Showing
This diff is collapsed.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
Please
register
or
sign in
to comment