Skip to content

chore: move changelog generation to after:bump hook#91

Open
jgs-jeeves wants to merge 1 commit into
mainfrom
chore/fix-release-it-changelog-hook
Open

chore: move changelog generation to after:bump hook#91
jgs-jeeves wants to merge 1 commit into
mainfrom
chore/fix-release-it-changelog-hook

Conversation

@jgs-jeeves
Copy link
Copy Markdown
Collaborator

Move auto-changelog generation from before:npm:release to after:bump so the updated CHANGELOG.md is included in the release commit and tag. Also narrows git add -A to git add CHANGELOG.md to avoid staging unrelated files.

@jgs-jeeves jgs-jeeves requested a review from karmaniverous May 6, 2026 01:06
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the release workflow in package.json by replacing the before:npm:release hook with an after:bump hook for generating the changelog and documentation. A review comment identifies that the new git add command only stages CHANGELOG.md, which would omit the generated documentation files from the release commit, and suggests explicitly adding the docs directory to the staging command.

Comment thread package.json
Comment on lines +114 to 118
"after:bump": [
"npx auto-changelog -p",
"npm run docs",
"git add CHANGELOG.md"
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The after:bump hook includes npm run docs, which generates documentation in the ./docs/ directory (as specified in typedoc.json). By narrowing git add -A to git add CHANGELOG.md, the updated documentation files are no longer staged for the release commit.

If these docs are intended to be versioned in the repository (e.g., for GitHub Pages), they should be explicitly added. Otherwise, they will remain as unstaged changes and won't be included in the release tag or the release/${version} branch created in the after:release hook.

Suggested change
"after:bump": [
"npx auto-changelog -p",
"npm run docs",
"git add CHANGELOG.md"
]
"after:bump": [
"npx auto-changelog -p",
"npm run docs",
"git add CHANGELOG.md docs"
]

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