Skip to content

Fix prepareRelease pack JSON parse and bump to 0.1.1 - #6

Merged
FlyOverCoderKY merged 1 commit into
mainfrom
cursor/fix-prepare-release-packer-a1f2
Aug 16, 2026
Merged

FlyOverCoderKY merged 1 commit into
mainfrom
cursor/fix-prepare-release-packer-a1f2

Conversation

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor

Problem

publish.yml prepare failed on the v0.1.0 tag (run 31915308442). prepareRelease ran JSON.parse on npm pack --json stdout. Each package's prepack was pnpm run build, so pnpm printed a human banner first:

> @pegma/cache-core@0.1.0 build /home/runner/work/cache-core/cache-core/packages/cache-core

JSON.parse then threw SyntaxError: Unexpected token '>'.

The setup-node .npmrc ${NODE_AUTH_TOKEN} warning is unrelated. This PR does not add NODE_AUTH_TOKEN or any npm token.

Fix

Matches the pegma-dev/mail packer pattern:

  • Public package prepack is now tsc -p tsconfig.json (no pnpm lifecycle banner on npm pack --json).
  • Workspace build during prepare uses npm run build, then npm pack --json.
  • parseNpmJson reads only the JSON value from npm stdout, so a leftover banner cannot be parsed as JSON.
  • Release validation rejects a prepack that 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-redis

Internal pins and pnpm-lock.yaml match. This does not tag, release, unpublish, or move v0.1.0.

Test

parseNpmJson is asserted against the exact pnpm banner that broke prepare. Raw JSON.parse of that stream still throws; the helper returns the pack metadata.

Open in Web Open in Cursor 

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@FlyOverCoderKY
FlyOverCoderKY merged commit 0c83ad4 into main Aug 16, 2026
13 checks passed
@FlyOverCoderKY
FlyOverCoderKY deleted the cursor/fix-prepare-release-packer-a1f2 branch August 16, 2026 00:44
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.

2 participants