fix(scripts): re-spell check-changeset-no-major's older R control through renameRow - #7342
Merged
Merged
Conversation
…ough renameRow Fixes #7164 The rename-row control PR #7048 added asserted only /^R\d/.test(raw.trim()) — that the diff output begins with an R row, not which two paths git paired. PR #7157 brought the family's renameRow helper (whole-row match, pinning both paths) into this file for its own case; this control was the one spelling left behind. Re-spelled through renameRow(dir, base, '.changeset/old.md', '.changeset/new.md'), matching the shape check-empty-changeset.mjs and check-adr-0087-registration.mjs already use, and removed the now-unused raw binding. No behaviour change.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
os-help
marked this pull request as ready for review
August 10, 2026 07:39
os-help
enabled auto-merge
August 10, 2026 07:40
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 #7164
What was wrong
scripts/check-changeset-no-major.mjscarried two spellings of the same control — "git must really have scored this as a rename." The rename fixture #7048 added checked the raw diff output like this:That asserts the output begins with
Rfollowed by a digit — it does not pin which two paths git paired. If the fixture's diff ever grew a second row, the assertion would still be satisfied by the first row alone.The family standard is a whole-row match. Both siblings define a
renameRowhelper and match/^R\d+\told\tnew$/against each line (check-empty-changeset.mjs,check-adr-0087-registration.mjs), and PR #7157 brought the same helper into this file for its own case (the.changeset/README.mdbase-side guard). This one control was the leftover weaker spelling — the drift #7004 exists to prevent, in miniature.The change
Re-spelled the control through the existing
renameRowhelper, matching the shape the two siblings use, and removed the now-unusedrawbinding:No behaviour change — the fixture's diff has exactly one row, so the weaker and stronger assertions gave the same verdict before this change too. This closes the gap for when the fixture is ever extended, and brings the file back to one way of reading a rename row internally.
Assertion count (measured, not estimated)
Unchanged — one assertion re-spelled, none added or removed.
Reverse verification
Ran a mutated copy of the script (never the tracked file) with the new control pointed at the wrong new path (
.changeset/WRONG.mdinstead of.changeset/new.md). It failed exactly on that one assertion:(The other 17 failures also appear on an unmodified copy run from the same out-of-tree path — they're path-resolution artifacts of running the script outside the repo, not caused by this change; confirmed by diffing the two runs.) This is exactly the specificity the old
/^R\d/control could never have provided: it would have stayed green regardless of which second path the rename paired against.Verification
flock -w 7200 /tmp/os-heavy-verify.lock -c 'NODE_OPTIONS=--max-old-space-size=4096 pnpm check:changeset-gate-self-tests'— all three family gates green:npx eslint scripts/check-changeset-no-major.mjs --no-inline-config— exit 0.node scripts/check-nul-bytes.mjs— clean scan, 6737 tracked text files.Changeset
None, deliberately:
scripts/**-only diff, releases no package. Requestingskip-changeset, matching the precedent of #7048, #7104, #7106 and #7157.Generated by Claude Code