Repository navigation
fix(release): no blank line between changelog entries after a fold or a fragment collect - #708
Merged
Merged
Conversation
… a fragment collect collectFragments kept the blank lines inside a fragment's body and between two copies of the same ### heading in the dated section. A blank line before "- " split one list in two (ydisk 0.3.0's Fixed), and a repeated heading left two blank lines in a row. foldUnreleased had the same gap for an Unreleased body. Both now join a heading's bodies with joinBodies: each body trimmed, and a blank line kept only inside an entry, before its indented next paragraph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Task
bin/releasefoldschanges/*.mdfragments (and an## Unreleasedbody) into the dated version's section. The result could carry a wrong blank line.Why
Seen in ydisk-cli 0.3.0: the fragment
changes/feat-mirrors.mdhad a blank line between two### Fixedentries, andcollectFragmentscopied it, so the released Fixed list was split in two (fixed by hand in ydisk291fb2d). A second case: when the dated section repeats a###heading (a PR branched before the fold, applied by git under the dated heading),collectFragmentstrimmed only the ends of the joined body, so two blank lines in a row stayed between the copies.What
joinBodiesinsrc/release/fold.ts: trims each body of a heading, then drops a blank line that comes right before a-entry. A blank line inside an entry, before its indented next paragraph, stays.foldUnreleased,mergeRepeatedHeadingsandcollectFragmentsuse it; the copy oftrimBlankinfragments.tsis gone.Testing
pnpm typecheck,pnpm lint,pnpm docs:check,vitest run src/release src/dev(287 tests) pass locally.🤖 Generated with Claude Code