跳到主要内容

Semver Version Range Viewer

>=1.2.3 <2.0.0-0

Most common version numbers (clickable)

^1.2.3
^0.2.3
~1.2.3
~0.2.3
1.2.x
1.x
1.x.x
1.*
1.2.3 - 2.3.4
1.2 - 2.3
1.2.3 - 2
0.14.x || 15.x.x
1.2.4-alpha.3
1.2.4-beta.3

semver

Semantic Version, consisting of three parts, MAJOR.MINOR.PATCH.

MAJORWhen releasing API with Breaking Changes
MINORWhen releasing new feature APIs
PATCHWhen fixing bugs
^1.2.3>=1.2.3 <2.0.0
~1.2.3>=1.2.3 <1.3.0

Semantic Versioning (Semver)

semver, short for Semantic Versioning, is a versioning convention documented at semver.org. A version number consists of three parts: [major, minor, patch], where:

  • major: incremented when you make incompatible API changes (Breaking Changes)
  • minor: incremented when you add functionality in a backward-compatible manner
  • patch: incremented when you make backward-compatible bug fixes

For ~1.2.3, the matched version range is >=1.2.3 <1.3.0

For ^1.2.3, the matched version range is >=1.2.3 <2.0.0

npm packages use semver for version management. When you install lodash and the latest version is lodash@4.17.4, npm will save lodash@^4.17.4 in your package.json by default.