Repository navigation
Gather commits no release contains under an Unreleased heading - #17
Merged
Merged
Conversation
The section at the top of the changelog was only written when the version in package.json had no tag, which is true at release time because release-it bumps the version before it tags. After the release it is false, so pull requests merged between one release and the next were left out of the changelog with nothing said about them. They are now gathered under an Unreleased heading, which has no version for the prefix to belong to, and appears only when the branch has something no tag contains. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Whether a commit is beyond every tag and whether anything can be said about it are different questions. The heading was written for the first, so a commit whose pull request is still open produced a heading with "no changelog for this release" under it, which is noise: the commit is in the report either way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Everything a reader sees is a template value, so that a project can word it, or translate it, as it likes. Two strings were written into the code instead: the Unreleased heading, and the sentence for a release with nothing to list. The second is why node-saml's configuration replaces that sentence inside its release template; it can set template.noChangelog instead. Co-Authored-By: Claude Opus 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.
The bug
The section at the top of the changelog was only written when the version in
package.jsonhad no tag:That holds at release time, because
release-itbumps the version before it tags, which is why releases came out right. It stops holding the moment the tag exists. So between one release and the next, every pull request merged to master was left out of the changelog — silently, with no warning and nothing in the report.Generating for this repository right now, with
5.1.0inpackage.jsonand tagged, produced no top section at all.The fix
Commits the branch holds that no tag contains are now gathered under an
Unreleasedheading. It appears only when there is something in it, carries no version forprefixto attach to (so it reads## Unreleased, not## vUnreleased), and is never frozen, since its date is always now.The named-version section is unchanged: when
package.jsonnames a version that has no tag, that version still titles the top block, so the release flow behaves exactly as before.A warning that was wrong
semver.gtemeant the "branch already contains" warning fired in the ordinary state between releases, where the version equals a tag. It now fires only whenpackage.jsonis genuinely behind a tag the branch holds — the case where someone forgot to bump — and says what happens to the work rather than claiming it is skipped:Three existing tests changed, each for a reason
Unreleasedsection when the branch has later work. That matches how the named-version section has always behaved with--tags.head: "HEAD".Verification
129 tests with a token, 89 without. Generated against this repository from a branch one commit ahead of
v5.1.0, the output opens with## Unreleased, and the commit is reported as having no pull request — correct, since this pull request is not merged yet.🤖 Generated with Claude Code