NpmSpec Comparison Between Prerelease Versions is Wrong
See original GitHub issueVersion is 2.8.5.
>>> from semantic_version import NpmSpec, Version
>>> NpmSpec("<0.1.1-alpha.1").match(Version("0.1.1-beta.1"))
True
>>> NpmSpec("<0.1.1-alpha.1").match(Version("0.1.1-rc.1"))
True
>>> NpmSpec("<0.1.1-beta.7").match(Version("0.1.1-beta.8"))
True
They should be false.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Guide — python-semanticversion latest documentation
Comparing version numbers isn't always enough; in many situations, one needs to define a range of acceptable versions. That notion is not defined...
Read more >vyperlang/community - Gitter
Trying to build an old Vyper contract from over a year ago (required a patched beta version at the time) with a new...
Read more >semantic-version - PyPI
It follows strictly the 2.0.0 version of the SemVer scheme. ... Obviously, versions can be compared: ... pre-release doesn't satisfy version spec False...
Read more >Prereleases and Npm - Medium
I recently published the first prereleases of D3 4.0 alpha to npm. ... By default, prerelease versions are not included in a range....
Read more >Changing Cargo semver compatibility for pre-releases
Now if Cargo were to decide to change its interpretation of pre-release reqs in a future version (via a Cargo RFC), this crate...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s another example that doesn’t seem correct.
The same examples in
semver
from npm have the correct logic:oh and the same issue with
~2.0.1-
not matching anything