Semantic Versioning (SemVer) defines a formal specification for assigning and incrementing software version numbers: MAJOR.MINOR.PATCH.
The Three Components
$$\text{Version} = \text{MAJOR}.\text{MINOR}.\text{PATCH}$$
- MAJOR (
1.0.0->2.0.0): Incompatible, breaking API changes. - MINOR (
1.0.0->1.1.0): Backwards-compatible new features. - PATCH (
1.0.0->1.0.1): Backwards-compatible bug fixes.
Pre-Release & Build Metadata
1.0.0-alpha
1.0.0-alpha.1
1.0.0-beta.2
1.0.0-rc.1
1.0.0+20261108 # Build metadata (+ignored in version precedence)
Precedence order: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta < 1.0.0-rc.1 < 1.0.0.
Package Manager Range Specifiers
| Range | Included Versions | Description |
|---|---|---|
1.2.3 |
1.2.3 |
Exact version match |
>1.2.3 |
1.2.4, 2.0.0, ... |
Greater than |
>=1.2.0 <1.3.0 |
1.2.0 up to 1.2.9 |
Bounded range |
~1.2.3 |
>=1.2.3 <1.3.0 |
Reasonably close (allows patch releases only) |
^1.2.3 |
>=1.2.3 <2.0.0 |
Compatible (allows minor and patch releases) |
^0.2.3 |
>=0.2.3 <0.3.0 |
In 0.x.x, minor release is breaking |
* |
Any version | Unrestricted wildcard |