Skip to content

fix(migrate): warn on uncoercible husky version instead of false positive#1124

Merged
fengmk2 merged 4 commits intovoidzero-dev:mainfrom
hamsurang:fix/migrate-husky-disttag-version-check
Mar 24, 2026
Merged

fix(migrate): warn on uncoercible husky version instead of false positive#1124
fengmk2 merged 4 commits intovoidzero-dev:mainfrom
hamsurang:fix/migrate-husky-disttag-version-check

Conversation

@jong-kyung
Copy link
Contributor

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 #1114

@netlify
Copy link

netlify bot commented Mar 24, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 7072892
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69c2966b6480eb000813b3f5

@jong-kyung
Copy link
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jong-kyung jong-kyung force-pushed the fix/migrate-husky-disttag-version-check branch from 1a8140c to df75cfc Compare March 24, 2026 09:56
@jong-kyung
Copy link
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fengmk2
Copy link
Member

fengmk2 commented Mar 24, 2026

@jong-kyung ci fails, please check again.

@jong-kyung
Copy link
Contributor Author

jong-kyung commented Mar 24, 2026

@jong-kyung ci fails, please check again.

Thank you for review. The migration-husky-latest-dist-tag-v9-installed fixture needs node_modules/husky/package.json for the detectPackageMetadata fallback, but it was gitignored. Force-added so CI has it too.

@fengmk2 fengmk2 merged commit 71b90b4 into voidzero-dev:main Mar 24, 2026
23 checks passed
@fengmk2
Copy link
Member

fengmk2 commented Mar 24, 2026

@jong-kyung Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vp migrate false-positive husky version check when version is a dist-tag or non-semver string ("latest", "next", etc.)

2 participants