Skip to content
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

add support for husky 9 #744

Open
aedison-tw opened this issue Apr 11, 2024 · 2 comments
Open

add support for husky 9 #744

aedison-tw opened this issue Apr 11, 2024 · 2 comments

Comments

@aedison-tw
Copy link

Unusable with husky v9

When using husky 9, the command fails with husky install is deprecated and husky add is deprecated:

~/temp_repositories/deletemerepo on main ?1 ........................................................................................................................................ took 9s at 20:15:40
> npm install husky jira-prepare-commit-msg --save-dev && npx husky install

added 27 packages, and audited 28 packages in 1s

4 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
install command is deprecated
~/temp_repositories/deletemerepo on main ?3 ................................................................................................................................................ at 20:16:08
> npx husky add .husky/prepare-commit-msg 'npx jira-prepare-commit-msg $1'
add command is deprecated

Workaround

Use husky v8 instead for now until husky 9 support is added

npm install [email protected] jira-prepare-commit-msg --save-dev && npx husky install
@InSuperposition
Copy link

InSuperposition commented Aug 18, 2024

After reviewing the husky docs for a new hook.

using git's prepare-commit-msg hook worked for me.

echo "npx jira-prepare-commit-msg $1" > .husky/prepare-commit-msg

@jt-metatheory
Copy link

The issue is that the new Husky system requires exiting with code !=0 to stop processing. so preparing commits is fine but pre-commit hooks don't work.

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

No branches or pull requests

3 participants