Repository navigation
Fix prepareRelease JSON parse and bump to 0.1.1 - #5
Merged
Merged
Conversation
npm pack --json captured a prepack `pnpm run build` banner on stdout, so JSON.parse threw Unexpected token '>'. Parse from the first JSON token, build and pack through npm, and run tsc in prepack. Bump public packages to 0.1.1 in lockstep after the failed v0.1.0 publish. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1cae589. Configure here.
parseNpmJsonStdout only sought [ or {, so npm view dist.integrity
--json stdout ("sha512-…") never parsed and registry skip/confirm
paths failed. Drop > banners, then parse any JSON value.
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
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.

Why
The v0.1.0
publish.ymlprepare job failed (run 31915314737).prepareReleaseranJSON.parseonnpm pack --jsonstdout after each packageprepackofpnpm run build. pnpm prints a human banner:and parse threw
SyntaxError: Unexpected token '>'.The setup-node
${NODE_AUTH_TOKEN}.npmrcwarning is unrelated. This PR does not addNODE_AUTH_TOKENor any npm token. It does not tag, release, unpublish, or move v0.1.0.What changed
--jsonstdout after dropping>lifecycle banners, from the first JSON token — objects, arrays, and scalars ("sha512-…", numbers,true/false/null). Mail's packerJSON.parses full npm stdout, which already accepts integrity strings; this helper now does too, soqueryRegistryIntegritycan skip-if-exists and confirm after publish.npm run buildinstead ofpnpm run build.prepackscripts frompnpm run buildtotsc -p tsconfig.json, matching@pegma/mail.@pegma/billing-coreand@pegma/billing-stripeto 0.1.1 in lockstep, including the workspace pin and lockfile specifier.prepareReleaseusesparseNpmJsonStdout(notJSON.parse(result.stdout)), that the helper accepts a pnpm banner prefix that rawJSON.parserejects, and thatnpm view dist.integrity --jsonstdout ("sha512-abc") parses to a string.Gate
pnpm run format:check,pnpm run check, andpnpm testall pass.Out of scope
No Git tag, no GitHub release, no npm publish, no token fallback.