Skip to content

Commit 93c2f2d

Browse files
Christopher J. Brodyisaacs
authored andcommitted
Clarify some ^0.0.x & ~.0.0.x cases
1 parent e09ecf8 commit 93c2f2d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ test('range tests', function (t) {
197197
['*', '1.2.3'],
198198
['2', '2.1.2'],
199199
['2.3', '2.3.1'],
200+
['~0.0.1', '0.0.1'],
201+
['~0.0.1', '0.0.2'],
200202
['~x', '0.0.9'], // >=2.4.0 <2.5.0
201203
['~2', '2.0.9'], // >=2.4.0 <2.5.0
202204
['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
@@ -239,6 +241,7 @@ test('range tests', function (t) {
239241
['^1.2.3-alpha', '1.2.3-pre'],
240242
['^1.2.0-alpha', '1.2.0-pre'],
241243
['^0.0.1-alpha', '0.0.1-beta'],
244+
['^0.0.1-alpha', '0.0.1'],
242245
['^0.1.1-alpha', '0.1.1-beta'],
243246
['^x', '1.2.3'],
244247
['x - 1.0.0', '0.9.7'],
@@ -301,6 +304,8 @@ test('negative range tests', function (t) {
301304
['1.2.* || 2.*', '1.1.3'],
302305
['2', '1.1.2'],
303306
['2.3', '2.4.1'],
307+
['~0.0.1', '0.1.0-alpha'],
308+
['~0.0.1', '0.1.0'],
304309
['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
305310
['~2.4', '2.3.9'],
306311
['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
@@ -318,6 +323,7 @@ test('negative range tests', function (t) {
318323
['<1.2.3', '1.2.3-beta'],
319324
['=1.2.3', '1.2.3-beta'],
320325
['>1.2', '1.2.8'],
326+
['^0.0.1', '0.0.2-alpha'],
321327
['^0.0.1', '0.0.2'],
322328
['^1.2.3', '2.0.0-alpha'],
323329
['^1.2.3', '1.2.2'],

0 commit comments

Comments
 (0)