Follow semantic versioning (MAJOR.MINOR.PATCH) for all commits:
- PATCH (0.0.X) - Bug fixes, documentation updates, minor changes
- MINOR (0.X.0) - New features, API additions, significant enhancements
- MAJOR (X.0.0) - Breaking changes, major architecture changes
For every commit:
-
Determine version type based on changes:
- Fix/docs/refactor → PATCH
- New feature/enhancement → MINOR
- Breaking change → MAJOR
-
Update package.json version manually (don't use
npm version
to avoid auto-tags) -
Update package-lock.json safely:
# Option 1: Use pnpm (recommended - more reliable) pnpm install # Option 2: Manual edit (be precise) # Only change the "version" field at the top, NOT lockfileVersion or dependency versions # Example: "version": "0.1.1" → "version": "0.1.2"
-
Update documentation:
- README.md: Update if features, installation, or usage instructions changed
- CHANGELOG.md: Log all changes with proper semantic versioning format
-
Commit with semantic message:
git add package.json package-lock.json README.md CHANGELOG.md [other-files] git commit -m "fix: correct API endpoint validation - Add proper input validation for article refresh endpoint - Fix type safety issues in WordPress GraphQL client - Update error handling for malformed requests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>"
Follow this format for CHANGELOG.md
entries:
# Changelog
## [0.1.2] - 2024-06-25
### Fixed
- Correct API endpoint validation for article refresh
- Fix type safety issues in WordPress GraphQL client
- Update error handling for malformed requests
### Added
- [if any new features]
### Changed
- [if any modifications to existing features]
### Removed
- [if any features were removed]
## [0.1.1] - 2024-06-24
...
<type>: <description>
[optional body]
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Commit Types:
feat:
- New feature (MINOR bump)fix:
- Bug fix (PATCH bump)docs:
- Documentation changes (PATCH bump)style:
- Code style changes (PATCH bump)refactor:
- Code refactoring (PATCH bump)perf:
- Performance improvements (MINOR bump)test:
- Adding/updating tests (PATCH bump)chore:
- Maintenance tasks (PATCH bump)BREAKING CHANGE:
- Breaking changes (MAJOR bump)