chore: move validation to pre-commit and add auto changelog command
MR Title
Shift full validation to pre-commit and add npm run changelog auto-entry workflow
MR Description
This MR updates the local Git hook workflow so checks happen at commit time instead of push time, and introduces an auto changelog command for faster contributor workflow.
Changes Included
- Updated
.githooks/pre-committo run:npm run validate:stagednpm run validate
- Updated
.githooks/pre-pushto no-op (exit 0). - Added
changelogscript inpackage.json:-
npm run changelog->node scripts/updateChangelog.js --auto
-
- Enhanced
scripts/updateChangelog.js:- supports auto mode
- detects staged/working-tree changed files
- inserts generated entry under
## [Unreleased] - keeps manual
--messagemode intact
- Updated docs:
CONTRIBUTING.mdCHANGELOG.md
Validation
-
node --check scripts/updateChangelog.jspasses. - Hook scripts and docs reflect new pre-commit/pre-push behavior.
-
npm run changelogandnpm run changelog:update -- --message "..."both supported.