Commit 71b90b4
authored
fix(migrate): warn on uncoercible husky version instead of false positive (#1124)
## Summary
- Fix false positive "husky <9.0.0" warning in `vp migrate` when husky
version is a dist-tag (`"latest"`, `"next"`) or other non-semver string
- When `semver.coerce()` returns `null`, warn the user to specify a
semver-compatible version instead of silently falling back to `'0.0.0'`
- Change `checkUnsupportedHuskyVersion` return type from `boolean` to
`string | null` to co-locate message logic with version checking
Closes #11141 parent 01693e3 commit 71b90b4
10 files changed
Lines changed: 124 additions & 7 deletions
File tree
- packages/cli
- snap-tests-global
- migration-husky-latest-dist-tag-v9-installed
- .husky
- node_modules/husky
- migration-husky-latest-dist-tag
- .husky
- src/migration
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1510 | 1510 | | |
1511 | 1511 | | |
1512 | 1512 | | |
1513 | | - | |
1514 | | - | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
1515 | 1517 | | |
1516 | 1518 | | |
| 1519 | + | |
1517 | 1520 | | |
1518 | 1521 | | |
1519 | | - | |
| 1522 | + | |
1520 | 1523 | | |
1521 | 1524 | | |
1522 | | - | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
1523 | 1539 | | |
1524 | | - | |
| 1540 | + | |
1525 | 1541 | | |
1526 | 1542 | | |
1527 | 1543 | | |
| |||
1635 | 1651 | | |
1636 | 1652 | | |
1637 | 1653 | | |
1638 | | - | |
1639 | | - | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
1640 | 1657 | | |
1641 | 1658 | | |
1642 | 1659 | | |
| |||
0 commit comments