Packages

husky

9.1.7 · 18 Nov 2024MIT49.9M / weekRepositoryHomepagenpmAtom feed

Your version

6.0.0

major29 Mar 2021Where it was published

In short

2 breaking2 new

  • breaking

    husky init has been moved to its own package (npx husky-init)

  • breaking

    Husky 6 contains breaking changes.

Release note

After being in early access for Open Source projects and Sponsors for a limited time, I'm happy to announce that husky 6 is MIT again and can be freely used in commercial projects! 🎉

Many thanks to the Open Source projects and Companies which have switched to/sponsored the new husky during this period!

OSS is my full-time job, please consider sponsoring the development of husky on GitHub sponsors or Open Collective. Thank you!

Breaking change

  • breaking

    husky init has been moved to its own package (npx husky-init)

Added

  • Programmatically use husky: require('husky')

  • TypeScript definitions

Migrating from husky 4

Husky 6 contains breaking changes. If you're coming from v4, npm install husky@6 won't be enough.

Recommended: see husky-4-to-6 CLI to automatically migrate your config. There's also a dedicated section in the docs.

If you're curious why config has changed, you may be interested in reading:
blog.typicode.com/husky-git-hooks-javascript-co…

Also Husky 6 follows official npm and Yarn best practices regarding autoinstall. It's recommended to use prepare script instead (see usage in docs).