Repository navigation
fix: pin reusable changesets workflow to npm 11 - #41
Merged
Merged
Conversation
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]>
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.
Description
changesets.ymlinstallednpm@latestso OIDC trusted publishing works.npm@latestis now 12.pnpm 10
pnpm info --jsonis a pass-through tonpm 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), sochangeset publishcrashes: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@mainafter merge.What to review
.github/workflows/changesets.yml— theUpdate npm to use trusted publishing (OIDC)step only.Testing
No automated test for a reusable workflow pin. Confirmed the install line is
npm@11and the rest of the workflow is untouched.