All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Auto-create
commit-msg.yamlconfig file on install when no config exists- Creates default config at workspace root with recommended settings
- Skips creation if
commit-msg.yamlor.commit-msg.yamlalready exists - Non-fatal: warns on write failure without blocking installation
- Drop Node.js < 22 support; minimum required version is now 22.0.0
- Upgrade major dependencies: TypeScript 6, Vitest 4, commander 14, lint-staged 16
- Replace ts-node with tsx for all dev scripts (fixes ESM compatibility)
- Update TypeScript module settings to Node16 (required by TS 6)
- Simplify CI matrix to Node.js 22.x and 24.x only
- Remove
dev:compat,dev:node18,dev:node20scripts - Remove
ts-nodedependency - Remove
tsconfig.node18.json,tsconfig.node20.json,tsconfig.compat.json
- Add YAML config file support (
commit-msg.yaml/.commit-msg.yaml)- Support
add_change_id,add_co_developed_by,add_signed_off_by, andstrip_noreply_trailerssettings - YAML config takes priority over git config when present
- Support
- Add
add_signed_off_byconfiguration to automatically insertSigned-off-bytrailer- Reads identity from
git config user.nameandgit config user.email - Supported in YAML config and git config (
commitmsg.signedoffby) - Skips duplicate insertion and temporary commits (fixup!/squash!)
- Reads identity from
- Add
strip_noreply_trailersconfiguration to remove trailers with noreply emails- Comma-separated list of trailer keys to check
(e.g.,
co-authored-by,signed-off-by) - Removes matching trailers whose email contains "noreply" (case-insensitive)
- Supported in YAML config and git config
(
commitmsg.stripnoreplytrailers)
- Comma-separated list of trailer keys to check
(e.g.,
- Refactor config loading into three-layer architecture
- Split
getGitConfig()intoloadGitConfig()(git-only) andloadConfig()(unified: YAML-first, git-fallback) - Add
loadYamlConfig()for YAML config file parsing
- Split
- Add js-yaml dependency for YAML config file parsing
- Add file-based cache for auto-upgrade version checks
- Use XDG_CACHE_HOME on Linux/macOS, LOCALAPPDATA on Windows
- Respect check interval (1 hour default) to avoid frequent npm requests
- Add 6 test cases to protect auto-upgrade flow
- Replace update-notifier with direct latestVersion for reliable auto-upgrade
- update-notifier spawns async detached process; notifier.update never populated in same run
- Use latestVersion() for synchronous fetch within the same process
- Change default update check interval from 8 hours to 1 hour
- Use npm install -g @latest instead of npm update -g to force latest version
- npm update may report "up to date" without actually upgrading
- Fix auto-upgrade updating wrong installation (global vs local node_modules)
- Detect if running from project's node_modules; update the correct installation
- Add cwd when spawning local npm install for project updates
- Fix "version still old" after upgrade when running from local project
- Remove update-notifier and @types/update-notifier dependencies
- Add Cursor agent support via
CURSOR_AGENT=1environment variable - Add
removevalue for commit-msg.codevelopedby to strip matching AI trailers without adding Co-developed-by (skips fixup!/squash!)
- Filter made-with trailer when adding Co-developed-by
- Add Antigravity IDE support
- Add
__CFBundleIdentifier(com.google.antigravity) andANTIGRAVITY_AGENTenvironment variable detection - Enable tracking contributions from Antigravity IDE
- Add comprehensive test coverage for Antigravity environment variables
- Add
- Match duplicate trailers by username instead of full user info when adding Co-developed-by
- Previously compared full "Name " string, causing Cursor noreply@cursor.com and Cursor cursoragent@cursor.com to be treated as different users
- Now compare only the username part and ignore the email for deduplication
- Both usernames must be non-empty; correctly deduplicate same-identity different-email trailers
- Add extractUsernameFromTrailer function and test cases for Cursor scenario
-
Add Codex AI coding tool support
- Add CODEX_MANAGED_BY_NPM and CODEX_MANAGED_BY_BUN environment variable detection
- Enable tracking contributions from Codex AI coding tool
- Add comprehensive test coverage for Codex environment variables
-
Add OpenCode AI coding tool support
- Add OPENCODE environment variable detection
- Enable tracking contributions from OpenCode AI coding tool
- Add comprehensive test coverage for OpenCode environment variable
-
Refactor AI tool detection to use modular config files
- Move from hardcoded array to individual configuration files for each AI tool
- Support tool type classification (CLI, PLUGIN, IDE, OTHERS) with priority ordering
- Improve maintainability and extensibility for adding new AI tool support
- Each tool now has its own configuration file with type, userName, userEmail, and envVars
- Improve Node.js version compatibility
- Use tsx for Node.js 21+ to resolve ESM module resolution issues
- Update script selection logic to handle Node.js 21+ correctly
- Update compatibility documentation and test scripts
-
Fix ESM module resolution issues in Node.js 22+
- Replace ts-node with tsx for Node.js 22+ development mode
- Resolve "Cannot find module" errors in clean environments
- Ensure development mode works correctly across all supported Node.js versions
-
Fix unstable status checks in hook tests
- Add debug output to help diagnose test failures
- Remove environment-dependent status checks that were causing test instability
- Keep important assertions about warning messages in stderr
-
Enhance npm pack tests with comprehensive installed package tests
- Add tests for all CLI commands (install, exec, check-update, --help)
- Add tests for core functionality in installed package
- Add module import and configuration loading tests
- Add Git integration tests in real Git repository
-
Add production build tests to verify compiled code
- Verify module import and configuration loading from compiled code
- Ensure consistency between development and production builds
- Test functionality of getCoDevelopedBy() with various environment variables
- Avoid treating non-trailer lines like "Solution: ..." as signatures
- Require a hyphen in trailer tokens to prevent false positives
- Add tests for non-trailer colon lines
- Add qoder-cli support
- Add QODER_CLI environment variable detection
- Enable tracking contributions from Qoder CLI tool
- Improve code coverage with comprehensive test cases
- Add extensive test cases for uncovered lines in exec.test.ts
- Add test coverage for clearCoDevelopedByEnvVars function
- Add test cases for filterDuplicateTrailers edge cases
- Add comprehensive test suites for utility functions
- Add error handling test cases for install command
- Configure vitest coverage reporting with v8 provider
-
Make install command the default when no arguments provided
- When no arguments are provided, the install command will be executed by default
- Improves user experience by reducing the need to remember the install command
-
Implement automatic hook upgrade functionality
- Add COMMIT_MSG_HOOK_VERSION and COMMIT_MSG_HOOK_PATH environment variables to hook template
- Implement dynamic version checking in exec.ts that parses version from template file
- Automatically regenerate outdated hooks
- Ensure hooks are automatically upgraded to match the current template version when the package is updated
- Reuse handleInstallCommand and handleExecCommand functions
- Refactor code to reuse command handler functions for better maintainability
- Consolidate duplicated logic in command implementations
- Improve merge commit detection logic
- Enhance the algorithm for detecting merge commits
- Provide more accurate detection of merge commits during hook execution
- Add direct execution mode for commit-msg hook
- Allow direct execution of commit-msg logic without installing as a Git hook
- Improve flexibility for different usage scenarios
- Use minimatch for env var glob matching
- Replace custom glob matching implementation with minimatch library
- Improve reliability and consistency of environment variable matching
-
Improve cursor/qoder detection in SSH/DevContainer
- Fix issue with cursor/qoder detection when running in SSH or DevContainer environments
- Enhance compatibility with different development environments
-
Set --verbose as default for check-update command
- Make check-update command verbose by default for better user feedback
- Improve visibility of update checking process
- Implement duplicate trailer filtering for Co-developed-by
- Filter out duplicate trailers that have the same user info as the CoDevelopedBy trailer
- Prevent duplicate entries when AI tools add both Co-developed-by and Signed-off-by trailers
-
Enhance Change-Id generation with timestamp and timezone info
- Include timestamp and timezone information in Change-Id generation for better uniqueness
- Improve Change-Id generation to be more robust and unique
-
Enhance merge commit detection and add comprehensive tests
- Improve merge commit detection logic to be more accurate
- Add comprehensive test coverage for merge commit detection scenarios
-
Resolve -v flag conflict between --version and --verbose
- Fix conflict where -v was being interpreted as --verbose instead of --version
- Ensure -v flag works correctly for version display
-
Prevent update-notifier from updating timestamp in checkForUpdatesOnly
- Fix issue where checkForUpdatesOnly was incorrectly updating the last update check timestamp
- Ensure checkForUpdatesOnly only checks for updates without modifying timestamps
- Add support for commit-msg and commitmsg configuration prefixes
- Add
commit-msg.changeidandcommitmsg.changeidas alternatives togerrit.createchangeid - Add
commit-msg.codevelopedbyandcommitmsg.codevelopedbyas alternatives tocommit-msg.coDevelopedBy - Provide more consistent naming and better alignment with the tool name
- Add
- Add comprehensive documentation for all configuration options in README.md
- Optimize getGitConfig to use single git config call with --list --includes
- Improve merge commit detection in commit-msg hook
- Change from checking HEAD commit parents to checking if the commit message file is '.git/MERGE_MSG'
- Provide more reliable way to detect merge commits during the commit-msg hook execution
- Add COMMIT_MSG_TEST_NO_GLOBAL_HOOKS environment for test stability
- Do not check local .githooks dir
- Remove the hook file before writing
- Add support AI coding tools: iFlow and Kiro
- Add scissors line detection for commit message processing
- Detect Git scissors lines (
>8and8<) in commit messages - Stop processing commit message content when scissors line is found
- Support various scissors line formats with dashes and whitespace
- Only match exact patterns:
>8or8<(not>9,7<, or with extra text) - Add comprehensive test coverage for scissors line scenarios
- Detect Git scissors lines (
-
Improve error handling to avoid stack trace display
-
Fix empty commit message handling
- Do not process empty commit messages, let Git handle commit rejection
- Return empty message with
shouldSave: falsefor empty content - Maintain Git's expected behavior for empty commit rejections
-
Fix Signed-off-by only message handling
- Detect commit messages containing only Signed-off-by lines and empty lines
- Return empty message with
shouldSave: falsefor signature-only commits - Prevent processing of template-only messages when using
git commit -s
-
Add global
--verboseparameter support- Add global
--verboseoption to main program for consistent verbose output - Support parameter priority: command
--verbose> global--verbose> environment variable - Create
getVerboseMode()helper function for unified verbose handling - Maintain backward compatibility with
COMMIT_MSG_VERBOSEenvironment variable
- Add global
-
Add automatic version checking and upgrade functionality
- Implement
update-notifierintegration for checking package updates - Add
checkAndUpgrade()function for automatic version checking and upgrading - Add
checkForUpdatesOnly()function for checking updates without upgrading - Add
check-updatecommand for manual update checking - Support
UPDATE_CHECK_INTERVALenvironment variable for custom check intervals (default: 24 hours) - Add verbose output support for version checking operations
- Implement
-
Add
UPDATE_CHECK_INTERVALenvironment variable support- Allow customizing update check interval in seconds via
UPDATE_CHECK_INTERVALenv var - Default to 24 hours if not specified
- Support decimal formatting for time display (max 4 decimal places, remove trailing zeros)
- Apply to both
checkAndUpgradeandcheckForUpdatesOnlyfunctions
- Allow customizing update check interval in seconds via
-
Improve error handling and update check integration
- Remove duplicate
checkAndUpgradecalls in error handling paths - Ensure update checks run on both successful and failed command executions
- Add
exitOverrideto Commander.js for handling parsing errors with update checks - Improve error propagation to allow update operations before exit
- Remove duplicate
-
Enhance verbose output for version checking
- Add detailed logging for update check intervals and cache status
- Improve time formatting with proper decimal precision
- Add verbose output support for
check-updatecommand - Show comprehensive update information when verbose mode is enabled
-
Resolve npm upgrade hang issue after successful installation
- Add
--yes --forceflags to npm update commands for non-interactive execution - Set
npm_config_yes,npm_config_force, andCIenvironment variables in spawn options - Implement proper process cleanup with resolved flag and exit event handling
- Fix timeout handling to prevent hanging after successful npm operations
- Add
-
Fix command execution error handling
- Replace
process.exit(1)withthrow errorin command catch blocks - Ensure update checks are triggered even when commands fail with missing arguments
- Improve error handling flow to maintain update check functionality
- Replace
- Add
-vshort parameter support for version display- Support both
commit-msg -vandcommit-msg --versioncommands - Provide more convenient way to check version information
- Add comprehensive test coverage for short parameter functionality
- Support both
- Update Commander.js version configuration to support both short and long parameters
- Enhance test suite with additional version parameter tests
- Add comprehensive test suite for commit-msg.hook template
- Improve commit-msg hook template with enhanced debug capabilities
- Add Qwen Code commit detection via environment variable
- Detect commits initiated by Qwen Code v0.0.8 or higher through QWEN_CODE=1
- Enable tracking contributions from the Qwen Code AI assistant
- Remove wildcard environment variable matching logic
- Simplify environment variable matching by removing special case handling for '*'
- Remove obsolete wildcard tests for CLAUDECODE and QWEN_CODE
- Maintain compatibility with CURSOR_TRACE_ID wildcard configuration
- Ensure package compatibility with Node.js 18+ for npm publishing
- Update package configuration and build settings for Node.js 18+ compatibility
- Fix issues that prevented successful npm publishing
- Add merge commit detection to skip processing
- Automatically detect merge commits and skip Change-Id generation
- Improves workflow when merging branches with existing Change-Ids
- Improve GitHub Actions workflows
- Add workflows for testing, building, and publishing
- Add check for bad whitespaces in CI
- Fix Node.js 20.x compatibility issues
- Remove duplicate template files
- Clean up redundant template files in the repository
-
Ensure compiled bin files have executable permissions
- Created custom build script that sets executable permissions on compiled bin files
- Fixed issue where commit-msg command was not executable after npm pack or npm publish
- Added scripts/build.js with custom build logic
- Updated package.json build script to use new build process
- Build script now explicitly sets executable permissions on bin files
-
Run prepack instead of postinstall for release
- Remove postinstall script that required tsc during installation
- Call "npm run build" by introducing new prepack stage
- Add files section to package.json to ensure proper distribution
- Fixes the issue where users would get 'tsc not found' error when installing the package globally
- Support installing commit-msg hook outside git repository with global core.hooksPath
- Check for global core.hooksPath when not in a Git repository
- Install hook in global hooks directory if set
- Add proper error handling for relative paths
-
Ensure build process doesn't depend on globally installed TypeScript
- Resolved
tsc: command not founderror during package installation by changing build script in package.json to usenpx tscinstead of directly callingtsc - This ensures that the TypeScript compiler is properly located even when it's not globally installed
- Resolved
-
Addressed compatibility issue with
@types/nodedependency- Changed dependency from
^24.3.0to^22.0.0for better Node.js version compatibility - Using Node.js 22.x (LTS) instead of Node.js 24.x (future version)
- Changed dependency from