mirror of
https://github.com/semver/semver.git
synced 2026-07-11 03:53:53 -05:00
[GH-ISSUE #448] BN form does not match spec #5444
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 @jellelicht on GitHub (Jun 27, 2018).
Original GitHub issue: https://github.com/semver/semver/issues/448
The current spec does not allow alphanumeric identifiers to have a numeric prefix part.
The spec allows a pre-release to be composed of dot-separated identifiers, where identifiers are either alphanumeric or numeric identifiers.
In my understanding, "1.2.3-731b" would be a valid semver, with "731b" being the alphanumeric identifier for the pre-release part.
So either I am wrong (but the definition of 'alphanumeric identifier' could be clarified in the spec), or the current form of the BN grammar needs a tiny update.
@FichteFoll commented on GitHub (Jun 27, 2018):
See https://github.com/semver/semver.org/issues/59.
TL;DR:
1.2.3-731bis a valid semver with a single alphanumeric pre-release identifier. The grammar currently only present in this repo (and not on the website) is being worked on.@jwdonahue commented on GitHub (Jul 12, 2018):
@jellelicht,
Where do you see that in the spec? To the best of my knowledge, numeric fields in prerelease tags are prohibited from having leading zeroes, but there's no such prohibition on alphanumeric fields. The relevant BN bits are:
Seems fairly clear to me and I don't see any conflict with the language in the spec. These are all valid prerelease tags:
-0xyz
-0
-231
-a123
-123456zyxwv
Does this clear it up for you, or am I missing something?
@jellelicht commented on GitHub (Jul 13, 2018):
@jwdonahue I am not quite clear what exactly I had misunderstood, but thanks for the explanation anyway.