Repository navigation
Fix prepareRelease pack JSON parse and bump to 0.1.1 - #6
Merged
Merged
Conversation
npm pack --json stdout included the prepack `pnpm run build` banner, so JSON.parse threw Unexpected token '>'. Match mail: prepack is tsc, pack parses only the JSON value, and public packages move to 0.1.1 in lockstep. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
|
You have reached your Codex usage limits for security reviews. Please try again later. |
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.
Problem
publish.ymlprepare failed on the v0.1.0 tag (run 31915308442).prepareReleaseranJSON.parseonnpm pack --jsonstdout. Each package'sprepackwaspnpm run build, so pnpm printed a human banner first:JSON.parsethen threwSyntaxError: Unexpected token '>'.The setup-node
.npmrc${NODE_AUTH_TOKEN}warning is unrelated. This PR does not addNODE_AUTH_TOKENor any npm token.Fix
Matches the
pegma-dev/mailpacker pattern:prepackis nowtsc -p tsconfig.json(no pnpm lifecycle banner onnpm pack --json).npm run build, thennpm pack --json.parseNpmJsonreads only the JSON value from npm stdout, so a leftover banner cannot be parsed as JSON.prepackthat invokes pnpm.Version
All public packages move in lockstep to 0.1.1:
@pegma/cache-core@pegma/cache-conformance@pegma/cache-redis@pegma/cache-azure-redis@pegma/cache-elasticache@pegma/cache-upstash-redisInternal pins and
pnpm-lock.yamlmatch. This does not tag, release, unpublish, or move v0.1.0.Test
parseNpmJsonis asserted against the exact pnpm banner that broke prepare. RawJSON.parseof that stream still throws; the helper returns the pack metadata.