Skip to content

fix: resolve the packed tarball without npm pack --json - #209

Merged
pathscale merged 1 commit into
masterfrom
fix/package-check-pack
Jul 26, 2026
Merged

fix: resolve the packed tarball without npm pack --json#209
pathscale merged 1 commit into
masterfrom
fix/package-check-pack

Conversation

@pathscale

Copy link
Copy Markdown
Owner

The 1.3.0 release failed on my own gate, and not because it found a problem — it crashed:

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 precisely why a gate has to run in CI once before it can be trusted.

Now derives the tarball name from name and version the 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 ./stores export 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

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>
@pathscale
pathscale merged commit 8c0ed3e into master Jul 26, 2026
2 checks passed
@pathscale
pathscale deleted the fix/package-check-pack branch July 26, 2026 12:11
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployment is ready!

You can view the preview at: https://pr-ui-preview-209.surge.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant