Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't call the second number a major #411

Closed
wants to merge 2 commits into from
Closed

Conversation

kokushkin
Copy link

major is always the first number, calling the second a major might be a very confusing. Took me a lot of time to recover from this false belief.

References

raineorshine/npm-check-updates#958

major is always the first number, calling the second a major might be a very confusing. Took me a lot of time to recover from this false belief.
README.md Outdated
@@ -299,8 +299,7 @@ Allows changes that do not modify the left-most non-zero element in the
minor updates for versions `1.0.0` and above, patch updates for
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.

Many authors treat a `0.x` version as if the `x` were the major
"breaking-change" indicator.
Many authors treat a `0.x` version as if the `x` were the "major breaking-change" indicator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not an adjective on "breaking-change" tho, ie, a major breaking change vs a non-major breaking change.

It's precisely as if the x were the semver-major number - that's the intention of the doc.

Copy link
Author

@kokushkin kokushkin Oct 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's exactly why I think it should be in "". Because the second digit can't be a major only "major"..kind of major

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an 0.x version, the second number IS the semver-major number. "major" refers to the breaking change semantic, NOT to the position in the version triple, which in the npm ecosystem depends on if the first and/or second numbers are zero or not.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please refer exactly to the document where it's written ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no such document; it's the way npm's semver ranges (which it has sole authority over, not the semver spec) has always worked.

A ^ range is "everything non-breaking", and ^0.2.0 does NOT include - and never has included - v0.3.0, because v0.3.0 is semver-major - breaking - compared to v0.2.x.

Copy link
Author

@kokushkin kokushkin Oct 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor and ^ are different things. (See definition of ^ in the readme). ^ works as it's written and it's fine. Does anything work with "minor" in the input or output so we can see it in action by calling some function of the npm?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from https://github.com/npm/node-semver#caret-ranges-123-025-004 you can see that it's rather "yes". But you don't care about docs anyway (from a parallel discussion). So why would you care about this specific change? As I understand you would rather delete all readme, would you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're putting words in my mouth.

The doc as-is is correct, moving "major" inside the quotes has a different connotation in American English, the language the docs are written in, and that would be an incorrect one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but I am saying that when docs and implementation disagree, the docs are always wrong.

@kokushkin kokushkin changed the title don't call the second number as a major don't call the second number a major Oct 27, 2021
@kokushkin
Copy link
Author

It feels like a dead end here...

May I ask for a couple of more independent reviews from third parties which are not affiliated by no means with the previous reviewer and who (most importantly!) value the definition over the implementation?

@farahmandakbar farahmandakbar linked an issue May 12, 2022 that may be closed by this pull request
@wraithgar
Copy link
Member

The docs as is accurately describe the nuances with leading zeroes in caret ranges.
Removing these sections adds more confusion because it is important to call out why this behavior exists and why one would want to use caret ranges for versions that have leading zeroes.

@wraithgar wraithgar closed this Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

https://semver.org/.v2.0.0
3 participants