Skip to content

release: revert: commits would render nothing in the changelog #434

Description

@IgorShevchik

Environment

main @ 28677edf, release-please-config.json.

Description

changelog-sections replaces the preset's default type list rather than extending it. Every type absent from ours is therefore dropped entirely — not hidden, gone.

Ours lists nine types:

feat, fix, perf, docs, test, chore, ci, refactor, build

The default list, verified by reading DEFAULT_COMMIT_TYPES in conventional-changelog-conventionalcommits@10.3.0 (src/constants.js), marks five as visible and seven as hidden:

type section default
feat, feature Features visible (effect: 'bump')
fix Bug Fixes visible
perf Performance Improvements visible
revert Reverts visible
docs Documentation hidden
style Styles hidden
chore Miscellaneous Chores hidden
refactor Code Refactoring hidden
test Tests hidden
build Build System hidden
ci Continuous Integration hidden

Two of the five visible types — revert and feature — are not in our list, so they resolve to nothing at all.

Why revert is the one that matters

A revert is precisely the news a consumer of the package has to see: something that shipped has been taken back. It is visible in the default preset for that reason, and in our configuration it would print nothing.

The six hidden types we do list are deliberate and should stay — this changelog doubles as a porting log for the fork, so docs, test, chore, ci, refactor and build are wanted. That override is correct; it just took revert with it as collateral.

Not yet a live defect

git log shows zero revert: commits in this history, so nothing published so far is missing anything. The first one would have been silently absent, with no error anywhere — the changelog would simply not mention it.

style is a separate case, and fine as-is

style is hidden in the default preset, so listing it or omitting it produce the same empty output — no action needed. For the record it has 22 uses here, all between 2024-11-26 and 2024-12-09; the practice stopped and visual changes have since gone through feat:/fix:.

Suggested fix

Add the two missing visible types, in the preset's own order so Reverts lands after Performance and above the docs/tests/chore block:

         { "type": "feat", "section": "Features" },
+        { "type": "feature", "section": "Features" },
         { "type": "fix", "section": "Bug Fixes" },
         { "type": "perf", "section": "Performance" },
+        { "type": "revert", "section": "Reverts" },
         { "type": "docs", "section": "Docs" },

Additional context

Found while writing a setup guide for the release pipeline, when a claim about the preset's defaults turned out to be wrong on checking and the check surfaced this gap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions