Skip to content

v1.54.1: Bug fixes for stashing, Ruff, and conventional commits

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Aug 10:33
Immutable release. Only release title and notes can be modified.
164d17e

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 ruff and ruff_format builtins previously matched files only with **/*.py and **/*.pyi globs. They now select files using hk's Python type detection, so extensionless scripts with a Python shebang are linted and formatted alongside .py and .pyi files. Fixes discussion #1146.

  • Autosquash commit prefixes accepted by conventional-commit check (@smasato) #1142. hk util check-conventional-commit rejected the temporary commits created by git commit --fixup/--squash (and --fixup=amend), breaking git rebase --autosquash when check_conventional_commit was installed as a commit-msg hook. Titles starting with fixup! , squash! , or amend! 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_version errors no longer panic (@smasato) #1143. When min_hk_version in hk.pkl was 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 to exclusive = true, depends, or separate groups, rather than leaving users with Git's generic lock error. Documentation now steers authors toward stage for hk-owned staging and exclusive for 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.