Reputation: 831
Using this online semver checker: https://jubianchi.github.io/semver-check/
Notice how
version "3.4.5" is compatible with expression "3."
but...
version "3.4.5-1" is NOT compatible with expression "3."
How can I change my compatibility expression to include this pre-release version?
Upvotes: 6
Views: 2358
Reputation: 1158
That's because pre-release versions are not included by default.
According to the docs:
SemVer comparisons without a pre-release comparator will skip pre-release versions. For example, >=1.2.3 will skip pre-releases when looking at a list of releases while >=1.2.3-0 will evaluate and find pre-releases.
In order to match that pre-release version, you could use, for example: ~3 >3.4.5-0
.
3.4.5-1 satisfies constraint ~3 >3.4.5-0
Upvotes: 6