[GH-ISSUE #185] Bad example #5241

Closed
opened 2026-06-15 11:23:33 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @burn2delete on GitHub (Mar 16, 2014).
Original GitHub issue: https://github.com/semver/semver/issues/185

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the 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, 1.0.0-x.7.z.92.

This section has a false example... 1.0.0-0.3.7 has a leading zero, which is explicitly said it shouldn't contain. Or am I misreading this section?

Originally created by @burn2delete on GitHub (Mar 16, 2014). Original GitHub issue: https://github.com/semver/semver/issues/185 A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the 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, 1.0.0-x.7.z.92. This section has a false example... 1.0.0-0.3.7 has a leading zero, which is explicitly said it shouldn't contain. Or am I misreading this section?
Author
Owner

@rlidwka commented on GitHub (Mar 16, 2014):

You're misreading this section.

0.3.7 has three components, 0, 3, 7, and each of them shouldn't have leading zero. Leading zero is a zero before another digit, i.e. 0001. 0 isn't a leading zero, it's just zero.

It means that 9.9.9-0.3.7 is allowed, but 9.9.9-1.0003.7 is not.

<!-- gh-comment-id:37766995 --> @rlidwka commented on GitHub (Mar 16, 2014): You're misreading this section. `0.3.7` has three components, `0`, `3`, `7`, and each of them shouldn't have leading zero. Leading zero is a zero before another digit, i.e. `0001`. `0` isn't a leading zero, it's just zero. It means that `9.9.9-0.3.7` is allowed, but `9.9.9-1.0003.7` is not.
Author
Owner

@jwdonahue commented on GitHub (Dec 6, 2017):

@flyboarder, if you have no further questions, please close this issue at your earliest possible convenience.

<!-- gh-comment-id:349483036 --> @jwdonahue commented on GitHub (Dec 6, 2017): @flyboarder, if you have no further questions, please close this issue at your earliest possible convenience.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#5241