Skip to content

chore(deps): update dependency hk to v1.37.0#137

Merged
renovate[bot] merged 1 commit intomainfrom
renovate/hk-1.x
Mar 6, 2026
Merged

chore(deps): update dependency hk to v1.37.0#137
renovate[bot] merged 1 commit intomainfrom
renovate/hk-1.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Mar 6, 2026

This PR contains the following updates:

Package Update Change
hk minor 1.36.01.37.0

Release Notes

jdx/hk (hk)

v1.37.0: : Smarter Config, Hook-Level Env, and Better Fix/Check Semantics

Compare Source

This release overhauls global configuration handling, adds hook-level environment variables, and fixes several correctness issues in check/fix workflows.

Highlights

Overhauled global config (hkrc) -- The global user configuration has been significantly reworked. hk now supports the full Config.pkl format in hkrc files (not just UserConfig.pkl), fixing a panic when using the documented example with hooks and steps. The recommended config location is now ~/.config/hk/config.pkl, with clear "project wins" merge semantics. The legacy .hkrc.pkl paths and --hkrc flag are deprecated and will be removed in v2. Thanks @​ivy! #​710

Hook-level env support -- Hooks can now define environment variables that are automatically passed to all their steps, reducing duplication when multiple steps need the same variables. Step-level env takes precedence over hook-level env. #​709

check_diff correctness in check mode -- Previously, steps with check_diff defined would always run the diff command first, even in check mode. This could hide non-auto-fixable errors when the diff command exited 0. The diff-first shortcut is now gated to fix mode only. Thanks @​nkakouros! #​717

Added

  • Hook-level env: Define environment variables once per hook instead of repeating them on every step. Step-level env takes precedence when both define the same variable. (@​jdx) #​709

    hooks {
        ["pre-push"] {
            env {
                ["HK_PROFILES"] = "types"
            }
            steps = linters
        }
    }
  • Go-style diff parsing: hk now correctly handles unified diffs where the --- line has a .orig suffix (common with Go tools like gofmt -d). (@​jdx, co-authored by @​thejcannon) #​704

  • XDG config directory support: Global configuration can now be placed at ~/.config/hk/config.pkl (or a custom path via HK_CONFIG_DIR). (@​ivy) #​710

  • Config precedence documentation: A clear precedence table and hkrc merge semantics are now documented, covering built-in defaults through CLI flags. (@​ivy) #​701 #​710

Fixed

  • end-of-file-fixer now enforces that files end with exactly one trailing newline, matching pre-commit-hooks behavior. Previously it would add a missing newline but leave multiple trailing newlines untouched. (@​jdx) #​708

  • pre-commit with stash no longer passes untracked files to linters as input. Untracked files were incorrectly included in the unstaged files set, causing them to be processed during hk run pre-commit. Thanks @​nkakouros! #​716

  • check_diff in check mode no longer silently swallows errors. When a step defines check_diff, hk previously ran the diff command first in all modes. If the diff command exited 0 (no auto-fixable issues), non-auto-fixable violations detected by the regular check command were hidden. The diff-first shortcut is now only used in fix mode. Thanks @​nkakouros! #​717

  • hkrc format support: Global config files can now use the full Config.pkl format with hooks containing steps that have check, fix, and glob fields. Previously this caused a panic because hk always deserialized hkrc as UserConfig. (@​ivy) #​710

  • hkrc discovery path: Default hkrc discovery now correctly checks ~/.hkrc.pkl and ~/.config/hk/config.pkl, instead of only looking for .hkrc.pkl relative to the current directory. (@​ivy) #​710

  • --all flag documentation now correctly describes what the flag does. Thanks @​nkakouros! #​715

Deprecated

  • .hkrc.pkl and --hkrc flag are deprecated and will be removed in hk v2. Use ~/.config/hk/config.pkl for global configuration or hk.local.pkl in the project root for per-project overrides. Deprecation warnings are shown when legacy paths are used. #​710

New Contributors

Full Changelog: jdx/hk@v1.36.0...v1.37.0


Configuration

📅 Schedule: Branch creation - "before 4am on friday" in timezone America/Chicago, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 6, 2026

PR author is in the excluded authors list.

@renovate renovate bot force-pushed the renovate/hk-1.x branch from 1243511 to aec1f9c Compare March 6, 2026 13:57
@renovate renovate bot merged commit 971c8b0 into main Mar 6, 2026
3 checks passed
@renovate renovate bot deleted the renovate/hk-1.x branch March 6, 2026 17:36
@jdx jdx mentioned this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants