Repository navigation
docs(release): record why npm@latest is safe on the v2 line - #77
Merged
Merged
Conversation
npm 12 (now npm@latest, 12.2.1) wraps `npm info --json` in an array. @changesets/cli v2 reads that as "nothing published" and republishes, failing with E403 (changesets/changesets#2164). CLI v3 unwraps the array, and in a pnpm repo uses `pnpm info`, so this workflow, which changesets/action v2 restricts to CLI v3, is safe on npm 12. Verified: callers have published through this workflow on npm 12.2.1 (@repobuddy/storybook@2.34.1, buddy-agent-harness@1.0.0), and no-op runs report "No unpublished projects to publish" instead of E403. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: unional <homawong@gmail.com>
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
unional
added a commit
to unional/skills
that referenced
this pull request
Nov 4, 2026
CLI 3.0.3+ unwraps npm 12's array-wrapped `npm info --json` and uses `pnpm info` in pnpm repos (changesets/changesets#2276), so npm@latest is safe on the v2 line; repobuddy @v2 has published on npm 12.2.1 (repobuddy/.github#77). Scope the pnpm TypeError to CLI 3.0.0-3.0.2 (changesets/changesets#2274). @v1 (action v1 + CLI 2, npm@latest) stays broken; a CLI 2 repo pins npm 11 (>= 11.5.1) itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: unional <homawong@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.
Summary
Comment-only change to
pnpm-release-changeset-oidc.yml. It records why the step that runsnpm install -g npm@latestis safe now thatnpm@latestis npm 12, so nobody pins npm 11 to fix a problem this line doesn't have.Evidence
npm@latestis 12.2.1 (npm view npm dist-tags).npm info <pkg> --jsonin an array ([ { ... } ]). pnpm 10, 11 and 12info --jsonprint a plain object.@changesets/cliv2 always runsnpm infoand readspkgInfo.versions. With the array, that is undefined, so CLI v2 republishes existing versions and fails with E403 (npm info --jsonarray output in npm 12 breaks published-version detection inchangeset publishchangesets/changesets#2164).@changesets/cliv3 (3.0.3,dist/getPublishPlan.mjs):parseInfoResult);pnpm infoinstead, with the array-aware parser on pnpm ≤10.getPublishTool().info()locally with npm 12.1.0, npm 12.2.1, pnpm 10.34.9, pnpm 11.28.10 and pnpm 12.16.1. In every case a published package reportedpublished=truewith itsversionsarray, and a missing package reportedpublished=false.@v2with npm 12.2.1:@repobuddy/storybookpublished2.34.1alongside its existing versions;buddy-agent-harnesspublished1.0.0today;pnpm-release-changeset-oidc.yml@v2with@changesets/cli^3 and pnpm 11 or 12. changesets/action v2 refuses CLI v2, so no CLI v2 caller can publish through this line.Not changed
pnpm-release-changeset.ymlandpnpm-release-semantic.ymldon't install npm. They run on Node 26, whose bundled npm is also 12, and their CLI 3 pairing is the same.v1tag'spnpm-release-changeset-oidc.ymlalso runsnpm install -g npm@latest, and v1 pairs with CLI v2, so that combination is broken under npm 12. No current caller uses@v1. Fixing it means moving a tag, which is out of scope for this PR.🤖 Generated with Claude Code