10 Given a version number `MAJOR.MINOR.PATCH`:
13 | `MAJOR` | incompatible API changes |
14 | `MINOR` | add functionality (backwards-compatible) |
15 | `PATCH` | bug fixes (backwards-compatible) |
25 Note that suffixed versions (`1.2.3-rc1`) are not matched.
29 | Range | Description | Notes |
31 | `~1.2.3` | is `>=1.2.3 <1.3.0` | |
33 | `^1.2.3` | is `>=1.2.3 <2.0.0` | |
34 | `^0.2.3` | is `>=0.2.3 <0.3.0` | (0.x.x is special) |
35 | `^0.0.1` | is `=0.0.1` | (0.0.x is special) |
37 | `^1.2` | is `>=1.2.0 <2.0.0` | (like ^1.2.0) |
38 | `~1.2` | is `>=1.2.0 <1.3.0` | (like ~1.2.0) |
40 | `^1` | is `>=1.0.0 <2.0.0` | |
46 | `*` | any version | |
52 | Range | Description |
54 | `1.2.3 - 2.3.4` | is `>=1.2.3 <=2.3.4` |
58 | Range | Description |
60 | `1.2.3 - 2.3` | is `>=1.2.3 <2.4.0` |
61 | `1.2.3 - 2` | is `>=1.2.3 <3.0.0` |
65 | Range | Description |
67 | `1.2 - 2.3.0` | is `1.2.0 - 2.3.0` |
69 When the right is partial (eg, `2.3`), missing pieces are assumed to be `x` (eg, `2.3.x`).
71 When the left is partial (eg, `1.2`), missing pieces are assumed to be `0` (eg, `1.2.0`).
75 | Range | Description |
77 | `>=0.14 <16` | And (space-separated) |
78 | `0.14.x || 15.x.x` | Or (pipe-separated) |
82 1.2.3-prerelease+build
86 | `^` | means "compatible with" |
87 | `~` | means "reasonably close to" |
88 | `0.x.x` | is for "initial development" |
89 | `1.x.x` | means public API is defined |
95 * <http://semver.org/>
96 * <https://docs.npmjs.com/misc/semver>