-
Notifications
You must be signed in to change notification settings - Fork 17
fix(package.json): don't fail on husky #452
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
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies the prepare
npm script to prevent build failures when husky is not available or fails to initialize. The change adds error handling to the husky command by using || exit 0
to ensure the script always exits successfully.
- Modified the
prepare
script to gracefully handle husky failures
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #452 +/- ##
=======================================
Coverage 74.55% 74.55%
=======================================
Files 107 107
Lines 10453 10453
Branches 681 681
=======================================
Hits 7793 7793
Misses 2658 2658
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with this change in principle, but very concerned why a consumer of this package would be running into this in the first place.
If it's used as a git dependency, lifecycle scripts are ran. |
Hm okay, that concerns me, esp. given having looked at the logs, it's doing |
Indeed it does (at least for pnpm), https://github.com/pnpm/pnpm/blob/main/exec/prepare-package/src/index.ts#L45 |
Fast-tracking.
Ref: nodejs/nodejs.org#8106 (comment)