Repository navigation
chore(release): stamp the changelog heading during the release - #71
Merged
Merged
Conversation
`bun run release` stopped at the GitHub release unless CHANGELOG.md already had a `## <version>` heading, which had to be renamed from `## Unreleased` by hand first - and by then npm was published and the tag pushed. Now release-it does it, as the other libraries' release commands do everything but ask for the bump: - before:init: stamp-changelog.mjs --check stops the release before anything happens when `## Unreleased` is missing or empty. - after:bump: stamp-changelog.mjs <version> renames it to the new version. It runs before release-it stages the package for the release commit and before changelog-section.mjs reads the notes, so the rename goes out with "chore: release nitro-input v<version>". The changelog stays hand-written (the other libraries generate theirs from commits with @release-it/conventional-changelog; here the entries carry the why and the measurements, and in this monorepo the commits include the example app's and CI's). 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.
bun run releasenow does everything; the only question it asks is the version bump, as in your other libraries.Before, it stopped at the GitHub release step unless
CHANGELOG.mdalready had a## <version>heading. That heading had to be renamed from## Unreleasedby hand, and by the time it failed, npm was already published and the tag pushed.Now, via release-it hooks:
before:init:stamp-changelog.mjs --checkstops the release before anything happens if## Unreleasedis missing or empty.after:bump:stamp-changelog.mjs <version>renames## Unreleasedto the new version. In release-it 21 this runs before the package is staged for the release commit and beforechangelog-section.mjsreads the notes. So the rename ships in "chore: release nitro-input v…", and the GitHub release gets that section.Why the changelog stays hand-written: the other libraries generate theirs from commits with
@release-it/conventional-changelog. Here the entries carry the reasons and measurements, and in this monorepo the commit log would also pick up example-app and CI commits.Tested on a copy of the current changelog:
## 0.4.0, andchangelog-section.mjs 0.4.0returns that section.🤖 Generated with Claude Code