File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1164,10 +1164,14 @@ function replaceXRange (comp, options) {
1164
1164
gtlt = ''
1165
1165
}
1166
1166
1167
+ // if we're including prereleases in the match, then we need
1168
+ // to fix this to -0, the lowest possible prerelease value
1169
+ pr = options . includePrerelease ? '-0' : ''
1170
+
1167
1171
if ( xM ) {
1168
1172
if ( gtlt === '>' || gtlt === '<' ) {
1169
1173
// nothing is allowed
1170
- ret = '<0.0.0'
1174
+ ret = '<0.0.0-0 '
1171
1175
} else {
1172
1176
// nothing is forbidden
1173
1177
ret = '*'
Original file line number Diff line number Diff line change @@ -679,8 +679,8 @@ test('comparators test', function (t) {
679
679
[ '1.2 - 3.4.5' , [ [ '>=1.2.0' , '<=3.4.5' ] ] ] ,
680
680
[ '1.2.3 - 3.4' , [ [ '>=1.2.3' , '<3.5.0' ] ] ] ,
681
681
[ '1.2.3 - 3' , [ [ '>=1.2.3' , '<4.0.0' ] ] ] ,
682
- [ '>*' , [ [ '<0.0.0' ] ] ] ,
683
- [ '<*' , [ [ '<0.0.0' ] ] ]
682
+ [ '>*' , [ [ '<0.0.0-0 ' ] ] ] ,
683
+ [ '<*' , [ [ '<0.0.0-0 ' ] ] ]
684
684
] . forEach ( function ( v ) {
685
685
var pre = v [ 0 ]
686
686
var wanted = v [ 1 ]
You can’t perform that action at this time.
0 commit comments