-
Notifications
You must be signed in to change notification settings - Fork 508
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
[QUESTION] contradiction of minor version increasing process in 0.x.y case #412
Comments
For 0.x.y i'd treat it as 0.MAJOR.MINOR where PATCH falls under minor. |
Ok, then if you do so, how long are you going to be on 0.x.y version. Does "0." mean something for you? And if yes then what? |
In the npm ecosystem, version numbers only convey relative breakage - they do not convey stability, or support, or time period until a new release, or any other special meaning. If you infer some special meaning from "0.", that's on you. |
So, you're saying 0.x are production ready? Then it should be explicitly stated in the docs I think (specifications of npm). Now it seems kinda opposite. |
Yes, everything published is production ready. |
and if I want to publish something not production ready, but for people to try, how should I describe it in versions then (if not 0)? |
Use a prerelease. |
And when I'm done I just drop "beta" and stay with 0.x.y. Ok, fine..but what's the point for me to start from 0.x.y ? I'd not be able to convey my patches versions. |
|
Ok, let's say I use pre-release (aka alfa, beta) to mark my versions as not production ready, as we agreed. |
That's up to you - there is no explicit semver contract between prereleases - but that's what i'd do, yes. |
And so, do you agree that an initial development process involves much more breaking changes than, let's say, when a package in production use already? Not least because we don't feel obligated to support backward compatibility in full scale on such an early stage. |
Yes, but in my experience, and no, it'd be totally fine to publish a |
I've looked it up console.log(compare("123.0.0-beta", "1.0.0", ">")); // true
console.log(semver.gt('123.0.0-beta', '1.0.0')) // true so it kind of doesn't make sense and even potentially would lead to a contradiction in the future
Well, if publishing initial development releases is inappropriate , then alpha, beta are also inappropriate , isn't? Anyway I don't think it's possible to stop people from publishing stuff on any stage. |
@kokushkin you did not quote the relevant part of the semver.org spec
Also, while the semver.org spec doesn't say this, it would be very strange to increment version 0.x.y to 0.x+1.y. It should be 0.x+1.0 since you normally set later versions to zero when incrementing. |
@WalkerCodeRanger thats v2 of the spec; node more closely follows v1, and in node, it works like this: X is major, Y is minor, Z is patch, and it’s either 0.0.X, 0.X.Y, or X.Y.Z. |
Looks like the discussion answered this as well as it can be answered. |
What / Why
Suppose I'm going to make a minor incrementation of the 0.x.y version of my package.
How should I do it?
According to https://github.com/npm/node-semver#versions
and https://semver.org/
I should do it like this 0.x+1.y
According to https://github.com/npm/node-semver#caret-ranges-123-025-004
I should do it like this 0.x.y+1
What should I choose?
I've found a lot of confusion around ^, minor and breaking-change terms.
Would it be better to choose one of the sides unambiguously?
References
Related to #411
The text was updated successfully, but these errors were encountered: