pypi / prek
prek
What changed in prek 0.5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
2 breaking9 new APIs and options18 performance2 behavior and defaults2 tooling10 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initprek 0.543 changes
Breaking changes 2
The check now rejects empty files.
The check now rejects trailing data.
New APIs and options 9
Adds the builtin hook check-commit-trailers for validating commit trailers.
Adds the builtin hook check-signed-commit for checking signed commits.
The hook adds a
--checkoption.The hook adds a
--checkoption.Project and user configuration can now use
hide_status.Hooks can be configured to include deleted files.
Shell completion generation is exposed for users.
The hook adds a
--checkoption.The hook adds a
--checkoption.
Performance 18
Reduces hook process launches by using balanced batches.
Unused file input is skipped for always-run hooks.
Bun and Deno version queries are shared across environments.
Cached hook environments are checked concurrently.
Only staged additions are queried for case-conflict checks.
Git queries run concurrently for case-conflict checks.
Untracked files are skipped in destroyed symlink checks.
Git discovery overlaps with worktree status checks.
Git worktree state is reused during hook startup.
Intent-to-add paths are reused when saving unstaged changes.
Lua runtime probes are shared across hook environments.
mise version queries are shared across hook environments.
Site initialization is skipped in Python interpreter probes.
JSON imports are avoided when querying Python interpreters.
Ruby version queries are shared across hook environments.
File reads are batched during shebang checks.
Worker overhead is reduced in XML and pygrep checks.
Builtin hook execution is faster; the end-to-end benchmark reports about 38% improvement over 0.5.3, with some hooks up to 273% faster.
Behavior and default changes 2
Shebang checks now default missing core.fileMode.
Builtin pattern hooks now support look-around regular expressions.
Tooling 2
Completion generation now supports Nushell.
Wheel and binary builds are now available for ppc64le.
Fixes and other changes 10
Accepts a UTF-8 BOM in JSON checked by the builtin hook.
Preserves unquoted dotted revisions when updating.
File sizes are rounded up.
Staged and unstaged changes are preserved when stash restore encounters conflicts.
Duplicate diffs are avoided after hooks rewrite files.
Protected branch patterns are matched from the start.
Explicit paths are normalized in shebang index checks.
Empty character sets are preserved.
Completion scripts resolve prek using PATH.
Transient rename failures are retried on Windows.