I'm trying to use standard-version in my javascript project. I added the release script to my package.json:
"scripts": {
...
"release": "standard-version"
}
My problem is that I added a commit to my git repo with the following message:
feat: test
I run npm run release and it increased the patch version of the project.
So my initial version was 0.2.1 (tag: v0.2.1), and it generated 0.2.2 with this commit message
chore(release): 0.2.2
Why didn't it increase the minor version?
Caret
^match Minor releases (It is also the default value forsave-prefixin npm config), but it work different for 0.0.X, 0.X.X and X.X.XSo, for example ^0.0.1 will work like this
for ^0.1.0 will work like this
and for ^1.0.0 like normal:
Tilde
~match Patch releases, doesn't have exceptions in it behavior for 0.0.X, 0.X.X and X.X.X (Perhaps because it is not a default value in npm config, idk really). It has the same behavior everywhere:~0.0.1
~0.1.0
~1.0.0
You can check the behavior here