[GH-ISSUE #752] Improve documentation around major-version-zero rules #5618

Closed
opened 2026-06-15 12:08:09 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @privatenumber on GitHub (Sep 1, 2021).
Original GitHub issue: https://github.com/semver/semver/issues/752

Based on the npm docs, seems that in major version zero, semver rules are shifted over.

According to the npm docs:

^1.2.3 := >=1.2.3 <2.0.0
^0.2.3 := >=0.2.3 <0.3.0
^0.0.3 := >=0.0.3 <0.0.4

My understanding based off of this is that a breaking change released from version 0.x.y, will only bump x.

I don't disagree with this behavior, but seems many expect it to be 1.0.0. I did too before I read the npm semver docs.

If this behavior is not npm specific, I think it should be documented clearly.

Originally created by @privatenumber on GitHub (Sep 1, 2021). Original GitHub issue: https://github.com/semver/semver/issues/752 Based on the npm docs, seems that in major version zero, semver rules are shifted over. According to the [npm docs](https://docs.npmjs.com/cli/v6/using-npm/semver#:~:text=%5E0.2.3%20%3A%3D%20%3E%3D0.2.3%20%3C0.3.0): > ^1.2.3 := >=1.2.3 <2.0.0 > ^0.2.3 := >=0.2.3 <0.3.0 > ^0.0.3 := >=0.0.3 <0.0.4 My understanding based off of this is that a breaking change released from version `0.x.y`, will only bump `x`. I don't disagree with this behavior, but seems many expect it to be `1.0.0`. I did too before I read the npm semver docs. If this behavior is not npm specific, I think it should be documented clearly.
Author
Owner

@ljharb commented on GitHub (Sep 1, 2021):

It is npm specific at this point.

<!-- gh-comment-id:909860890 --> @ljharb commented on GitHub (Sep 1, 2021): It is npm specific at this point.
Author
Owner

@privatenumber commented on GitHub (Sep 1, 2021):

Thanks for confirming.

Moving request over to https://github.com/npm/node-semver/issues/344.

<!-- gh-comment-id:909866200 --> @privatenumber commented on GitHub (Sep 1, 2021): Thanks for confirming. Moving request over to https://github.com/npm/node-semver/issues/344.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#5618