Conventional Commits & Semantic Versioning Matrix
The definitive Conventional Commits specification cheat sheet: commit types, scopes, breaking change syntax, automated changelog generation, and SemVer rules with 1-click copy.
Commit Types (8 commands)
feat: add user dark mode toggle and persistence
Introduces a new user-facing feature or API capability to the codebase.
fix: resolve race condition in token refresh loop
Patches a bug, regression, or crash in production code.
chore: bump dependencies and remove deprecated polyfills
Routine maintenance, dependency updates, and tooling tasks that do not affect production logic.
refactor: simplify database connection pool retry logic
Code refactoring that neither fixes a bug nor adds a user feature.
perf: replace regex parser with streaming lexer
Performance optimization that speeds up execution or reduces memory usage.
docs: update OpenAPI specification and README quickstart
Documentation updates, code comments, and API schema corrections.
test: add integration test suite for payment webhooks
Adding missing unit tests, integration suites, or mock fixtures.
ci: update GitHub Actions Node.js matrix to include v22
Modifications to CI/CD pipeline configuration, Dockerfiles, and runner scripts.
Scopes & Breaking Changes (3 commands)
feat(auth)!: replace session cookies with JWT bearer tokens
BREAKING CHANGE: The /api/login endpoint no longer returns Set-Cookie headers. Clients must supply Authorization: Bearer <token>.
The exclamation mark (!) after scope denotes an incompatible API breaking change.
fix(parser): prevent infinite loop on malformed JSON payload
Specifies the sub-package or component affected inside parentheses (scope).
refactor(db): migrate user table ID column from UUIDv4 to UUIDv7
Scoped refactoring explaining exact subsystem undergoing modernization.
Semantic Versioning (3 commands)
MAJOR (X.0.0) -> BREAKING CHANGE or feat!
Incremented when incompatible API changes or breaking contract alterations are introduced.
MINOR (0.X.0) -> feat
Incremented when backwards-compatible new features or optional parameters are added.
PATCH (0.0.X) -> fix
Incremented when backwards-compatible bug fixes and security patches are released.
Tooling & CI Automation (3 commands)
npx commitlint --from=HEAD~1
Lints the latest Git commit message against Conventional Commits specification rules.
npx standard-version --release-as minor
Automatically tags Git release, bumps package.json version, and compiles CHANGELOG.md.
git log --oneline --grep="^feat" -n 10
Filters Git commit history to display only feature commits matching Conventional Commits format.