Closed redreceipt closed 4 years ago
Hey @redreceipt – the configuration spec doesn't actually enforce any rules here.
If you are using the Conventional Commits specification (repo), which is the default preset on much of the conventional-changelog
tooling, fix
and chore
will both be treated as PATCH
bumps.
Is there any text that shows what prefix corresponds to what version bump? I can't seem to find it, even at the links you mentioned. And how do I know if I'm using the Conventional Commits specification?
Is there any text that shows what prefix corresponds to what version bump?
@redreceipt you can find that information in the Conventional Commits specification. This excerpt, in particular, defines how it should map to semantic versioning:
The commit contains the following structural elements, to communicate intent to the consumers of your library:
- fix: a commit of the type
fix
patches a bug in your codebase (this correlates withPATCH
in semantic versioning).- feat: a commit of the type
feat
introduces a new feature to the codebase (this correlates withMINOR
in semantic versioning).- BREAKING CHANGE: a commit that has the text
BREAKING CHANGE:
at the beginning of its optional body or footer section introduces a breaking API change (correlating withMAJOR
in semantic versioning). A BREAKING CHANGE can be part of commits of any type.- Others: commit types other than
fix:
andfeat:
are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommendschore:
,docs:
,style:
,refactor:
,perf:
,test:
, and others.We also recommend
improvement
for commits that improve a current implementation without adding a new feature or fixing a bug. Notice these types are not mandated by the conventional commits specification, and have no implicit effect in semantic versioning (unless they include a BREAKING CHANGE).
https://www.conventionalcommits.org/en/v1.0.0-beta.4/
And how do I know if I'm using the Conventional Commits specification?
This will depend on your tooling for generating releases and/or changelogs – are you using standard-version
?
Point 4 in your above comment doesn't specify, do they correlate to PATCH
or MINOR
?
Yes I am using standard-version
Using standard-version
they'll be treated as PATCH
bumps. The only time standard-version
will not adhere to the rules in the specification are when your version is pre-release (<1).
Thank you!
I apologize for the spam but there's something I don't understand and I can't find an answer anywhere.
Does it always bump the minor number unless you prefix
fix
? I guessed withchore
it would still bump the patch number but is that not the case?