npm semantic version calculator (original) (raw)
Version range syntax examples
Include everything that does not increment the first non-zero portion of semver
Use the caret (aka hat) symbol, ^
Examples
^2.2.1
^0.1.0
^0.0.3
Note: caret behavior is different for 0.x versions, for which it will only match patch versions.
Include everything greater than a particular version in the same minor range
Specify a range of stable versions
Use >
, <
, =
, >=
or <=
for comparisons, or-
to specify an inclusive range
Examples
>2.1
1.0.0 - 1.2.0
There must be spaces on either side of hyphens
Include pre-release versions like alpha
and beta
Use the pre-release tag
Pre-release versions are specified asexact versions. To specify a range, see below.
Specify a range of pre-release versions
Use comparisons like >
with a pre-release tag
Examples
>1.0.0-alpha
>=1.0.0-rc.0 <1.0.1