Skip to content

fix(changelog): use effect, because hidden does nothing - #35

Merged
GSTJ merged 2 commits into
masterfrom
fix/changelog-hidden-is-dead-config
Jul 28, 2026
Merged

fix(changelog): use effect, because hidden does nothing#35
GSTJ merged 2 commits into
masterfrom
fix/changelog-hidden-is-dead-config

Conversation

@GSTJ

@GSTJ GSTJ commented Jul 28, 2026

Copy link
Copy Markdown
Owner

style: format the repo with oxfmt is in the v1.0.12 release body, over a { type: "style", hidden: true } entry that claimed to suppress it. conventional-changelog-conventionalcommits 10 reads effect and no other field, so hidden does nothing. test was marked the same way.

It rendered as a bare bullet above Bug Fixes with no section heading, because the entry carried hidden instead of section and the writer had no group to file it under.

Reproduced by replaying the plugin's own getChangelogStream() over the same range with the repo's real config. The output matches the shipped body except for one line, the chore(release) bump commit that didn't exist yet when the real changelog ran.

hidden did nothing, and a style commit shipped in v1.0.12

Types

effect throughout, split by whether a type can change what npm hands a consumer. files is ["build", "app.plugin.js"]:

renders why
feat, fix, perf, revert the stock set
build tsconfig.build.json decides what lands in build/
refactor rewrites the source tsc emits from
chore dependency and config moves ship
docs README.md is inside the tarball
hidden why
ci .github/ isn't in files
style only build/ ships, and oxfmt over src/ cannot move what tsc emits
test tests aren't in files

ci had a section of its own until now. Everything that renders without being able to change the version is effect: "changelog", so a release of nothing but build: commits is still a patch.

commitFilter

Also removed, for the same reason. The plugin destructures preset, context, gitRawCommitsOpts, parserOpts, writerOpts and whatBump; commitFilter appears nowhere in its source.

What keeps the chore(release) bump commits out of the notes is release.yml merging the bump PR instead of squashing it, since conventional-changelog skips merge commits. Both v1.0.12's and v1.0.13's bump commits have two parents. The workflow comment credited the filter, so it now names the --merge flag as the thing doing that job.

Check

tools/changelog-check.mjs builds a throwaway repo with 12 commits, one per type, 3 of them breaking, renders it through the real preset and asserts each type renders or stays out per a policy written down longhand in the check itself. Deriving the policy from the preset would make every assertion a tautology: hide a section and the check quietly redefines what it expected.

It measures the bump too, and re-renders through a sabotaged type list, failing if that run passes. ci is hidden and the ci!: commit's breaking note still has to surface.

The config moves to .release-it.mjs so the type list can live in tools/changelog-preset.mjs and be shared. conventional-changelog-conventionalcommits is ESM-only, so a CJS config could only reach it through a dynamic import. Wired into CI, chained onto npm pack --dry-run since the shared workflow has a single extra-command.

No release

Release is workflow_dispatch only, and nothing here warrants one. Rehearsed on a throwaway clone with publish, push and the GitHub release off: 1.0.13 -> 1.0.14 with Bug Fixes and Documentation sections, zero lines removed from CHANGELOG.md.

GSTJ added 2 commits July 28, 2026 14:51
`{ type: "style", hidden: true }` never hid anything.
conventional-changelog-conventionalcommits 10 reads `effect` and no other
field, so `style: format the repo with oxfmt` shipped in the v1.0.12 release
body. It rendered as a bare bullet above Bug Fixes with no section heading,
because the entry carried `hidden` instead of `section` and the writer had no
group to file it under. `test` was marked the same way.

The list moves to `effect` throughout and follows the same rule as the other
repos: whether a type can change what npm hands a consumer. `files` is
["build", "app.plugin.js"], so `build`, `refactor`, `chore` and `docs`
render, and `ci`, `style` and `test` do not. `ci` had its own section until
now. Everything that renders without being able to change the version is
`effect: "changelog"`, so a release of nothing but `build:` commits is still
a patch.

`commitFilter` is gone too, for the same reason: the plugin destructures
`preset`, `context`, `gitRawCommitsOpts`, `parserOpts`, `writerOpts` and
`whatBump`, and the key appears nowhere in its source. Nothing was lost by it
doing nothing. What actually keeps the `chore(release)` bump commits out of
the notes is the workflow merging the bump PR instead of squashing it, since
conventional-changelog skips merge commits. Both v1.0.12's and v1.0.13's have
two parents. The workflow comment claimed the filter did it; it now says what
does.

The config moves to `.release-it.mjs` so the type list can live in
tools/changelog-preset.mjs and be shared with tools/changelog-check.mjs,
which renders a synthetic history of every type and asserts each one renders
or stays out per a policy written down longhand. It also measures the bump,
and re-renders through a sabotaged list to prove the assertions can fail.
Wired into CI.
Now that the types carry `effect`, only the `bump` ones can raise a
version, so a cycle of nothing but docs/chore/build/refactor recommends
nothing at all. release-it prints "No new version to release", exits 0
and leaves the tree alone.

The workflow read that as success and carried on: it pushed a branch at
master's head, failed to open a PR against it because there were no
commits between the two, and reported that npm and the tag were already
out when neither was. Gate the step on the version actually moving and
say so in the log instead.

The preset comment claimed a build-only release was "still a patch".
It isn't, and the check next to it already asserted otherwise.
@GSTJ

GSTJ commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

Reviewed, and merging. The hidden -> effect read is right. isTypeEffect() in conventionalcommits 10 is (type.effect || 'bump') === effect, so every entry carrying hidden counted as a bump type. Nothing was hidden.

Same 9-commit synthetic history through both type lists, with the bump each type recommends on its own:

effect hides what hidden rendered, and hidden never suppressed a bump

style: and test: could trigger a release on their own too. A cycle of nothing but style: commits recommended a patch under the old list, even with hidden: true.

That column also contradicts a line in the new preset comment, "a release of nothing but build: commits is still a patch". Under effect it's no release at all, and changelog-check.mjs asserts exactly that two files over (changelogOnly === null). Fixed the comment.

When release-it recommends nothing it prints "No new version to release" and exits 0. Land the version bump on master read that as a release: it pushed a branch at master's head, failed to open a PR because there were no commits between the two, then reported that npm and the tag were already out when neither was. Second commit gates it on the version actually moving, with a notice pointing at the increment input.

Checked the ESM move too, since a config release-it can't find would fail silently and publish with defaults. .release-it.mjs resolves through release-it 21's c12 loader: a local run with publish, push and the GitHub release off picked up requireBranch and the changelog plugin, and went 1.0.13 -> 1.0.14 with Bug Fixes and Documentation.

commitFilter removal is right. It's nowhere in the installed plugin's source, and the bump commits drop out as merge commits regardless.

@GSTJ
GSTJ merged commit 379b8b7 into master Jul 28, 2026
5 checks passed
@GSTJ
GSTJ deleted the fix/changelog-hidden-is-dead-config branch July 28, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant