Repository navigation
fix(changesets): stop re-formatting release notes that already shipped - #1739
Merged
Merged
Conversation
`changeset version` re-printed the whole of `CHANGELOG.md` through Prettier on every run, because Prettier is on unless a project turns it off and `.changeset/config.json` never set the key. Prettier re-pairs emphasis delimiters across a paragraph, so an underscore inside a field name pairs with the underscore of a nearby italic span and both are re-emitted with the wrong delimiters. The command exits 0 and the churn hides inside a several-thousand line addition. Set `prettier: false`, so a release section is written once and is never re-formatted afterwards. It had already cost the repo one shipped line: the generated 3.0.0 notes say the renewal task writes `due*date` and `related_to*\*`, where the changeset that produced them (`.changeset/activities-recurring-example.md`, authored at 3ec9feb) said `due_date` and `related_to_*`. That line is repaired back to what the release actually said — the one hand-edit of the generated region the #1602 ruling authorises, because the generator is what broke it. Measured on a throwaway copy, not read out of the docs: with Prettier on, `changeset version` rewrites four further lines of the shipped 3.0.0 section (`forecast_category` -> `forecast*category`, `is_active` -> `is*active`, and the italic spans either side of them); with `prettier: false` the entire pre-existing file comes back byte-identical. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TezFG8ZMrNH6n5VTNpPpdH
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Sep 7, 2026
os-zhuang
marked this pull request as ready for review
September 7, 2026 14:10
os-zhuang
pushed a commit
that referenced
this pull request
Sep 7, 2026
#1739 landed on main as a squash (e735d00), so this branch's own copy of it (465dad2) is no longer an ancestor of main and the two sides collide. One file conflicted: `.changeset/config.json`. Both sides edit the formatter switch. main writes `prettier: false`; under @changesets/cli 3.x that key is removed — it is accepted in silence, produces no warning, and formatting falls back to its `format: "auto"` default, which is exactly the re-mangling of published release notes that #1739 set out to stop. This branch's `format: false` is what carries #1739's intent forward, so it is what the merge keeps, together with `privatePackages: { version: true, tag: false }` and the `$schema` bump to @changesets/config@4.0.0. Verified against the installed @changesets/config 4.0.0 rather than by reading: `readConfig()` on the merged tree resolves `format: false` and `privatePackages: {version: true, tag: false}` with no errors and no warnings. The control — main's side of the hunk through the same 4.0.0 validator — resolves `format: "auto"` and `privatePackages: {version: false, tag: false}`, silently. CHANGELOG.md and `.changeset/changeset-version-stops-rewriting-published-notes.md` merged clean and byte-identical to main: #1739's `due_date` / `related_to_*` repair is present exactly once, and there is one changeset for that fix, not two. pnpm-lock.yaml did not conflict (main never touched it) and stays as the branch resolved it; `pnpm install --frozen-lockfile` reports the lockfile up to date. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TezFG8ZMrNH6n5VTNpPpdH
This was referenced Sep 7, 2026
This was referenced Sep 7, 2026
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
changeset versionre-printed the whole ofCHANGELOG.mdthrough Prettier on every run,silently rewriting release notes that had already shipped. This sets
prettier: falsein.changeset/config.json(option A of the ruling in #1602 comment 5565948014,maintainer 「同意」), and repairs the one line the generator had already broken.
Type of Change
Related Issues
Fixes #1602
Related to #1503 · #1443
Changes Made
.changeset/config.json: adds"prettier": false. The generated region becomeswrite-once — the generator no longer re-formats what it already wrote.
CHANGELOG.md: repairs one line of the published## 3.0.0section back to thetext the release actually said. This is the single authorised hand-edit of the
generated region (ruling item 2).
.changeset/changeset-version-stops-rewriting-published-notes.md: the changeset.Ruling item 2 asked for four lines to be repaired:
CHANGELOG.md:4176,:4178,:5236,:5237on81a79ee. Re-anchored before editing, they were already correct, and theystill are on this branch's base
b760fb08at the same four line numbers:That is the
beforecolumn of #1602's own table. Those four lines are what the nextrun mangles — the card measured them by running
changeset versionand restoring — sowith
prettier: falsethere is nothing to repair there: they can no longer be reached.A repo-wide scan for the mangling signature confirms it. One line, and only one, carries
generator damage today:
Proved to be the generator's damage rather than the author's text: the changeset that
produced that paragraph,
.changeset/activities-recurring-example.mdas authored at3ec9feba, saysdue_date / owner_id / related_to_*. The 3.0.0 generation emitteddue*dateandrelated_to*\*. It does not appear in the card's table because it isalready a Prettier fixed point, so a further run leaves it alone — it is damage that has
shipped and stays shipped until repaired by hand.
The repair is squarely inside the ruling's authorisation and its stated reason ("published
release text is never silently rewritten — this repairs a silent rewrite back to what was
published"); only the line number moved. No other line of the generated region is touched.
Testing
Both probes ran on a throwaway worktree, were restored, and the restore is proven by blob
hash. ⛔ Neither run's output is committed.
Before — Prettier on (config sets no key), tree at
b760fb08:and what replaced them, at their new positions in the rewritten file:
Exactly the four rewrites #1602 tabulated, reproduced independently. Restore:
git hash-object CHANGELOG.md=877ec8d4…=git rev-parse HEAD:CHANGELOG.md,git diff HEADempty.After —
prettier: false, tree at this branch's commit465dad24:One hunk, zero deletions — a pure prepend of the new section under the
# Changelogtitle. The pre-existing region is byte-identical, not merely diff-clean:
Restore:
git hash-object CHANGELOG.md=4e301190…=git rev-parse HEAD:CHANGELOG.md,git diff HEADempty,git statusclean.pnpm verify— green, run in two locked calls on the shared box, in the chain's ownorder (
validate → typecheck → lint → lint:i18n-gate → hygiene → hygiene:tokens, thenbuild → test):pnpm test)pnpm lint)pnpm build)pnpm validate,pnpm lint:i18n-gate,pnpm hygiene,pnpm hygiene:tokenspassRuling item 3 — the stranded preamble at
:9007stays where it isThe ruling permits moving it "if the dev judges it a one-hunk change". It is not one. The
preamble is a single line ~9,000 lines below the title, so moving it is a deletion hunk at
:9007and an insertion hunk at:2— two hunks by construction. It also sits inside thegenerated
## 3.0.0region (which ends at:9008, immediately above the## Pre-3.0.0 hand-written historyheading), so moving it would be a second hand-editof that region, and the ruling authorises exactly one. Left alone, and said so — the
remaining half of #1443's observation is still open.
Checklist — the changeset, and why
'hotcrm': patchrather than empty frontmatterThere is no
scripts/check-changeset-*in this repo; the decision source is.github/workflows/changeset-check.ymlplus the split already in.changeset/(148entries: 76 with empty frontmatter, 72 versioned). The documented boundary in the
empty-frontmatter entries is "ships nothing to HotCRM users; no
src/metadata changed".This one ships something to users:
CHANGELOG.mdis the artifact HotCRM publishes,and the repaired line is text a reader of the 3.0.0 notes has already been given. HotCRM
is the reference implementation other marketplace apps fork, so a release note naming
due*date— a column that does not exist — is precisely the error that gets copied.The release-notes reader is entitled to be told it was wrong and is now right. Hence a
versioned
patchentry, matching the repo's other corrections-to-published-prose entries.Additional Notes
@changesets/cli3.x replaces theprettierkey withformat, so the key this PR sets stops existing at the bump. #1264must not merge until #1503 sets the off-equivalent under the new name; otherwise this
fix is silently undone and the next release re-mangles the four lines above.
Generated by Claude Code