Skip to content

Releases: pplmx/husky-rs

v0.2.2

09 Jan 10:10

Choose a tag to compare

πŸ§ͺ Testing

  • Test infrastructure refactoring: Consolidated test utilities into tests/common/mod.rs
  • Test reorganization: Merged 4 test files into 2 clear files (test_installation.rs, test_hooks.rs)
  • New test scenarios: Git worktrees, multiple hooks (10 types), error message validation
  • Total: 41 tests covering submodules, workspaces, worktrees, and edge cases

πŸ”§ CI/CD

  • Code coverage: Added coverage.yml workflow with tarpaulin and Codecov integration
  • Coverage badge: Added to README

πŸ“¦ Build

  • Makefile improvements:
    • Added make coverage target
    • Added make doc-check target
    • Included doc-check in make ci
    • Fixed CRLF line endings
  • .gitignore: Added coverage report files

v0.2.1

09 Jan 07:41

Choose a tag to compare

πŸ› Bug Fixes

  • CI/Cross-platform: Fixed lint errors, MSRV compliance (Rust 1.70), and race conditions in tests.
  • Windows Support: Improved test stability on Windows by skipping shell syntax validation where sh is unavailable.
  • Makefile: Added make ci and updated test commands to consistent with CI configuration.

v0.2.0

09 Jan 06:58

Choose a tag to compare

🎯 Highlights

This release transforms husky-rs into a production-ready Git hooks manager with optional advanced features while maintaining the zero-config philosophy.

Key additions:

  • πŸ”„ Smart hook change detection (no more cargo clean)
  • πŸ› οΈ Optional CLI tool (husky init/add/list)
  • πŸ“š Optional library API for advanced use cases
  • πŸ“– Comprehensive documentation suite

✨ New Features

Build Script Improvements

  • Granular rerun triggers β€” Individual hook file monitoring
    • Hooks automatically reinstall when modified
    • No more cargo clean required
  • Validation & warnings β€” Helpful feedback during build
    • Empty hook detection with clear warnings
    • Missing shebang detection with suggested defaults
  • Improved logging β€” Clear, informative output
    • Per-hook status: βœ“ pre-commit, βœ“ pre-push
    • Summary: Installed 3 Git hook(s)

Optional CLI Tool

Install with: cargo install husky-rs --features=cli

Command Description
husky init Create .husky/hooks directory
husky add <hook> Create hook from smart template
husky list List installed hooks with status
husky help Show help message
husky version Display version

Optional Library API

use husky_rs::{hooks_dir, should_skip_installation, is_valid_hook_name};
  • hooks_dir(path) β€” Get hooks directory path
  • should_skip_installation() β€” Check NO_HUSKY_HOOKS env var
  • is_valid_hook_name(name) β€” Validate Git hook names
  • SUPPORTED_HOOKS β€” All 27 supported hook names

πŸ“š Documentation

Document Description
Usage Guide Installation, configuration, advanced usage
Examples 13 ready-to-use hook examples
Troubleshooting Common issues and solutions
Contributing Development guide

Example collection includes:

  1. Running tests before commit
  2. Code formatting check
  3. Clippy linting
  4. Conventional commits validation
  5. Branch protection
  6. Comprehensive pre-push checks
  7. CI environment detection
  8. Multi-language project support
  9. And more...

πŸ§ͺ Testing

Metric Before After Change
Total tests 13 48 +269%
CLI coverage 0% 90% β€”
Lib coverage 40% 100% β€”
Example validation 0% 54% β€”

⚠️ Breaking Changes

Build script auto-detection: Hooks now automatically reinstall when source files change.

  • Impact: Workflows relying on manual hook reinstallation may behave differently
  • Migration: Use NO_HUSKY_HOOKS=1 if you need manual control
  • Benefit: Significantly improved developer experience

πŸ“¦ Package Updates

  • Version: 0.1.5 β†’ 0.2.0
  • MSRV: Rust 1.70+
  • Keywords: git, hooks, husky, development-tools, pre-commit
  • Categories: development-tools, command-line-utilities

v0.1.5

03 Jun 07:17

Choose a tag to compare

0.1.5 - 2025-06-03

πŸ› Bug Fixes

  • (ci) Resolve cross-drive temp dir issue on Windows runners - (5d0fa86)
  • Simplify build script testing - (3788868)

πŸ§ͺ Testing

  • Improve test coverage for different dependency types and scenarios - (5bc771e)

βš™οΈ Miscellaneous Tasks

  • (config) Migrate config .github/renovate.json - (d31336b)

New Contributors ❀️

v0.1.4

30 May 03:21

Choose a tag to compare

0.1.4 - 2025-05-30

πŸš€ Features

  • Refactor build script, enhance test coverage and fix symlink handling - (3268b99)
  • Enhance test coverage and cleanup build script - (c055073)

πŸ› Bug Fixes

  • Ensure NO_HUSKY_HOOKS respected in test environment - (c7bdbb4)
  • Address clippy lints in test suite - (cba70f1)

βš™οΈ Miscellaneous Tasks

  • (release) Bump version to 0.1.4 - (436cf97)

New Contributors ❀️

v0.1.3

17 Dec 04:11

Choose a tag to compare

0.1.3 - 2024-12-17

πŸ“š Documentation

  • Improve installation instructions - (915d8dd)

βš™οΈ Miscellaneous Tasks

v0.1.2

21 Nov 10:31

Choose a tag to compare

0.1.2 - 2024-11-21

πŸš€ Features

  • Impl Error for HuskyError - (171c357)
  • Use NO_HUSKY_HOOKS as environment - (f956189)
  • Support more shebang - (f51cd20)

πŸ› Bug Fixes

  • Prepare-commit-msg does not work - (d82eccd)

πŸ“š Documentation

🎨 Styling

πŸ§ͺ Testing

βš™οΈ Miscellaneous Tasks

  • Update the pre-commit - (29737ce)

Build

v0.1.1

30 Sep 11:39

Choose a tag to compare

0.1.1 - 2024-09-30

πŸ› Bug Fixes

πŸ“š Documentation

  • Clarify hook installation requirements - (e5b8f86)
  • Update the README - (0f6470f)
  • Update the README.md - (4ed3ce8)
  • Update the README.md - (14c6ece)

🎨 Styling

  • Use lf as line endings - (7bf1d7a)

πŸ§ͺ Testing

  • Use dev-dependencies - (5a75228)
  • Use the random temp dir - (8dec8dc)

βš™οΈ Miscellaneous Tasks

  • Split lint and test jobs across platforms - (f6f69be)

New Contributors ❀️

  • @github-actions[bot] made their first contribution

v0.1.0

30 Sep 06:29

Choose a tag to compare

[0.1.0] - 2024-09-30

πŸš€ Features

  • (structure) Standardize project structure for better organization - (095c14f)
  • Use only Rust std library - (a642bd8)
  • Remove the check of hook exists - (748f796)
  • Optimize the hooks generation - (8109887)

πŸ› Bug Fixes

  • Cannot create hooks on unix-like os - (383c300)

🚜 Refactor

πŸ“š Documentation

πŸ§ͺ Testing

  • Optimize the test cases - (82d6c09)
  • Add integration tests - (d8cde14)

βš™οΈ Miscellaneous Tasks