maxSatisfying returns minSatisfying #35

Closed
JackMorrissey opened this Issue Jun 24, 2013 · 2 comments

Comments

Projects
None yet
2 participants

Using version 2.0.7. Tested a few versions back (all > 2.x) with the same result.

semver = require 'semver'

out = (input) ->
    console.log input

ranges = [
    '1.1.1-123'
    '1.1.1'
    '1.1.2'
    '2.0.0'
    '1.1.0'
]

out semver.maxSatisfying ranges, '~1.1.1'  #E: 1.1.2 A: 1.1.1-123
out semver.maxSatisfying ranges, '~1.1.x'  #E: 1.1.2 A: 1.1.0
out semver.maxSatisfying ranges, '<=2.0.0' #E: 2.0.0 A: 1.1.0
out semver.maxSatisfying ranges, '>=1.1.2' #E: 2.0.0 A: 1.1.2

isaacs closed this in 432f0f5 Jun 24, 2013

You're the man.

Owner

isaacs commented Jun 24, 2013

Thanks. Not often that you get a bug that can be fixed with a 1-char diff ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment