-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
Nice! I was worried this caused too much trouble for you guys that I wanted to submit a PR to revert the husky update so that you take your time :) PS. the executable bit is copied |
0d763ad
to
a604d01
Compare
@@ -69,7 +63,6 @@ | |||
"@netlify/eslint-config-node": "^4.1.2", | |||
"ava": "^3.0.0", | |||
"from2-string": "^1.1.0", | |||
"husky": "^4.3.8", | |||
"nock": "^13.0.0", | |||
"npm-run-all": "^4.1.5", |
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.
@ehmicky @erezrokah Might be worth droping npm-run-all from the direct devDependencies in your projects since it's included in @netlify/eslint-config-node. Just thinking out loud :)
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 believe you are correct.
Binary symlinks seem to be installed by npm
to node_modules/.bin/
for both direct and indirect dependencies. That being said, I am 100% sure this is the case on other package managers, but we could try it out and see if anyone mentions it not working.
Also, just to confirm, are we sure you don't need a I'm trying this locally and I don't see any hooks running |
I still think it's probably worth reverting the husky update... I personally cannot make it work here even with It only worked for @netlify/eslint-config-node and it wrongfully made me think it worked, but it's too troublesome. |
Yes, I can confirm the That being said, there might still be some ways to be make it work automatically, I'm exploring those right now. Also, I would be interested in ways to avoid duplicating the contents of each Git hook. For example, if we wanted to pass new flags to |
This PR currently has a merge conflict. Please resolve this and then re-add the |
I'm hear you, I just think the husky update should be reverted, cut a new patch release so that you have things working and experiment in another branch with this. Better have something working than nothing :) |
6e683ad
to
4922d21
Compare
4922d21
to
e9316c5
Compare
I think I made it work! I went with your suggestion @XhmikosR of using a I have been digging in the This works for me locally. This should work with most package managers and OS, I believe. Additionally, since each repository targets Please try it out and let me if this works on your machine too! @XhmikosR Let's see if you still get an error related to not finding the |
Still fails here :/
|
Thanks for the information. I think we should find a solution to get the right binary file path. Could you try to manually edit |
npx works :) Another solution would be to extend the Makes me wonder though, how come no one else had these issues, maybe we are missing something. Or it's because of the shared husky config approach? |
Great, let's add Personally, my |
Yeah, you know, Windows 👼 Glad you got it sorted it out after all. I hope the second project you migrate is a lot easier 🙂 |
The |
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've tried it and works like a charm thx for fixing 💪
This fixes Git hooks with the new version of Husky (see netlify/eslint-config-node#403).
The steps are:
@netlify/eslint-config-node
to4.1.2
npm uninstall husky
husky
property inpackage.json
prepare
script topackage.json
cc @XhmikosR