dart_husky 1.2.1
dart_husky: ^1.2.1 copied to clipboard
A pure-Dart CLI tool to manage Git hooks (pre-commit, commit-msg, pre-push) in any Dart or Flutter project. Similar to husky and lefthook.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.2.1 - 2026-05-30 #
CI #
- Dependabot Integration: Configured Dependabot for weekly updates of packages within the
pubecosystem. - PR Title Validation: Setup GitHub Actions workflow to validate PR titles against Conventional Commit patterns.
1.2.0 - 2026-05-30 #
Added #
- Glob Pattern Filtering: Integrated
globpackage to filter command execution. Hooks can be configured with aglobpattern (e.g.,glob: '**/*.dart'), skipping execution if no staged files match the glob sequence. - Lowercase Commit Message Check: Added the
only_small_caseconfiguration flag (enabled by default) to enforce fully lowercase formats for commit messages under the conventional preset. - Lazy Staged File Querying: Optimized performance in
HookRunnerby retrieving staged files only when a command withglobpattern orstaged_only: trueis configured.
1.1.0 - 2026-05-30 #
Added #
- Staged-Only Mode: Added support for running hook commands on git staged files only. Configurable globally under
dart_husky: staged_only: true/falseor overridden at individual command levels. If files are staged, they are appended to the command execution; if no files are staged, the command is skipped. - Custom Commit-Msg Types: Added
appendandoverrideconfiguration to thecommit-msgpreset conventional validator, allowing users to append custom commit types or completely override the built-in list. - Verbose Output Toggle: Introduced global
verbosesetting to enable/disable detailed execution logs. - Git Utilities: Added
GitUtilsto retrieve currently staged files usinggit diff --cached --name-onlydynamically.
1.0.1 - 2026-05-30 #
Added #
- Example Usage: Introduced a package usage example illustrating the declarative
dart_husky.yamlsetup. - New lint prefix support:
bumpprefix is added to commit message validator.
Documented #
- API Documentation: Added comprehensive, high-quality Dartdoc comments to all public models, config configurations, validators, and classes to elevate package API clarity and maximize the pub.dev score.
1.0.0 - 2026-05-30 #
Added #
- Pure-Dart CLI Tooling: Lightweight, zero-dependency Git hooks manager designed specifically for Dart and Flutter projects.
- Robust Hook Installer: Installs custom lightweight shell scripts into
.git/hooks/that automatically detect and support both globaldartandfvm dartenvironments. - Declarative YAML Configuration: Set up all your project's hook commands inside a single
dart_husky.yamlfile. - Sequential & Parallel Command Execution: Speed up your development workflow by executing hook commands in parallel (
parallel: true) or sequentially (default). - Built-in Conventional Commits Preset: Out-of-the-box support for validating commit messages against the Conventional Commits specification (supports types:
feat,fix,chore,docs,style,refactor,test,build,ci,perf,revert). - Comprehensive CLI Interface:
dart run dart_husky install— Installs or syncs all hooks configured indart_husky.yaml.dart run dart_husky uninstall— Safely removes alldart_huskymanaged Git hooks.dart run dart_husky run <hook-name>— Manually run/test hook commands.dart run dart_husky list— Display all configured hooks and their installation status.
- Supported Hooks: Native support for
pre-commit,commit-msg,pre-push,post-checkout, andpre-merge-commit. - Platform Support: Verified compatibility with macOS environments.