-
Notifications
You must be signed in to change notification settings - Fork 129
fix(migrate): warn on uncoercible husky version instead of false positive #1124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fengmk2
merged 4 commits into
voidzero-dev:main
from
hamsurang:fix/migrate-husky-disttag-version-check
Mar 24, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
df75cfc
fix(migrate): warn on uncoercible husky version instead of false posi…
jong-kyung 730c45a
fix(migrate): fall back to installed husky version when specifier is …
jong-kyung 2661f72
Merge branch 'main' into fix/migrate-husky-disttag-version-check
jong-kyung 7072892
fix(snap-test): track fixture node_modules/husky for dist-tag fallbac…
jong-kyung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ages/cli/snap-tests-global/migration-husky-latest-dist-tag-v9-installed/.husky/pre-commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| pnpm lint-staged |
4 changes: 4 additions & 0 deletions
4
...tests-global/migration-husky-latest-dist-tag-v9-installed/node_modules/husky/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
packages/cli/snap-tests-global/migration-husky-latest-dist-tag-v9-installed/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "name": "migration-husky-latest-dist-tag-v9-installed", | ||
| "scripts": { | ||
| "prepare": "husky" | ||
| }, | ||
| "devDependencies": { | ||
| "husky": "latest", | ||
| "lint-staged": "^16.2.6", | ||
| "vite": "^7.0.0" | ||
| }, | ||
| "lint-staged": { | ||
| "*.js": "oxlint --fix" | ||
| } | ||
| } |
27 changes: 27 additions & 0 deletions
27
packages/cli/snap-tests-global/migration-husky-latest-dist-tag-v9-installed/snap.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| > git init | ||
| > vp migrate --no-interactive # should resolve husky v9 from node_modules, no warning | ||
| VITE+ - The Unified Toolchain for the Web | ||
|
|
||
| ◇ Migrated . to Vite+<repeat> | ||
| • Node <semver> pnpm <semver> | ||
| • 2 config updates applied | ||
| • Git hooks configured | ||
|
|
||
| > cat package.json # husky and lint-staged should be removed | ||
| { | ||
| "name": "migration-husky-latest-dist-tag-v9-installed", | ||
| "scripts": { | ||
| "prepare": "vp config" | ||
| }, | ||
| "devDependencies": { | ||
| "vite": "npm:@voidzero-dev/vite-plus-core@latest", | ||
| "vite-plus": "latest" | ||
| }, | ||
| "pnpm": { | ||
| "overrides": { | ||
| "vite": "npm:@voidzero-dev/vite-plus-core@latest", | ||
| "vitest": "npm:@voidzero-dev/vite-plus-test@latest" | ||
| } | ||
| }, | ||
| "packageManager": "pnpm@<semver>" | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/cli/snap-tests-global/migration-husky-latest-dist-tag-v9-installed/steps.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "commands": [ | ||
| { "command": "git init", "ignoreOutput": true }, | ||
| "vp migrate --no-interactive # should resolve husky v9 from node_modules, no warning", | ||
| "cat package.json # husky and lint-staged should be removed" | ||
| ] | ||
| } |
1 change: 1 addition & 0 deletions
1
packages/cli/snap-tests-global/migration-husky-latest-dist-tag/.husky/pre-commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| pnpm lint-staged |
10 changes: 10 additions & 0 deletions
10
packages/cli/snap-tests-global/migration-husky-latest-dist-tag/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "name": "migration-husky-latest-dist-tag", | ||
| "scripts": { | ||
| "prepare": "husky" | ||
| }, | ||
| "devDependencies": { | ||
| "husky": "latest", | ||
| "vite": "^7.0.0" | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
packages/cli/snap-tests-global/migration-husky-latest-dist-tag/snap.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| > git init | ||
| > vp migrate --no-interactive # should warn about uncoercible husky version | ||
| VITE+ - The Unified Toolchain for the Web | ||
|
|
||
|
|
||
| ⚠ Could not determine husky version from "latest" — please specify a semver-compatible version (e.g., "^9.0.0") and re-run migration. | ||
| ◇ Migrated . to Vite+<repeat> | ||
| • Node <semver> pnpm <semver> | ||
| • 1 config update applied | ||
|
|
||
| > cat package.json # husky should still be in devDeps | ||
| { | ||
| "name": "migration-husky-latest-dist-tag", | ||
| "scripts": { | ||
| "prepare": "husky" | ||
| }, | ||
| "devDependencies": { | ||
| "husky": "latest", | ||
| "vite": "npm:@voidzero-dev/vite-plus-core@latest", | ||
| "vite-plus": "latest" | ||
| }, | ||
| "pnpm": { | ||
| "overrides": { | ||
| "vite": "npm:@voidzero-dev/vite-plus-core@latest", | ||
| "vitest": "npm:@voidzero-dev/vite-plus-test@latest" | ||
| } | ||
| }, | ||
| "packageManager": "pnpm@<semver>" | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/cli/snap-tests-global/migration-husky-latest-dist-tag/steps.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "commands": [ | ||
| { "command": "git init", "ignoreOutput": true }, | ||
| "vp migrate --no-interactive # should warn about uncoercible husky version", | ||
| "cat package.json # husky should still be in devDeps" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.