Skip to content

fix: list every commit type in the release notes and CHANGELOG.md - #128

Merged
Mearman merged 3 commits into
mainfrom
fix/release-notes-all-commits
Oct 10, 2026
Merged

Mearman merged 3 commits into
mainfrom
fix/release-notes-all-commits

Conversation

@Mearman

@Mearman Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member

Releases made only of refactor, test, docs, chore and similar commits published notes and a CHANGELOG.md entry with a version header and nothing under it. The angular preset's writer returns undefined for every type except feat, fix, perf and revert (and commits with a breaking change), and release.config.ts bumps the version for all of them.

The notes now keep the angular preset's templates and heading style, and release.config.ts replaces its commit transform. Every type in commitTypes is listed under a title kept in the same table, in the table's order: Features, Bug Fixes, Performance Improvements, Reverts, Code Refactoring, Documentation, Styles, Tests, Build System, Continuous Integration, Chores. chore(release) commits are skipped, which matters for a range read by hand since it contains earlier release commits. Dependabot's chore(deps) and build(deps) commits appear. The parser also accepts feat!: the way commit-analyzer's preset does; the angular header pattern did not, so such a commit would have been dropped from the notes.

I tried the conventionalcommits preset first, since the comment in the config said it did not render. With conventional-changelog-conventionalcommits 10.2.1 under the writer 8.4.0 that @semantic-release/release-notes-generator 14.1.1 bundles it still does not: the preset's templates are functions, the writer registers them as Handlebars partials and calls them with the wrong arguments, so a release gets its section titles and no commits under them. It is also not resolvable from the repository root without a new dependency. The comment in the config is updated to say what was checked.

The generator is now a direct devDependency so release.config.unit.test.ts can run the real generator against the options in release.config.ts. Run against the config on main, five of its eight cases fail (header-only notes, no Tests section and so on); the other three pass on both.

Dry run of the generator with this config over the real ranges v2.36.3..v2.36.4 and v2.36.0..v2.36.1 gives v2.36.4 a body with its refactor, test and chore(deps) commits, and v2.36.1 a body with its one chore(deps-dev) commit; both were header-only before.

CHANGELOG.md is regenerated tag by tag with the same code (own commit). Every commit that was in an old entry is still there; the old entries are a subset of the new ones. One entry changes shape rather than content: v2.0.0 listed feat!: make the type-checked bundle ... as an untyped bullet, and it is now under Features without the prefix. Sections within an entry are now in commitTypes order instead of alphabetical, so Features comes before Bug Fixes. Some historic commit bodies in the file contain a spaced double hyphen that is carried over verbatim from the original messages.

The bodies of the existing GitHub releases are not changed by this PR; they need to be updated separately once it is merged.

Refs #127

The angular preset's transform returns undefined for every type except feat, fix, perf and
revert, so a release made of refactor, docs, test, build, ci, style or chore commits published a
version header and nothing under it.

The notes now keep the preset's templates and replace its transform: each type in commitTypes
gets a section titled from the same table, in the table's order, and chore(release) commits are
left out. The header pattern accepts a `!` after the type, as the commit analyser's does, so a
breaking `feat!:` commit is read the same way in both.

The conventionalcommits preset stays rejected: its templates are functions, which the
conventional-changelog-writer bundled with the release-notes generator does not call, so its
output has section titles with no commits under them.

The release-notes generator becomes a direct devDependency so tests can run it.
The test builds the notes through @semantic-release/release-notes-generator with the options in
release.config.ts, and asserts the exact notes for one commit of every type, a release made of
types the angular preset hides, a breaking change, issue and mention links, a release commit in
the range, and commits that are not conventional commits.

tsconfig.json now includes root test files and declaration files so the test is type-checked and
linted beside release.config.ts.
Each version's entry is rebuilt from its tag range by the release-notes configuration in
release.config.ts, so releases whose commits were all of a type the angular preset hid now list
them, and every earlier commit is carried over. Sections follow the order of commitTypes.
@Mearman
Mearman marked this pull request as ready for review October 10, 2026 06:30
@Mearman

Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-10T06:33:09.594070Z acce1bd Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: acce1bdc71

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@Mearman
Mearman merged commit 3ee647f into main Oct 10, 2026
10 checks passed
@Mearman
Mearman deleted the fix/release-notes-all-commits branch October 10, 2026 06:33
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.36.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant