mirror of
https://github.com/semver/semver.git
synced 2025-08-23 06:18:35 +00:00
Merge 74df6f3e4a
into d58db16863
This commit is contained in:
commit
9522d8c7f5
16
semver.md
16
semver.md
@ -83,11 +83,11 @@ compatible functionality is introduced to the public API. It MUST be
|
|||||||
incremented if any public API functionality is marked as deprecated. It MAY be
|
incremented if any public API functionality is marked as deprecated. It MAY be
|
||||||
incremented if substantial new functionality or improvements are introduced
|
incremented if substantial new functionality or improvements are introduced
|
||||||
within the private code. It MAY include patch level changes. Patch version
|
within the private code. It MAY include patch level changes. Patch version
|
||||||
MUST be reset to 0 when minor version is incremented.
|
SHOULD be reset to 0 when minor version is incremented.
|
||||||
|
|
||||||
1. Major version X (X.y.z | X > 0) MUST be incremented if any backward
|
1. Major version X (X.y.z | X > 0) MUST be incremented if any backward
|
||||||
incompatible changes are introduced to the public API. It MAY also include minor
|
incompatible changes are introduced to the public API. It MAY also include minor
|
||||||
and patch level changes. Patch and minor versions MUST be reset to 0 when major
|
and patch level changes. Patch and minor versions SHOULD be reset to 0 when major
|
||||||
version is incremented.
|
version is incremented.
|
||||||
|
|
||||||
1. A pre-release version MAY be denoted by appending a hyphen and a
|
1. A pre-release version MAY be denoted by appending a hyphen and a
|
||||||
@ -115,30 +115,30 @@ have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700,
|
|||||||
minor, patch and pre-release identifiers in that order (build metadata
|
minor, patch and pre-release identifiers in that order (build metadata
|
||||||
does not figure into precedence).
|
does not figure into precedence).
|
||||||
|
|
||||||
1. Precedence is determined by the first difference when comparing each of
|
2. Precedence is determined by the first difference when comparing each of
|
||||||
these identifiers from left to right as follows: major, minor, and patch
|
these identifiers from left to right as follows: major, minor, and patch
|
||||||
versions are always compared numerically.
|
versions are always compared numerically.
|
||||||
|
|
||||||
Example: 1.0.0 < 2.0.0 < 2.1.0 < 2.1.1.
|
Example: 1.0.0 < 2.0.0 < 2.1.0 < 2.1.1.
|
||||||
|
|
||||||
1. When major, minor, and patch are equal, a pre-release version has lower
|
3. When major, minor, and patch are equal, a pre-release version has lower
|
||||||
precedence than a normal version:
|
precedence than a normal version:
|
||||||
|
|
||||||
Example: 1.0.0-alpha < 1.0.0.
|
Example: 1.0.0-alpha < 1.0.0.
|
||||||
|
|
||||||
1. Precedence for two pre-release versions with the same major, minor, and
|
4. Precedence for two pre-release versions with the same major, minor, and
|
||||||
patch version MUST be determined by comparing each dot separated identifier
|
patch version MUST be determined by comparing each dot separated identifier
|
||||||
from left to right until a difference is found as follows:
|
from left to right until a difference is found as follows:
|
||||||
|
|
||||||
1. Identifiers consisting of only digits are compared numerically.
|
1. Identifiers consisting of only digits are compared numerically.
|
||||||
|
|
||||||
1. Identifiers with letters or hyphens are compared lexically in ASCII
|
2. Identifiers with letters or hyphens are compared lexically in ASCII
|
||||||
sort order.
|
sort order.
|
||||||
|
|
||||||
1. Numeric identifiers always have lower precedence than non-numeric
|
3. Numeric identifiers always have lower precedence than non-numeric
|
||||||
identifiers.
|
identifiers.
|
||||||
|
|
||||||
1. A larger set of pre-release fields has a higher precedence than a
|
4. A larger set of pre-release fields has a higher precedence than a
|
||||||
smaller set, if all of the preceding identifiers are equal.
|
smaller set, if all of the preceding identifiers are equal.
|
||||||
|
|
||||||
Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta <
|
Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta <
|
||||||
|
Loading…
Reference in New Issue
Block a user