-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Upgrade huksy and lint-staged dependencies #2319
Conversation
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.
Thank you for the contribution. Could you please describe in a paragraph what does this update provides and also address my comments?
package.json
Outdated
@@ -20,22 +20,17 @@ | |||
"main": "index.js", | |||
"module": "esm/index.js", | |||
"scripts": { | |||
"postinstall": "husky install", |
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.
What's the point of this? Won't it will affect all users installing date-fns?
I can see they recommend using pinst: https://typicode.github.io/husky/#/?id=yarn-v2
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.
This project seem to use Yarn v1, I replace the postinstall
to the prepare
lifecycle.
If yarn v2 is used, we will need to change this.
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.
I mean users that install date-fns will have this command run and throw an error.
@@ -0,0 +1,4 @@ | |||
#!/bin/sh | |||
. "$(dirname "$0")/_/husky.sh" |
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.
I am not sure if you can verify that it works, but could you please add support for Windows? (There're few paragraphs about that in the documentation).
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.
I added the small helper for windows, it should be working.
The main pros of the new versions are that husky is really lightweight and allow to run any kind of scripts (bash, node, python). Other than that, it simply keep the project dependencies up to date. |
@jooola got you, thanks, please fix the issue with |
@kossnocorp Fixed the postinstall issue. I guess we cannot enforce the use of husky on the developer side. |
- Added subfolders files and ts files to the lint-staged glob pattern - New husky layout with .huksy folder and hooks inside - Using postinstall/prepare hooks for anything other than compilation seem to be a bad practise. See https://blog.typicode.com/husky-git-hooks-autoinstall/
Closing in favor of #2899 |
Upgraded huksy and lint-staged dependencies with some extra changes :