fix: resolve the packed tarball without npm pack --json - #209
Merged
Conversation
The gate crashed rather than reporting anything, blocking the 1.3.0
release:
TypeError: undefined is not an object
(evaluating 'JSON.parse(packLine)[0].filename')
`npm pack --json --silent` prints nothing under npm 11 — --silent
suppresses the JSON the script was parsing. It worked locally on an older
npm, which is exactly why the gate needed to run in CI once before being
trusted.
Derives the tarball name from name and version instead, the way npm does
it, and only falls back to parsing stdout. Tested against real npm 11.17,
and re-verified against the published 1.2.11 tarball: still reports the
stale ./stores export and the README's missing stylesheet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
🚀 Preview deployment is ready! You can view the preview at: https://pr-ui-preview-209.surge.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 1.3.0 release failed on my own gate, and not because it found a problem — it crashed:
npm pack --json --silentprints nothing under npm 11:--silentsuppresses the JSON the script was parsing. It worked locally on an older npm, which is precisely why a gate has to run in CI once before it can be trusted.Now derives the tarball name from
nameandversionthe way npm does (drop the leading@,/becomes-), and only falls back to parsing stdout. Tested against real npm 11.17, and re-verified against the published 1.2.11 tarball — still reports the stale./storesexport and the README's missing stylesheet, so detection is intact.State right now
master is at 1.3.0, npm is still on 1.2.11. The workflow's recovery mode handles exactly this: it sees a version that is not on npm and publishes it as-is. So merging this triggers the 1.3.0 publish.
🤖 Generated with Claude Code