Semantic version

Time:2021-3-4

The semantic version is usually divided into the following parts

  • [major] major version number has incompatible API modification
  • [minor] minor version number [minor] has downward compatible API modification
  • The problem of downward compatibility in the revision number of patch has been corrected

Antecedent version

  • Alpha stands for the internal test version
  • Beta stands for the test version that can be opened to the public
  • RC (release candidata) stands for the candidate version that can be officially released

Example of version symbol

x-ranges
1.x = (1.0.0 <= version < 2.0.0)
1.2.x = (1.2.0 <= version < 1.3.0)
1 = 1.x.x = (1.0.0 <= version < 2.0.0)
1.2 = 1.2.x = (1.2.0 <= version < 1.3.0)
caret-ranges
^1.2.3 = ( 1.2.3 <= version < 2.0.0)
^1.2 = 1.2.x = ( 1.2.0 <= version < 2.0.0)
^1.x = 1.x.x = ( 1.0.0 <= version < 2.0.0)
^1.2.3-beta.1 = ( 1.2.3-beta.1<= version < 2.0.0)
*Note that 1.2.4-beta. 2 is not included because its [major, minor, patch] versions are different*
^0.2.3 = ( 0.2.3 <= version < 0.3.0)
^0.0.3 = ( 0.0.3 <= version < 0.0.4)
^0.0 = 0.0.x = ( 0.0.0 <= version < 0.1.0)
^0.x = 0.x.x = ( 0.0.0 <= version < 1.0.0)
tilde-ranges
~1.2.0 = (1.2.0 <= version < 1.3.0)
~1.2 = (1.2.0 <= version < 1.3.0)
~1 = (1.0.0 <= version < 2.0.0)
~1.2.3-beta.1 = (1.2.3-beta.1<= version < 1.3.0)
*Note that 1.2.4-beta. 2 is not included because its [major, minor, patch] versions are different*
~0.1.0 = ( 0.1.0 <= version < 0.2.0)
~0.0.1 = ( 0.0.1 <= version < 0.1.0 )
~0 = ( 0.0.0 <= versioin < 1.0.0)

NPM upgrade
  • NPM version major: upgrade the major version
  • NPM version minor: upgrade minor version
  • NPM version patch: upgrade the patch version
  • NPM version 1.2.3-beta. 1: upgrade to 1.2.3-beta. 1