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

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

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

Include multiple sets of versions