Comments (2)
@scunningham While I've not yet run your code I can explain the reason. 3.3.0-47
is a pre-release. According to the spec:
A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version.
The pre-release of 3.3.0-47
may not be API consistent with 3.3.0
and there are often changes between pre-releases that break APIs.
The issue here is the inconsistent handling. That's due to the pre-release handling being added on after the fact so as not to break the API to this package. We need to clean this up in a v2 to make the things consistent.
from semver.
I just looked things over, including what others are doing, and updated the docs.
The comparisons on Version
are spec compliant to comparisons and always include prereleases. The spec part is at https://semver.org/#spec-item-11.
The constraints different tools use, like npm/js, cargo/rust, and composer/php use are not to any standard and are different. Because prereleases are not expected to be API compliant to releases they are typically ignored. That is what the -47
is in the examples. Those are prereleases rather than stable releases. There is no one method for ignoring those.
The constraints here will ignore those by default but have an opt-in similar to other tools like js.
The docs have been updated to detail all of this.
from semver.
Related Issues (20)
- Allow pre-releases when only used for one part of a range? HOT 5
- `Checking Version Constraints` is unpredictable while patch is missing in version string
- Caret operator (^) gives unexpected results when the minor version in constraint is 0(zero)
- NewConstraint method faulty behavior HOT 6
- Valid constraints fails to parse HOT 2
- v1 - issue with major only constraint HOT 4
- Release of new versions HOT 1
- gob: type semver.Version has no exported fields HOT 2
- `20221209-update-renovatejson-v4` tag does not fail NewVersion test HOT 2
- Improper version constraint HOT 1
- improper constraint error when parsing a constraint with ranges and space separated parts HOT 1
- Ruby pre release support HOT 1
- semver v3 regex is more inclusive than the official semver.org regex HOT 2
- [Sorting] Captial Release Candidate is sorted before alpha releases HOT 1
- The semver.version Marshal Problem HOT 1
- Link to API documentation HOT 1
- Struct Version has methods on both value and pointer receivers. Such usage is not recommended by the Go Documentation HOT 1
- new tag for merged PRs ? HOT 2
- strict version check constraint bug (or expected?)
- `vert` is outdated but still referenced
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semver.