Semantic version number
- Major version number, downward incompatible API changes
- The backward compatibility function is added to this version
- Revised version number to fix backward compatibility issues
- Prior release number. When a major release or core feature is to be released, but the release cannot be guaranteed to be completely normal, a prior release is required. Common advanced version numbers are:
- Alpha – Unstable version
- Beta – Basically stable
- Rc – Basically the same as the official version
Version release, should first release the prior version, then release the official version.Copy the code
Dependency version rule
1. Specify the version number
1.0.2
Can only use1.0.2
version
2. ^ Version number
The major version number must be the same and at least smaller than the specified version number
^ 1.0.2
You can useGreater than or equal to1.0.2
.Less than2.0.0
The version of the^ 1.0.2 - beta. 1
You can useGreater than or equal to1.0.2 - beta. 2
.Less than2.0.0
Version is also available1.0.2 - beta. 2
, but do not use other prior versions with different primary and secondary revision numbers, such asDo not use1.0.3 - beta. 1
^ 0.0.1
The major version is 0 and availableGreater than or equal to0.0.1
.Less thanhundreds
The version of the
3. ~ Version number
The major and minor versions must be the same and at least smaller than the specified version
~ 1.0.2
You can useGreater than or equal to1.0.2
.Less than1.1.0
The version of the
4. > <= >= <= Version number
Specify the version number range
> = 3.0.0
Version 3.0.0 or later is available
5. – Version number
- There must be Spaces on both sides
- 2.1.2 1.0.1
You can useGreater than or equal to1.0.1
.Less than or equal to2.1.2
The version of the
6. Space version number | | version number
Blank said AND, | | says the OR
1.2.7 | | > = 1.2.9 < 2.0.0
You can use1.2.7
orGreater than or equal to1.2.9
.Less than2.0.0
The version of the
6. * Version
All versions
7. X X version
1.x
Major version 1 is availableX 1.1.
You can use major version 1 and minor version 1
Latest indicates the latest version
Common tag versions published. Common tags are stable, beta, dev, canary