Open fulldecent opened 3 years ago
You're looking at the latest version of semver. The original semver spec indeed worked the way npm works.
v0.4.1 is a nonbreaking update from v0.4.0. It's semver. and it's how npm works.
The version 1.0.0 SemVer (and 1.0.0 beta) also says the same thing:
Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
I don't disagree that maybe some pre-recorded-history (i.e. on https://semver.org) draft of SemVer may have said something different. But if that is the case, it might be helpful if documentation is updated to reference this prior version of the specification.
Fair enough.
I believe there's a historic context on that divergence, ref: https://github.com/semver/semver/issues/221
Maybe a more technically correct way to phrase it in the docs would be to refer to it as "node-semver" (the actual implementation) instead.
That would be great, and would simplify a lot of related discussions in the wider community :-)
That would be a welcome change.
Of course now we have the bug that The npm-semver package advertises that it is an implementation of SemVer which it is not.
The long term solution here is to call this "NPM-flavored SemVer", document somewhere exactly what those words mean, and then everywhere NPM is using this thing use the fully qualified reference.
^^ this would be consistent with how GitHub uses GitHub-flavored Markdown and everywhere GitHub is telling you about Markdown it is fully qualifying it as GFM along with the link to that documentation.
Is there an existing issue for this?
Current Behavior
The documentation states:
which is exactly how it behaves.
Also, the documentation states:
Expected Behavior
These two above statements in documentation are logically incompatible. SemVer does NOT consider 0.4.1 as an upgrade from 0.4.0.
SemVer is defined at: https://semver.org. And it states specifically:
Steps To Reproduce
Recommendation:
Update the program behavior to actually support SemVer for the carat (
^
) operator.-or-
Update documentation to clarify that this is NOT SemVer. And then actually implement a SemVer with some other operator.
Environment