Subchapter 194.2
references/semver-rules.mdMarkdown3 KBView on GitHub
Reference: https://semver.org/
vMAJOR.MINOR.PATCHPre-1.0 note: if the current version is 0.x.y, anything goes — MINOR bumps are
common for breaking changes. Once past 1.0.0, the rules below apply strictly.
Breaking changes are any modifications that could cause a consumer of the library to experience a compile error, runtime error, or behavior change without changing their own code.
Examples:
When in doubt, prefer a MAJOR bump over a MINOR. It’s better to signal a breaking change than to silently break consumers.
When a release contains a mix of change types, the highest precedence wins:
MAJOR > MINOR > PATCHOne breaking change + ten new features = MAJOR bump.
Default to 1.0.0 regardless of what’s in the diff. Inform the user.
| Situation | Recommendation |
|---|---|
| Only internal/private symbols changed | PATCH |
| Type annotation added to previously untyped function | PATCH (non-breaking) |
| Changing default value of optional parameter | Treat as MAJOR if callers might rely on old default |
| Adding a new required config option to an optional block | MINOR if the block itself is optional, otherwise MAJOR |
| Reverting a previous commit entirely | Follow what the net diff shows, not the revert message |