Skip to content

Upgrade to Changesets v3 and changesets/action v2 #397

Description

@kraenhansen

Follow-up to #396, which worked around the release failure rather than fixing its cause.

Why

changeset publish on 2.x shells out to npm info <pkg> --json to find out what is already on the registry — there is no pnpm code path. npm ≥ 11 validates the root package.json's devEngines on every command, so npm info exits 1 with EBADDEVENGINES ("Invalid name pnpm does not match npm") and the publish dies before it starts (failing run).

Changesets v3 fixes this at the source: its publish pipeline is package-manager-aware and runs pnpm info / pnpm pack / pnpm publish when pnpm is detected, so npm is never invoked and the devEngines check never runs.

#396 unblocked the release in the meantime by setting npm_config_force: true on the changesets step, which downgrades npm's devEngines error to a warning. Completing this upgrade means that env var can be deleted — that is the removal condition recorded in the workflow comment.

What needs to move, together

The CLI cannot be upgraded on its own. v3 dropped the New tag: <pkg>@<version> stdout line that changesets/action@v1 parses to detect what was published; the action's v2 line instead has the CLI write NDJSON git-tag events to $CHANGESETS_OUTPUT and reads that file. CLI v3 with action v1 would publish but report published: false, and push no git tags and create no GitHub releases — a silent regression, worse than today's loud failure. So both move in one PR, or neither does.

  • @changesets/cli → v3 (root devDependencies)
  • changesets/action@v1 → v2 in .github/workflows/release.yml
  • Rename the step's inputs — v2 is kebab-case: publish:publish-script:, and the GITHUB_TOKEN env becomes a github-token: input (defaults to ${{ github.token }}). Also available: version-script, commit-message, pr-title, pr-base-branch, create-github-releases, push-git-tags. Outputs are renamed too (published-packages, has-changesets, pr-number), though we don't currently consume any.
  • Drop npm_config_force: true from the step (added in ci: unblock changesets publish from npm's devEngines check #396)
  • Re-check .changeset/config.json against the v3 schema
  • Review the v3 changelog for anything else breaking in the version/PR flow

Blocker: both are prereleases

As of 2026-08-11:

latest stable prerelease with the fix
@changesets/cli 2.31.1 (still spawns bare npm info) 3.0.0-next.12 (next tag)
changesets/action v1.9.0 v2.0.0-next.4 (2026-08-03)

So this is two coordinated prerelease majors on the release pipeline — the one pipeline that is awkward to rehearse, since it only exercises the publish path after a Version Packages PR merges. Suggest waiting for both stables unless there's a reason to move sooner; the workaround in #396 holds until then.

Related

Metadata

Metadata

Assignees

Labels

AutomatableAn issue we expect to be fixed using automation.CIContinuous integration

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions