ci: upgrade to Changesets v3 and changesets/action v2 - #401
Merged
Conversation
Bumps @changesets/cli to 3.0.0 (stable — the two prerelease majors this was blocked on, @changesets/cli@3.0.0 and changesets/action@v2.0.0, both shipped stable since #397 was filed) and changesets/action to v2, moving both together as required: v3 dropped the "New tag: <pkg>@<version>" stdout line action v1 parses, in favor of NDJSON `git-tag` events written to $CHANGESETS_OUTPUT that only action v2 reads. - .changeset/config.json: bump the schema pin to @changesets/config@4.0.0 (the version @changesets/cli@3.0.0 depends on). None of our config keys are affected by v4's breaking changes (no `prettier` key, baseBranch is already "main", no experimental snapshot option in use). - release.yml: rename the action's inputs to v2's kebab-case scheme (`publish:` -> `publish-script:`) and drop the `GITHUB_TOKEN` env var, since v2 reads it through a `github-token:` input that already defaults to `${{ github.token }}`. Corrects an assumption in #397: it expected this upgrade to let `npm_config_force: true` (added in #396) be removed, on the theory that v3's publish pipeline is pnpm-aware and never invokes npm. That part holds for `pnpm pack`/`pnpm publish`, verified here with strace, but `pnpm info` (which `changeset publish`/`publish-plan` use to check what's already on the registry) is itself a passthrough to the real npm CLI — `pnpm info <pkg>` execs `npm info <pkg>` — so it still trips npm's devEngines validation of this repo's root package.json. The workaround stays, with an updated comment; there's no changesets- or pnpm-version bump that removes the need for it, so the workflow comment no longer frames it as removable by this upgrade. Verified locally on Node 24 / pnpm 10.33: `changeset status`, `changeset publish-plan` (fails with EBADDEVENGINES without the env var, succeeds with it — same behavior as before), build, prettier:check, and the workspace test suite (failures are pre-existing/environmental, see below) all pass. Not verified: the actual GitHub Actions publish path (action v1 -> v2 PR description, output/input renames) only exercises the publish step once a "Version Packages" PR merges, so this needs a real run to confirm.
Collaborator
Author
|
@kraenhansen for review — couldn't request you formally since the PR is authored as you. One thing worth double-checking on your side: I couldn't exercise the actual publish step through Generated by Claude Code |
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.
Fixes #397.
What moved
Both packages were blocked on prereleases when #397 was filed; both have since shipped stable, so this does the coordinated bump it called for:
@changesets/cli→^3.0.0(rootdevDependencies)changesets/action@v1→v2in.github/workflows/release.ymlpublish:→publish-script:. Dropped theGITHUB_TOKENenv var — v2 reads it through agithub-token:input that already defaults to${{ github.token }}, same value..changeset/config.json: bumped the$schemapin to@changesets/config@4.0.0(what@changesets/cli@3.0.0depends on). None of v4's breaking changes touch our config — noprettierkey,baseBranchis already"main", no experimental snapshot option in use, andchangeset tag(renamed tochangeset git-tag) isn't used anywhere in our scripts.Both had to move together, as #397 flagged: v3 dropped the
New tag: <pkg>@<version>stdout linechangesets/action@v1parses to detect what published; the action's v2 line instead reads NDJSONgit-tagevents the CLI writes to$CHANGESETS_OUTPUT. CLI v3 with action v1 would publish but reportpublished: falseand push no tags/releases — a silent regression.Correcting an assumption in #397
The issue expected this upgrade to let
npm_config_force: true(added in #396) be removed, reasoning that v3's publish pipeline is pnpm-aware and would never invoke npm. That's true forpnpm pack/pnpm publish— verified here withstrace, neither execsnpm. Butpnpm info(whatchangeset publish/publish-planuse to check what's already on the registry) is itself a passthrough to the real npm CLI:straceshowspnpm info <pkg>directlyexecvesnpm info <pkg>. That still trips npm ≥ 11'sdevEnginesvalidation of this repo's own rootpackage.json(devEngines.packageManager: pnpm, but the process running is npm), the exact failure #396 worked around.So
npm_config_force: truestays — there's no changesets- or pnpm-version bump that removes the need for it. I updated the workflow comment to reflect this instead of leaving it as a removal condition that isn't actually reachable. I also updated #397 itself so it reflects this rather than the original "prereleases are the only blocker" framing.Verification
On Node 24 / pnpm 10.33 (this repo's pinned versions):
pnpm exec changeset statusandpnpm exec changeset publish-plan— the latter reproducesEBADDEVENGINESwithoutnpm_config_force, and completes cleanly with it (same shape as the pre-upgrade behavior), confirming the escape hatch is still both necessary and sufficient.pnpm run build,pnpm run prettier:check— pass.pnpm run lint— pre-existing, unrelated failures inapps/test-app/App.tsx(confirmed present onmainwithout this change).pnpm test— pre-existing, unrelated failures inpackages/host's permission-based path-utils tests (they assume file permissions restrict access, which doesn't hold running as root in this container; confirmed present onmainwithout this change).Not verified: the actual GitHub Actions publish path. The input/output renames and
github-tokendefault only get exercised once a "Version Packages" PR merges and the Release job runs the publish step for real, so this needs a live run to confirm end-to-end.Generated by Claude Code