[GH-ISSUE #435] Character list for prerelease does not include "." but the examples for it do #5437

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

Originally created by @DarwinJS on GitHub (Mar 27, 2018).
Original GitHub issue: https://github.com/semver/semver/issues/435

Thanks for maintaining the semver standard!

On semver.org item 9 and 10 do not show "." in their list of valid characters allowed after a dash (pre-release). However, the examples do show a "."

I know of at least one significant implementation where this ambiguity may have led to validation routines that do not allow a "." after a "-" when evaluating a sem version.

Although "." is implicit to the format, since pre-releases are an exception case, it would be nice to make the "." explicit in the character list if it is valid.

Originally created by @DarwinJS on GitHub (Mar 27, 2018). Original GitHub issue: https://github.com/semver/semver/issues/435 Thanks for maintaining the semver standard! On semver.org item 9 and 10 do not show "." in their list of valid characters allowed after a dash (pre-release). However, the examples do show a "." I know of at least one significant implementation where this ambiguity may have led to validation routines that do not allow a "." after a "-" when evaluating a sem version. Although "." is implicit to the format, since pre-releases are an exception case, it would be nice to make the "." explicit in the character list if it is valid.
Author
Owner

@jeme commented on GitHub (Mar 27, 2018):

The identifiers are not allowed to have "." in them because they are individually separated by ".".

Quote on 9: A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers

Quote on 10: Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers

That said, I personally have had the desired to do something more in the lines of:

version: 2.0.0-{prename}.{prenum}+{metaname}.{metanum}+{metaname2}+metanum2}... As i find that more natural to interpret... But maybe that's just me...

<!-- gh-comment-id:376631038 --> @jeme commented on GitHub (Mar 27, 2018): The identifiers are not allowed to have "." in them because they are individually separated by ".". **Quote on 9**: A pre-release version MAY be denoted by appending a hyphen and a series of **dot separated** identifiers **Quote on 10**: Build metadata MAY be denoted by appending a plus sign and a series of **dot separated** identifiers That said, I personally have had the desired to do something more in the lines of: version: 2.0.0-{prename}.{prenum}+{metaname}.{metanum}+{metaname2}+metanum2}... As i find that more natural to interpret... But maybe that's just me...
Author
Owner

@DarwinJS commented on GitHub (Mar 28, 2018):

Thanks for explaining - I read quickly and was thinking a "prerelease identifier" was referencing everything after the first dash.

<!-- gh-comment-id:376726228 --> @DarwinJS commented on GitHub (Mar 28, 2018): Thanks for explaining - I read quickly and was thinking a "prerelease identifier" was referencing everything after the first dash.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#5437