Repository navigation
fix(release): the changelog formatter keeps a Changeset's list of details under its entry - #11630
Conversation
…ails under its entry
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested: the formatter fix itself is correct, but two statements in the pull request description are not accurate.
- The overlap check says nothing touched
splitBulletsafter #2981, but #4999 rewrote its blank-line handling (it addedcontinuesAfterBlank), so please correct that sentence. - The description and the test comment at
scripts/format-changelogs.test.mjs:159say the test uses the v0.7.16 Changeset "as written", but it is abridged from.changeset/experimental-theme-colors14.md(the first detail is cut short and two of its five details are left out), so please say "abridged from" or paste the whole Changeset.
The one-line rule change keeps every detail under its entry: the new test fails on main and passes here, and replaying the v0.7.16 CLI Changesets through the new formatter reproduces the corrected changelog with no "Other Changes" section.
Claims and files checked
- Claim: v0.7.16's Version Packages pull request filed 119 detail lines from 29 experimental theme entries under "Other Changes". Verified: #11618's first commit did, and its correction commit moves the same 119 lines under their entries.
- Claim:
renderReleaseLineindents an entry's body two spaces. Verified:scripts/changeset-entry-format.cjs:146-151. - Claim: on
main,splitBulletsopened an entry on any indented or unindented-. Verified:scripts/format-changelogs.mjs:86onmain. - Claim: a detail with no category of its own lands under "Other Changes". Verified:
scripts/format-changelogs.mjs:186,scripts/changeset-entry-format.cjs:40. - Claim:
splitBulletsnow opens an entry only on an unindented-, andreflowBulletBodykeeps sub-bullets on their own lines. Verified:scripts/format-changelogs.mjs:90,:163-168. - Claim: the test renders a real v0.7.16 Changeset through
parseEntryandrenderReleaseLine, the release's own path. Verified:scripts/format-changelogs.test.mjs:172,.changeset/changelog.cjs. Claim that it is "as written": false (abridged). - Claim: the test requires the details nested and no "Other Changes" heading. Verified:
scripts/format-changelogs.test.mjs:181-188. - Claim: already formatted sections are not reprocessed. Verified:
scripts/format-changelogs.mjs:276-280; the drift check passes on this head. - Claim: v0.7.16's changelog is corrected separately and this pull request does not touch it. Verified: no changelog in the diff.
- Claim: the new case fails on
main(the entry is followed by#### Fixes) and passes here, with 20 tests passing across the two test files. Verified by running both. - Claim: no open pull request overlaps (#11503 pages the docsite changelog). Verified by searching open pull requests.
- Claim:
.changeset/changelog.cjslast changed in #2981. Verified. Claim that nothing touchedsplitBulletssince: false (#4999). - Claim: no Changeset is needed for release tooling under
scripts/. Verified: the root package is private. - Process and landing notes: not code claims.
- File
scripts/format-changelogs.mjs: clear. - File
scripts/format-changelogs.test.mjs: the "as written" comment at line 159.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, and the merge guard still needs it green.
Both points from the earlier review are fixed: the description now traces splitBullets through #4999, and the description and the test comment both say the Changeset is abridged. The one-line rule change keeps a Changeset's listed details under their entry; the new test fails on main and passes here.
Claims and files checked
- Claim: v0.7.16's Version Packages pull request filed 119 detail lines from 29 experimental theme entries as top-level bullets under "Other Changes". Verified: #11618's first commit did, and its correction commit moves the same 119 lines under their entries.
- Claim:
renderReleaseLineindents an entry's body two spaces. Verified:scripts/changeset-entry-format.cjs:146-151. - Claim: on
main,splitBulletsopened an entry on any indented or unindented-. Verified:scripts/format-changelogs.mjs:86onmain. - Claim: a detail with no category of its own lands under "Other Changes". Verified:
scripts/format-changelogs.mjs:186,scripts/changeset-entry-format.cjs:40. - Claim:
splitBulletsnow opens an entry only on an unindented-, andreflowBulletBodykeeps sub-bullets on their own lines. Verified:scripts/format-changelogs.mjs:90,:163-168. - Claim: the test renders a Changeset abridged from
.changeset/experimental-theme-colors14.md(its headline and three of its five details) throughparseEntryandrenderReleaseLine, the release's own path. Verified:scripts/format-changelogs.test.mjs:159-172,.changeset/changelog.cjs. - Claim: the test requires the details nested and no "Other Changes" heading. Verified:
scripts/format-changelogs.test.mjs:181-188. - Claim: already formatted sections are not reprocessed. Verified:
scripts/format-changelogs.mjs:276-280; the drift check passes on this head. - Claim: v0.7.16's changelog is corrected separately and this pull request does not touch it. Verified: no changelog in the diff.
- Claim: the new case fails on
main(the entry is followed by#### Fixes) and passes here, with 20 tests passing across the two test files. Verified by running both. - Claim: no open pull request overlaps; #11503 pages the docsite changelog. Verified by searching open pull requests.
- Claim:
.changeset/changelog.cjsand the entry format last changed in #2981. Verified: the entry module later gained only the experimental category row. - Claim:
splitBulletslast changed in #4999, which kept multi-paragraph entries whole and did not change which lines start an entry. Verified: #4999 kept the indented-dash rule, and later commits touched only the file header. - Claim: no Changeset is needed for release tooling under
scripts/. Verified: the root package is private. - Process and landing notes: not code claims.
- File
scripts/format-changelogs.mjs: clear. - File
scripts/format-changelogs.test.mjs: clear.
There was a problem hiding this comment.
Approved. CI has passed on this head.
The column-0 entry rule keeps a Changeset's list of details under its own entry: the new case fails against main's formatter and passes here, the same input survives the Prettier pass Changesets applies before the formatter runs, and the drift check still passes, also with this branch merged into today's main. A note for later, not for this pull request: reflowBulletBody flattens a list nested two levels deep to one level, so deeper structure in a Changeset is still lost, though its lines stay under the right entry.
Claims and files checked
- v0.7.16's generated changelog filed 119 detail lines from 29 experimental theme Changesets as separate entries under Other Changes: verified against that release's generated commit.
- The entry renderer indents a Changeset's body two spaces, and the old split rule opened an entry on any dash, indented or not: verified in both scripts.
- A detail with no category of its own fell to Other Changes: verified in the bullet parser's default category.
- The new rule opens an entry only on an unindented dash, and the reflow step keeps sub-bullets on their own lines: verified.
- The test's Changeset is abridged from a v0.7.16 Changeset (its headline and three of its five details) and runs through the release's own parse and render functions: verified.
- The test requires the details nested and no Other Changes heading, and fails on
mainwith the entry followed straight by the Fixes heading: reproduced. - The formatter tests (12) and the version-packages tests (8) pass, 20 in all: reproduced.
- Already formatted sections are not reprocessed, and v0.7.16's changelog is untouched: verified (the drift check passes; no changelog file in the diff).
- No open pull request overlaps; the changelog module and entry format last changed in #2981, and the split rule's last change (#4999) kept which lines start an entry: verified from history and an open pull request search.
- No Changeset is needed for root release tooling: verified (the root package is private).
scripts/format-changelogs.mjs: clear.scripts/format-changelogs.test.mjs: clear.
|
/approve-spec dd8f7e2 |
Who this helps
People who read a release's changelog. When a Changeset lists its details as a Markdown list under its headline, each detail is supposed to stay under its entry. In v0.7.16's Version Packages pull request (#11618), 119 detail lines of 29 experimental theme-editor entries came out as top-level bullets under "Other Changes", detached from the entries they belong to.
Cause
renderReleaseLine(scripts/changeset-entry-format.cjs) writes an entry's body two spaces in, so a Changeset's- detaillist arrives as- detailunder its- [category] headline. The post-version formatter'ssplitBullets(scripts/format-changelogs.mjs) started a new entry on any line matching/^\s*-\s+/, indented or not. So each detail became an entry of its own; with no category of its own, it landed under "Other Changes".What changes
splitBulletsstarts an entry only on an unindented-. An indented-stays in the current entry's body, wherereflowBulletBodyalready keeps sub-bullets on their own lines..changeset/experimental-theme-colors14.md: its headline and three of its five details) throughparseEntryandrenderReleaseLine, the release's own path, and requires its details nested under the entry and no "Other Changes" heading.This changes how the formatter splits entries on release branches. Already-formatted changelog sections are not reprocessed, and v0.7.16's changelog is being corrected by the release owner, so this pull request does not touch it.
Red-first
main#### Fixesheading; its three details became separate entriesscripts/format-changelogs.test.mjs12/12 andscripts/release/version-packages.test.mjspass (20 tests)Overlap check
Searched open and merged pull requests for the changelog formatter and for sub-bullet or nested-detail changes: none open (the only open changelog pull request, #11503, pages the docsite's changelog).
.changeset/changelog.cjsand the entry format last changed in #2981.splitBulletslast changed in #4999, which kept multi-paragraph entries whole across blank lines (continuesAfterBlank); it did not change which lines start an entry.Release notes
None: release tooling under
scripts/, not a published package, so no Changeset.Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the shipper, through merge-guard.