Semantic Versioning
A version of 3.6.12 means
3is major version, increment if you have changes that break backward compatibility6is minor version, increment if you have backward compatible new features12is patch release, increment if you have backward compatible new bug fixes
Allowing upgrades in package.json
- Use tilde
~1.0.4to allow update to newer patch releases, e.g. to 1.0.5 but not 1.1.0- Using
~with only major version specified will allowminorchanges, e.g.~3updates to anything between>=3.0.0 <4.0.0which is the same as specifying3.x
- Using
- Use caret
^1.0.4to 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.2updates 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