-
Notifications
You must be signed in to change notification settings - Fork 521
Open
Description
['>1.2', '1.2.8'], |
I am trying to understand why npx -r '>1.2' 1.2.8
results in 1.2.8
not satisfying the range. I think >1.2
should expand to >1.2.0 <1.3.0
which would mean 1.2.8
satisfies. But stepping through the tool, I see it hits this path:
node-semver/classes/comparator.js
Lines 37 to 42 in d17aebf
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] | |
const m = comp.match(r) | |
if (!m) { | |
throw new TypeError(`Invalid comparator: ${comp}`) | |
} |
The result being m === null
and the TypeError
is thrown.
Metadata
Metadata
Assignees
Labels
No labels