Semantic Versioning (SemVer)
Versioning
MAJOR.MINOR.PATCH
MAJOR
version when we make incompatible API changes.
MINOR
version when we add functionality in a backwards compatible manner.
PATCH
version when we make backwards compatible bug fixes & updates.
NPM Dependency Version
version
must match exact version
.
>version
must be greater than version
. (also >=version
, <version
, <=version
)
~version
approximately equivalent to version
.
^version
compatible with version
.
1.2.x
matches 1.2.0
, 1.2.1
, but not 1.3.0
.
*
matches any version.
Ranges
~1.2.3
— is from 1.2.3
and below 1.3.0
.
^1.2.3
or ^1.2
or 1.x
or 1.*
or ^1
or 1
— is from 1.2.3
and below 2.0.0
.
Reference