0
0
mirror of https://github.com/semver/semver.git synced 2025-08-24 06:48:35 +00:00

Hyphen should be hyphens in the pre-release clause (#466)

* Hyphen should be hyphens in the pre-release clause

Fix for #465 How many hypens are you allowed in the prerelease tag.

* Added pluralization of hyphen in prerelease.

Added pluralization of hyphen in prerelease as well as additional examples in prerelease and build meta.
This commit is contained in:
Joseph Donahue 2020-01-22 15:40:34 -08:00 committed by isaacs
parent 4740b30226
commit dd92b6460a

View File

@ -93,22 +93,22 @@ 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
series of dot separated identifiers immediately following the patch series of dot separated identifiers immediately following the patch
version. Identifiers MUST comprise only ASCII alphanumerics and hyphen version. Identifiers MUST comprise only ASCII alphanumerics and hyphens
[0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST
NOT include leading zeroes. Pre-release versions have a lower NOT include leading zeroes. Pre-release versions have a lower
precedence than the associated normal version. A pre-release version precedence than the associated normal version. A pre-release version
indicates that the version is unstable and might not satisfy the indicates that the version is unstable and might not satisfy the
intended compatibility requirements as denoted by its associated intended compatibility requirements as denoted by its associated
normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7,
1.0.0-x.7.z.92. 1.0.0-x.7.z.92, 1.0.0-x-y-z.--.
1. Build metadata MAY be denoted by appending a plus sign and a series of dot 1. Build metadata MAY be denoted by appending a plus sign and a series of dot
separated identifiers immediately following the patch or pre-release version. separated identifiers immediately following the patch or pre-release version.
Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-].
Identifiers MUST NOT be empty. Build metadata MUST be ignored when determining Identifiers MUST NOT be empty. Build metadata MUST be ignored when determining
version precedence. Thus two versions that differ only in the build metadata, version precedence. Thus two versions that differ only in the build metadata,
have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700,
1.0.0-beta+exp.sha.5114f85. 1.0.0-beta+exp.sha.5114f85, 1.0.0+21AF26D3----117B344092BD.
1. Precedence refers to how versions are compared to each other when ordered. 1. Precedence refers to how versions are compared to each other when ordered.
Precedence MUST be calculated by separating the version into major, minor, patch Precedence MUST be calculated by separating the version into major, minor, patch