[GH-ISSUE #447] Should lower places be reset to 0 when higher places are incremented? #1192

Closed
opened 2026-04-16 10:30:30 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jacktose on GitHub (Jun 6, 2018).
Original GitHub issue: https://github.com/semver/semver/issues/447

I assume that when you increment Major, Minor and Patch are reset to 0, and when you increment Minor, Patch is reset to 0.
e.g. 2.6.5 -> 2.7.0, 2.7.3 -> 3.0.0
not 2.6.5 -> 2.7.5, 2.6.5 -> 2.7.6, 2.6.5 -> 2.7.2, 2.7.3 -> 3.7.3, or anything like that.

However, that doesn't seem to appear in the spec. If that is supposed to be the case, I suggest adding it as a SHOULD or a MUST.

I don't know whether it should apply to pre-release versions or build metadata. Maybe as a SHOULD?

Originally created by @jacktose on GitHub (Jun 6, 2018). Original GitHub issue: https://github.com/semver/semver/issues/447 I assume that when you increment Major, Minor and Patch are reset to 0, and when you increment Minor, Patch is reset to 0. e.g. `2.6.5 -> 2.7.0`, `2.7.3 -> 3.0.0` not `2.6.5 -> 2.7.5`, `2.6.5 -> 2.7.6`, `2.6.5 -> 2.7.2`, `2.7.3 -> 3.7.3`, or anything like that. However, that doesn't seem to appear in the spec. If that is supposed to be the case, I suggest adding it as a SHOULD or a MUST. I don't know whether it should apply to pre-release versions or build metadata. Maybe as a SHOULD?
Author
Owner

@jacktose commented on GitHub (Jun 6, 2018):

Never mind, I missed this text:

  1. ... Patch version MUST be reset to 0 when minor version is incremented.
  1. ... Patch and minor version MUST be reset to 0 when major version is incremented.
<!-- gh-comment-id:395148384 --> @jacktose commented on GitHub (Jun 6, 2018): Never mind, I missed this text: > 7. ... Patch version MUST be reset to 0 when minor version is incremented. > 8. ... Patch and minor version MUST be reset to 0 when major version is incremented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#1192