Skip to content

fix: pin reusable changesets workflow to npm 11 - #41

Merged
stipsan merged 1 commit into
mainfrom
cursor/pin-changesets-npm-11-079e
Sep 1, 2026
Merged

stipsan merged 1 commit into
mainfrom
cursor/pin-changesets-npm-11-079e

Conversation

@stipsan

@stipsan stipsan commented Sep 1, 2026

Copy link
Copy Markdown
Member

Description

changesets.yml installed npm@latest so OIDC trusted publishing works. npm@latest is now 12.

pnpm 10 pnpm info --json is a pass-through to npm view. npm 12 wraps that JSON in an array. @changesets/[email protected] unwraps the array in its npm parser but not its pnpm parser (changesets/changesets#2274), so changeset publish crashes:

TypeError: Cannot read properties of undefined (reading 'includes')

at getPublishPlan.mjs:613.

Seen on sanity-io/visual-editing run 33517457076 and sanity-io/next-sanity run 33496342128.

Trusted publishing only needs npm >= 11.5.1. Pin the global install to npm@11. No @changesets/* bump (latest is still 3.0.1). Git user, GITHUB_TOKEN, turbo, and OIDC are unchanged.

Caller repos (e.g. sanity-io/get-it) pick this up via sanity-io/.github/.github/workflows/changesets.yml@main after merge.

What to review

.github/workflows/changesets.yml — the Update npm to use trusted publishing (OIDC) step only.

Testing

No automated test for a reusable workflow pin. Confirmed the install line is npm@11 and the rest of the workflow is untouched.

Open in Web Open in Cursor 

npm 12 wraps `info --json` in an array. @changesets/cli 3.0.1
unwraps that in its npm parser but not its pnpm parser
(changesets/changesets#2274), so `changeset publish` crashes.
Trusted publishing only needs npm >= 11.5.1.

Co-authored-by: Cody Olsen <[email protected]>
@stipsan
stipsan marked this pull request as ready for review September 1, 2026 18:19
@stipsan
stipsan merged commit 585686f into main Sep 1, 2026
2 checks passed
@stipsan
stipsan deleted the cursor/pin-changesets-npm-11-079e branch September 1, 2026 19:28
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