A small patch release focused on bug fixes across stashing, builtins, config error handling, and conventional-commit validation.
Fixed
-
Fixer output preserved with
stage=false/fail_on_fix=true(@jdx) #1145. When smart stashing was combined with disabled auto-staging, stash restoration used the post-hook index as the fixer side of its three-way merge. Since the fixer only touched the isolated worktree in that mode, restoration saw no change and silently discarded the formatter output. hk now uses worktree content as the fixer input, merges it with the user's saved unstaged edits, and leaves the original index untouched. Fixes discussion #1144. -
Ruff builtins detect extensionless Python scripts (@jdx) #1147. The
ruffandruff_formatbuiltins previously matched files only with**/*.pyand**/*.pyiglobs. They now select files using hk's Python type detection, so extensionless scripts with a Python shebang are linted and formatted alongside.pyand.pyifiles. Fixes discussion #1146. -
Autosquash commit prefixes accepted by conventional-commit check (@smasato) #1142.
hk util check-conventional-commitrejected the temporary commits created bygit commit --fixup/--squash(and--fixup=amend), breakinggit rebase --autosquashwhencheck_conventional_commitwas installed as acommit-msghook. Titles starting withfixup!,squash!, oramend!are now skipped, matching commitlint's default behavior. A bang without a trailing space (fixup!chore: ...) is still validated. Requested in discussion #902. -
min_hk_versionerrors no longer panic (@smasato) #1143. Whenmin_hk_versioninhk.pklwas newer than the running hk, the error surfaced through a Rust panic (aborting with SIGABRT when triggered from a git hook). Config-load errors now propagate cleanly with exit code 1 and readable context instead of a backtrace. -
Clearer guidance for git index lock conflicts (@jdx) #1140. When a failed step's output references Git's
index.lock, hk now prints a single end-of-run hint (suppressed with--silent) pointing toexclusive = true,depends, or separate groups, rather than leaving users with Git's generic lock error. Documentation now steers authors towardstagefor hk-owned staging andexclusivefor legacy commands that write the index directly. Addresses discussion #1139.
Full Changelog: v1.54.0...v1.54.1
💚 Sponsor hk
hk is maintained by @jdx, an open source developer for entire.io, the title sponsor of the jdx.dev open source tools including mise, aube, and more. Work on hk is funded by sponsorships.
If hk has sped up your pre-commit loop or made linting feel less painful, please consider sponsoring at jdx.dev. Sponsorships are what keep hk moving and the project independent.