Skip to content

Keep changesets from formatting in package repos, which breaks changeset version with @changesets/cli 3.1 - #50

Merged
davidjalbers merged 2 commits into
one-loopfrom
fix/changeset-version-in-package-repos
Nov 30, 2026
Merged

davidjalbers merged 2 commits into
one-loopfrom
fix/changeset-version-in-package-repos

Conversation

@davidjalbers

Copy link
Copy Markdown
Contributor

What broke

Since 2026-11-30 18:23 UTC both newborn package repos fail at pnpm exec changeset version with "The command pnpm exec @biomejs/biome format --write --no-errors-on-unmatched …/CHANGELOG.md exited with a non-zero status (1)", on every branch.
@changesets/cli 3.1.0, @changesets/apply-release-plan 8.2.0 and @changesets/write 1.1.0 were published on 2026-11-27 at 18:23 UTC; the template's minimumReleaseAge: 4320 kept a newborn, which has no lockfile, on 3.0.3, 8.1.1 and 1.0.1 for exactly three days.
Read in the tarballs from npm: 8.1.1 and 1.0.1 detected a formatter with defaultDetectOrder.filter((f) => f !== "biome"), and 8.2.0 and 1.1.0 call detect({ cwd }) with Biome included ("Added support for formatting with Biome (version 2.6+)", changesets/changesets#2346).
With the default "format": "auto" they find biome.json and hand each changelog and each new changeset to @changesets/format 0.1.3, which runs resolveCommand(pm, "execute-local", ["@biomejs/biome", "format", …]), that is pnpm exec @biomejs/biome.
Run by hand in a newborn, pnpm answers ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL … Command "@biomejs/biome" not found: pnpm exec runs a binary, and Biome's is biome.
pnpm exec biome format --write --no-errors-on-unmatched …/CHANGELOG.md exits 0 with "Formatted 0 files", since Biome 2.6.9 is a root devDependency of every repo the template creates (birth command pnpm add --workspace-root --save-dev --save-exact @biomejs/biome) and @plexus-ms/config turns Biome's formatter off for **/*.md.
So the defect is upstream in @changesets/format, filed there as changesets/format#56 with a fix open as changesets/format#57; "format": "biome" runs the same command and does not help.

The fix

.changeset/config.json of a package repo sets "format": false, with a template comment saying why.
Biome formats no Markdown here anyway, so the setting says what a package repo already does, and it stays right once upstream is fixed.
@changesets/config 4.0.1, which 3.0.3 uses, already accepts format: false, so the file works before and after the update.
A test commit before the fix asserts the CHANGELOG.md that changeset version writes and runs the newborn's own check on the result.

Weighed against it:

  • Making Biome reachable the way 3.1.0 calls it: there is no @biomejs/biome binary to make reachable, and a shim of our own named after a package is the mechanism the methodology warns against.
  • Pinning @changesets/cli below 3.1.0: this does not dodge the defect. In a fresh install ~3.0.3 still resolves apply-release-plan 8.2.0 and write 1.1.0 through ^8.1.1 and ^1.0.1, and changeset version fails the same way (shown in the proof). It would also leave every repo to meet the same failure later.

What an existing package repo must do

A repo locked at 3.0.3 with apply-release-plan 8.1.1 works until its lockfile moves: the weekly group or lockfile maintenance, Monday before 4am, is enough. Both merge on green CI, and verify never runs changeset version.
After that, changeset version fails in the release workflow's "version packages" step, and changeset add fails too.
The repo takes the Plexus version that carries this change (plx update merges .changeset/config.json), or before that adds "format": false to .changeset/config.json by hand.
plexus-ms/libraries is locked at @changesets/cli 3.0.3, apply-release-plan 8.1.1 and write 1.0.1 on main. Its weekly update and lockfile maintenance on 2026-12-07 would bring 3.1.0, so it needs the line before then.

Proof

Using the plx built from this branch, with its packages served the way the newborn tests serve them, the proof created a newborn in each shape (packages, private-packages) and ran everything from a fresh clone. The installed plx is byte-for-byte the build.
mise check and mise test pass, changeset add --empty writes a changeset, and changeset version writes ## 0.2.0 / ### Minor Changes / - A first change. and bumps the package to 0.2.0.
mise check passes on the result. The installed versions are @changesets/cli 3.1.0 (apply-release-plan 8.2.0, write 1.1.0, format 0.1.3) and @biomejs/biome 2.6.9.
A repo born with yesterday's template and resolution (3.0.3, 8.1.1, 1.0.1) versions fine.
After pnpm update @changesets/cli (3.1.0, 8.2.0, 1.1.0), both changeset version and changeset add fail with the command above.
With "format": false added by hand, both pass, and so does mise check.
The newborn tests pass with CI=true (35 of 35) and without it.

Verify

TURBO_FORCE=true mise run verify exits 0. Nothing was cached in build, check-js or test, and the newborns pass 35 of 35.

main

main has the same defect, because its template has the same .changeset/config.json.jinja and its newborn test runs changeset version.
The fix commit cherry-picks cleanly onto origin/main (checked with git merge-tree).
The test commit conflicts there, because main's newborn test still says verify where one-loop says check.
On main it is the same two lines after changeset version, with await verify(dir, name) in place of await pass(dir, name, 'check').

🤖 Generated with Claude Code

davidjalbers and others added 2 commits November 30, 2026 19:43
… its check accepts

The newborn package repo asserts the CHANGELOG.md that changeset version
writes and runs its own check on the result, so that a changelog the repo's
Biome would refuse, or a formatter changesets cannot start, fails here.

Refs PLX-196

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@changesets/cli 3.1.0 (apply-release-plan 8.2.0, write 1.1.0) adds Biome to
the formatters its default "format": "auto" detects, finds biome.json, and
formats each changelog and changeset it writes with
`pnpm exec @biomejs/biome format`. pnpm exec runs a binary, and Biome's is
`biome`, so changeset version exits 1 in every package repo of the template
(changesets/format#56, open). Biome would have nothing to do anyway: the
shared configuration turns its formatter off for Markdown. "format": false,
which @changesets/config 4.0 already accepts, says so and holds for 3.0 and
3.1 alike.

Refs PLX-196

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@davidjalbers davidjalbers self-assigned this Nov 30, 2026
@davidjalbers
davidjalbers merged commit 6eba95f into one-loop Nov 30, 2026
1 check passed
@davidjalbers
davidjalbers deleted the fix/changeset-version-in-package-repos branch November 30, 2026 19:07
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.

1 participant