[GH-ISSUE #47] Are leading '0' characters valid? #6027

Closed
opened 2026-06-17 04:25:53 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @pzb on GitHub (Sep 9, 2012).
Original GitHub issue: https://github.com/semver/semver/issues/47

Currently the spec calls out major, minor, and patch as "non-negative integers". However this does not actually provide presentation information. All the examples show these non-negative integers represented in decimal form without leading zeros, but it is unclear if this is required. Are the following legal versions according to the spec?

  • 1.03.2
  • 0xA.2.1
  • 2.010.14
  • 5.0xc0.03
Originally created by @pzb on GitHub (Sep 9, 2012). Original GitHub issue: https://github.com/semver/semver/issues/47 Currently the spec calls out major, minor, and patch as "non-negative integers". However this does not actually provide presentation information. All the examples show these non-negative integers represented in decimal form without leading zeros, but it is unclear if this is required. Are the following legal versions according to the spec? - 1.03.2 - 0xA.2.1 - 2.010.14 - 5.0xc0.03
Author
Owner

@haacked commented on GitHub (Oct 2, 2012):

I believe decimal format is implied. So under that interpretation, you first and third ones 1.03.2 and 2.010.14 would be valid, but not the other ones.

<!-- gh-comment-id:9079143 --> @haacked commented on GitHub (Oct 2, 2012): I believe decimal format is implied. So under that interpretation, you first and third ones `1.03.2` and `2.010.14` would be valid, but not the other ones.
Author
Owner

@haacked commented on GitHub (Oct 2, 2012):

Great question. I'm going to close this unless you have a specific proposal in mind. I'm not sure it really needs calling out that version numbers are decimal format, but feel free to convince us otherwise. :)

<!-- gh-comment-id:9080603 --> @haacked commented on GitHub (Oct 2, 2012): Great question. I'm going to close this unless you have a specific proposal in mind. I'm not sure it really needs calling out that version numbers are decimal format, but feel free to convince us otherwise. :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#6027