Is 1.0.0-0 a valid SemVer? #504

Closed
opened 2026-02-17 12:10:36 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @KyNorthstar on GitHub (Oct 11, 2021).

According to SemVer 2.0.0 rule 9:

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 hyphens [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, 1.0.0-x-y-z.–.

This doesn't seem to me to cover the case of a pre-release identifier being only a zero. I think it'll be fine, just like a major/minor/patch identifier, but it's not clear to me

Originally created by @KyNorthstar on GitHub (Oct 11, 2021). According to [SemVer 2.0.0 rule 9](https://semver.org/spec/v2.0.0.html#spec-item-9): > 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 hyphens [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, 1.0.0-x-y-z.–. This doesn't seem to me to cover the case of a pre-release identifier being only a zero. I think it'll be fine, just like a major/minor/patch identifier, but it's not clear to me
Author
Owner

@KyNorthstar commented on GitHub (Oct 11, 2021):

I'm going to assume yes because one valid example is 1.0.0-0.3.7, implying that a sole 0 identifier is valid

@KyNorthstar commented on GitHub (Oct 11, 2021): I'm going to assume yes because one valid example is `1.0.0-0.3.7`, implying that a sole `0` identifier is valid
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#504