hk 2.0.0: Gemeinsame Steps, kontextabhängiges Staging, v1 entfernt
hk 2.0.0 führt eine gemeinsame Top-Level-steps-Map ein, stagt Fixes standardmäßig nur noch in pre-commit, macht Builtin-Varianten zu typisierten Optionen, entfernt die veraltete v1-Konfiguration und bringt neun neue Builtins, weshalb die hk.pkl beim Upgrade geprüft werden muss.
hk 2.0 simplifies configuration around a single shared steps map, stages fixed files only in pre-commit by default, turns builtin variants into typed options, and removes the deprecated v1 configuration files and entry points. Upgrading requires reviewing your hk.pkl; see Breaking Changes below and the v2 migration guide.
Highlights
- Less repetition in
hk.pkl: a top-levelstepsblock now defines thecheck,fix, andpre-commithooks at once, and builtin variants such asgitleaks_stagedorpinact_v3are replaced by options on the primary builtin (#1255, #1253). - Predictable staging: only
pre-commitstages fixes automatically;hk fixand custom hooks leave the index alone unless you ask (#1256). - Pkl only:
hk.toml/yaml/json,.hkrc.pkl,UserConfig.pkl,hk generate, and the externalpklCLI fallback are gone; hk reports a targeted replacement for each removed input (#1257). - Nine new builtins for Terraform, Terragrunt, Kubernetes, Markdown, and repository hygiene, plus fixes to
rubocop,tf_lint, andzizmor.