Semantic Versioning
A version of 3.6.12
means
3
is major version, increment if you have changes that break backward compatibility6
is minor version, increment if you have backward compatible new features12
is patch release, increment if you have backward compatible new bug fixes
Allowing upgrades in package.json
- Use tilde
~1.0.4
to allow update to newer patch releases, e.g. to 1.0.5 but not 1.1.0- Using
~
with only major version specified will allowminor
changes, e.g.~3
updates to anything between>=3.0.0 <4.0.0
which is the same as specifying3.x
- Using
- Use caret
^1.0.4
to allow update to newer minor releases, e.g. to 1.1.0 but not 2.0.0- More specifically caret allows changes that do not modify the first non-zero digit in the version, so
^0.4.2
updates to anything between>=0.4.2 <0.5.0
- More specifically caret allows changes that do not modify the first non-zero digit in the version, so
- Use
*
to allow update to newer major releases, e.g. to 2.0.0