Created
September 23, 2013 04:58
-
-
Save luk-/6666574 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1.0 | |
| semver.satisfies('2.1.0', '>2.x.x') // true | |
| // 2.0 | |
| semver.satisfies('2.1.0', '>2.x.x') // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's an odd case, since it depends on what you resolve the first
xto,semver.satisfies('2.1.1', '>2.0.x') // => trueseems correct, howeversemver.satisfies('2.1.1', '>2.2.x') // => trueseems incorrectThis is so much easier with
~definitions, since it's more deterministic:semver.satisfies('2.1.1', '~2.0.0') // => trueis correctsemver.satisfies('2.1.1', '~2.2.0') // => trueis incorrectI don't know if this is a bug, but would rather argue that
>,<and>=,<=, with a non-exact version are problematic and should be considered invalid definitions.