Commit b4fa6e7
committed
fix(cli): pass options to semver.valid() for loose version validation
The `--loose` flag was not being applied when validating input versions.
The `options` object was already computed and passed to `coerce()` and
`satisfies()`, but the `filter()` call using `semver.valid(v)` was missing
the options parameter.
This meant that loose versions like `1.2.3beta` would fail validation
even when `-l` was specified, despite the documentation stating that
`-l --loose` will "Interpret versions and ranges loosely".1 parent d4f0f86 commit b4fa6e7
File tree
3 files changed
+18
-11
lines changed- bin
- tap-snapshots/test/bin
- test/bin
3 files changed
+18
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | 351 | | |
361 | 352 | | |
362 | 353 | | |
| |||
454 | 445 | | |
455 | 446 | | |
456 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
462 | 466 | | |
463 | 467 | | |
464 | 468 | | |
| |||
477 | 481 | | |
478 | 482 | | |
479 | 483 | | |
| 484 | + | |
480 | 485 | | |
481 | 486 | | |
482 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
0 commit comments