You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(scripts): guard the base side of an R row against .changeset/README.md (#7107)
`check-changeset-no-major.mjs` applied `isChangesetFile()` to the HEAD path
only. The BASE path -- `fields[1]`, the pre-rename name an `R` row is read at --
was handed straight to `git show`. Git pairs renames by CONTENT rather than by
name, so under the `.changeset/*.md` pathspec an `R` row can legitimately arrive
as `.changeset/README.md -> .changeset/x.md`; the majors README appears to
declare would then be subtracted from the head file's, reporting a brand-new
whole-stack major as inherited.
Dormant today (the real README carries no frontmatter fence, so
`majorPackagesIn` returns `[]`), and the two siblings already carry this guard
since #7106. The self-test fixture therefore commits a major-shaped README so
the unguarded path really subtracts something: with the guard the row is
`introduced`, without it the same row is `exempt`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F8q5J1MQyocgtNspb15fSn
`#7107 control: git must really pair the new changeset with README.md, or this case is an ordinary \`A\` and says nothing about the base side — got ${JSON.stringify(git(['diff','--name-status',base,'HEAD','--','.changeset/*.md'],dir))}`,
1149
+
);
1150
+
const{ introduced, exempt }=scan({cwd: dir, base });
0 commit comments