Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Feb 10:49
· 44 commits to main since this release

🎯 Highlights

This release marks a significant architectural shift to the Modern Husky approach, using Git's native core.hooksPath configuration for better performance, flexibility, and support for auxiliary scripts.

⚠️ Breaking Changes

  • Hook Location: Hooks are now stored directly in .husky/ instead of .husky/hooks/.
  • Mechanism Shift: Switched from copying/wrapping hooks to using git config core.hooksPath .husky.
  • Directory Structure: The .husky/hooks/ subdirectory is no longer used; move your hooks to .husky/.
  • CLI Feature: The cli feature has been removed. The husky binary is now included by default without extra configuration.

✨ New Features

  • Helper Script Support: Arbitrary files (like _helpers.sh) can now be stored in .husky/ and sourced from hooks.
  • Runtime Control: Support for HUSKY=0 environment variable to skip hooks at runtime (e.g., HUSKY=0 git commit).
  • Runtime Helper: Added .husky/_/husky.sh which can be sourced by hooks for standardized behavior.
  • CLI Enhancements:
    • husky init: Now configures core.hooksPath immediately and creates the _/husky.sh helper.
    • husky uninstall: New command to unset core.hooksPath.
    • husky add: Templates updated to include _/husky.sh sourcing example.

🚀 Performance & Robustness

  • Incremental Builds: build.rs now checks core.hooksPath before calling git config, speeding up builds.
  • Graceful Degradation: Better handling of environments without git command or outside git repositories.