mirror of
https://github.com/semver/semver.git
synced 2026-07-10 19:50:47 -05:00
[GH-ISSUE #435] Character list for prerelease does not include "." but the examples for it do #6310
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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...
@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.