Skip to content

Commit

Permalink
chore: check against npm version in issue validator (#38915)
Browse files Browse the repository at this point in the history
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
balazsorban44 committed Aug 25, 2022
1 parent f12788d commit 5c81834
Show file tree
Hide file tree
Showing 11 changed files with 218 additions and 8,870 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Expand Up @@ -18,6 +18,7 @@ packages/react-refresh-utils/**/*.js
packages/react-dev-overlay/lib/**
**/__tmp__/**
.github/actions/next-stats-action/.work
.github/actions/issue-validator/index.mjs
packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*
packages/next-codemod/**/*.js
Expand Down
6 changes: 0 additions & 6 deletions .github/actions/issue-validator/action.yml

This file was deleted.

0 comments on commit 5c81834

Please sign in to comment.