chore: move changelog generation to after:bump hook#18
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the release configuration in package.json by moving the changelog and documentation generation from the before:npm:release hook to a new after:bump hook. Feedback was provided regarding the change from git add -A to git add CHANGELOG.md, which may inadvertently exclude documentation updates generated during the build process from the release commit.
| "after:bump": [ | ||
| "npx auto-changelog -p", | ||
| "npm run docs", | ||
| "git add CHANGELOG.md" |
There was a problem hiding this comment.
Narrowing the git add command to only CHANGELOG.md will exclude any documentation updates generated by npm run docs from the release commit. If the documentation (e.g., a docs/ folder) is tracked in the repository and intended to be part of the release, it should be explicitly added here to ensure it stays in sync with the release tag. Since the previous configuration used git add -A, this change might lead to incomplete release commits where the documentation lags behind the version bump.
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.