unstale

pypi / prek

prek

What changed in prek 0.3 to 0.5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

18 breaking7 security71 new APIs and options36 performance48 behavior and defaults8 tooling69 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

prek 0.577 changes

Breaking changes 7

  • The check now rejects empty files.

    0.5.5release notes

  • The check now rejects trailing data.

    0.5.5release notes

  • Unsupported YAML tags are now rejected.

    0.5.1release notes

  • Group names can no longer start with @, reserving that prefix for special group selectors.

    0.5.0release notes

  • Remove this command; use prek update, or prek autoupdate for drop-in compatibility with pre-commit.

    0.5.0release notes

  • Remove the top-level command; use prek util init-template-dir, or prek init-templatedir for drop-in compatibility with pre-commit.

    0.5.0release notes

  • Remove this environment variable; use PREK_CONCURRENT_HOOKS and PREK_CONCURRENT_BATCHES to control hook and per-hook batch concurrency separately.

    0.5.0release notes

Security 2

  • CA root crates and uv were updated in response to the eMudhra intermediate CA compromise.

    0.5.7release notes

  • PyPI releases now include PEP 740 attestations, which developers can use to verify release provenance.

    0.5.3release notes

New APIs and options 20

  • Adds the builtin hook check-commit-trailers for validating commit trailers.

    0.5.6release notes

  • Adds the builtin hook check-signed-commit for checking signed commits.

    0.5.6release notes

  • The hook adds a --check option.

    0.5.4release notes

  • The hook adds a --check option.

    0.5.4release notes

  • Project and user configuration can now use hide_status.

    0.5.4release notes

  • Hooks can be configured to include deleted files.

    0.5.4release notes

  • Shell completion generation is exposed for users.

    0.5.4release notes

  • The hook adds a --check option.

    0.5.4release notes

  • The hook adds a --check option.

    0.5.4release notes

  • Automatic uv installation can now be disabled.

    0.5.3release notes

  • A new builtin hook, check-jsonc, is available for checking JSONC files.

    0.5.3release notes

  • Adds a hook-report option to hide passed, failed, or skipped hooks.

    0.5.1release notes

  • Adds Pixi support for Conda environments.

    0.5.1release notes

  • Adds a command for repository setup.

    0.5.1release notes

  • Support the {hook_repo} placeholder in a hook's entry.

    0.5.0release notes

  • Explicit language: python opts out of fast-path hooks.

    0.5.0release notes

  • Add a source preference alongside the version request to control whether prek tries managed or system toolchains first, or requires one source.

    0.5.0release notes

  • Use this environment variable to control per-hook batch concurrency separately.

    0.5.0release notes

  • Use this environment variable to control hook concurrency separately.

    0.5.0release notes

  • Add a group selector for hooks that are not assigned to a group.

    0.5.0release notes

Performance 19

  • CPU-heavy builtin hooks use blocking file checks.

    0.5.7release notes

  • Reduces hook process launches by using balanced batches.

    0.5.6release notes

  • Unused file input is skipped for always-run hooks.

    0.5.5release notes

  • Bun and Deno version queries are shared across environments.

    0.5.5release notes

  • Cached hook environments are checked concurrently.

    0.5.5release notes

  • Only staged additions are queried for case-conflict checks.

    0.5.5release notes

  • Git queries run concurrently for case-conflict checks.

    0.5.5release notes

  • Untracked files are skipped in destroyed symlink checks.

    0.5.5release notes

  • Git discovery overlaps with worktree status checks.

    0.5.5release notes

  • Git worktree state is reused during hook startup.

    0.5.5release notes

  • Intent-to-add paths are reused when saving unstaged changes.

    0.5.5release notes

  • Lua runtime probes are shared across hook environments.

    0.5.5release notes

  • mise version queries are shared across hook environments.

    0.5.5release notes

  • Site initialization is skipped in Python interpreter probes.

    0.5.5release notes

  • JSON imports are avoided when querying Python interpreters.

    0.5.5release notes

  • Ruby version queries are shared across hook environments.

    0.5.5release notes

  • File reads are batched during shebang checks.

    0.5.5release notes

  • Worker overhead is reduced in XML and pygrep checks.

    0.5.5release notes

  • 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.

    0.5.4release notes

Behavior and default changes 8

  • prek supports system Rust toolchains without requiring rustup.

    0.5.7release notes

  • Shebang checks now default missing core.fileMode.

    0.5.5release notes

  • Builtin pattern hooks now support look-around regular expressions.

    0.5.4release notes

  • check-yaml allows unknown tags by default, so developers no longer need to configure around them.

    0.5.2release notes

  • Error snippets are disabled in check-yaml diagnostics.

    0.5.1release notes

  • The hook's env setting is now applied during environment creation.

    0.5.1release notes

  • Hooks excluded by skip selectors are now shown.

    0.5.1release notes

  • Unused keys in user settings now trigger a warning.

    0.5.1release notes

Tooling 4

  • Completion generation now supports Nushell.

    0.5.5release notes

  • Wheel and binary builds are now available for ppc64le.

    0.5.5release notes

  • Adds cargo-binstall support for Rust CLI dependencies.

    0.5.1release notes

  • A JSON schema is generated for the prek manifest.

    0.5.1release notes

Fixes and other changes 17

  • Accepts a UTF-8 BOM in JSON checked by the builtin hook.

    0.5.6release notes

  • Preserves unquoted dotted revisions when updating.

    0.5.6release notes

  • File sizes are rounded up.

    0.5.5release notes

  • Staged and unstaged changes are preserved when stash restore encounters conflicts.

    0.5.5release notes

  • Duplicate diffs are avoided after hooks rewrite files.

    0.5.5release notes

  • Protected branch patterns are matched from the start.

    0.5.5release notes

  • Explicit paths are normalized in shebang index checks.

    0.5.5release notes

  • Empty character sets are preserved.

    0.5.5release notes

  • Completion scripts resolve prek using PATH.

    0.5.4release notes

  • Transient rename failures are retried on Windows.

    0.5.4release notes

  • Fixed handling of additional dependency specifiers for Julia.

    0.5.3release notes

  • Fixed YAML flow indentation parsing.

    0.5.3release notes

  • Track explicit config paths as absolute paths.

    0.5.0release notes

  • Expose the git work tree to hooks running outside the git root.

    0.5.0release notes

  • Preserve error locations when deserializing hook configuration.

    0.5.0release notes

  • Resolve hook log files from their config directory.

    0.5.0release notes

  • Isolate local hook environment installation.

    0.5.0release notes

prek 0.4106 changes

Breaking changes 9

  • Removes parallel Ruby gem installation.

    0.4.9release notes

  • Renames auto-update to update.

    0.4.8release notes

  • A concurrency environment variable is added for batches as run concurrency knobs are split.

    0.4.6release notes

  • A concurrency environment variable is added for hooks as run concurrency knobs are split.

    0.4.6release notes

  • Removes support for legacy repository paths.

    0.4.5release notes

  • language_version no longer accepts direct executable paths; use system for a system toolchain or a supported version request instead.

    0.4.0release notes

  • Generated hook scripts no longer preserve --no-progress passed to prek install, so this flag is not baked into installed hooks.

    0.4.0release notes

  • Generated hook scripts no longer preserve -q passed to prek install, so this flag is not baked into installed hooks.

    0.4.0release notes

  • Generated hook scripts no longer preserve -v passed to prek install, so this flag is not baked into installed hooks.

    0.4.0release notes

Security 2

  • Verifies uv release archive checksums.

    0.4.12release notes

  • Managed toolchain downloads are verified before installation.

    0.4.6release notes

New APIs and options 25

  • check-yaml now supports unsafe mode.

    0.4.14release notes

  • Adds the deny-filename-pattern hook.

    0.4.13release notes

  • Runs an explicit command in a configured hook's prepared environment, making that hook's managed binaries available.

    0.4.13release notes

  • Adds the require-filename-pattern hook.

    0.4.13release notes

  • Adds --require-group to select hook group intersections.

    0.4.12release notes

  • A builtin hook fails when a configured pattern is found, providing a native alternative to pygrep that runs over 4x faster in benchmarks. Patterns use Rust regex syntax, which does not support look-around.

    0.4.11release notes

  • Node hooks can now be installed through a git URL.

    0.4.11release notes

  • Adds --glob <PATTERN> to run hooks on tracked files matching a glob; the option can be repeated or combined with --files and --directory.

    0.4.11release notes

  • Hook priorities can use reusable aliases declared in a [priorities] table, making parallel scheduling easier to read and maintain.

    0.4.11release notes

  • A builtin hook ensures every selected file contains a match, providing a native alternative to pygrep that runs over 4x faster in benchmarks. Patterns use Rust regex syntax, which does not support look-around.

    0.4.11release notes

  • requirements-txt-fixer is implemented as a builtin hook.

    0.4.11release notes

  • PHP language support was added.

    0.4.10release notes

  • A freeze option was added to update settings.

    0.4.10release notes

  • Tag filters were added to update configuration.

    0.4.10release notes

  • Adds the default_env configuration option.

    0.4.8release notes

  • This environment variable opts out of Docker --init.

    0.4.6release notes

  • Adds Conda language support for hooks.

    0.4.5release notes

  • Adds coursier language support for hooks.

    0.4.5release notes

  • Adds Perl language support for hooks.

    0.4.5release notes

  • Adds group filters to the list command.

    0.4.5release notes

  • Adds R language support for hooks.

    0.4.5release notes

  • Hooks can be tagged with groups so different workflows can select or exclude hook sets without splitting the config.

    0.4.4release notes

  • Select hooks in a group at run time, allowing a config to support different workflows.

    0.4.4release notes

  • Exclude hooks in a group at run time, allowing a config to support different workflows.

    0.4.4release notes

  • The rustup install profile is now configurable.

    0.4.2release notes

Performance 15

  • Allocations are reused in common filters to improve performance.

    0.4.14release notes

  • Node version queries are cached.

    0.4.13release notes

  • Avoids environment cache scans for skipped hooks.

    0.4.13release notes

  • Tracks builtin hook file changes directly.

    0.4.12release notes

  • Precomputes file tags in parallel.

    0.4.12release notes

  • Skips diffs after hook modifications are already known.

    0.4.12release notes

  • Skips worktree diffs for read-only languages.

    0.4.12release notes

  • Blocking-pool overhead is reduced in file hooks.

    0.4.11release notes

  • Mixed-line-ending scans are faster with memchr2.

    0.4.11release notes

  • Unnecessary submodule updates during hook repository cloning are skipped.

    0.4.6release notes

  • Skips file scans for always-run hooks that do not receive filenames.

    0.4.5release notes

  • Clean worktrees use a cheap dirty check unless a hook changes files, reducing expensive diff work.

    0.4.2release notes

  • Diff checks are skipped for built-in hooks known to be read-only, reducing unnecessary work.

    0.4.2release notes

  • Optimizes meta hook file scans.

    0.4.1release notes

  • Reduces allocations during run filtering.

    0.4.1release notes

Behavior and default changes 25

  • File regexes are matched against path bytes.

    0.4.13release notes

  • Hook aliases are shown in run output.

    0.4.13release notes

  • Hook descriptions are shown in run output.

    0.4.13release notes

  • Output adapts to whether it is running in a terminal.

    0.4.13release notes

  • Aligns fast-path and builtin pre-commit hook behavior.

    0.4.12release notes

  • With --force, prek install bypasses external hooks paths.

    0.4.12release notes

  • Installs uv from the Astral CDN and drops source racing.

    0.4.12release notes

  • Shows builtin hook flags in verbose list output.

    0.4.12release notes

  • The file list is no longer shuffled in verbose output.

    0.4.12release notes

  • try-repo now supports builtin and meta.

    0.4.10release notes

  • Changes the repository identity schema stored in cached hook environments; existing environments are invalidated and prek reinstalls them automatically when needed.

    0.4.9release notes

  • Preserves additional dependency order.

    0.4.9release notes

  • Warns when update repositories are missing.

    0.4.9release notes

  • Subprocess error messages are improved, helping developers understand failures.

    0.4.6release notes

  • Fully filtered remote repositories are no longer cloned.

    0.4.5release notes

  • Hook stream output now shows a small live preview under the running hook in the progress UI, making long-running hooks easier to monitor and failures easier to diagnose.

    0.4.4release notes

  • Sibling projects at the same workspace depth now run in parallel automatically, without requiring users to configure priority values.

    0.4.2release notes

  • Prefers extensions over loose filename tags.

    0.4.1release notes

  • Skips installs for hooks that will not run.

    0.4.1release notes

  • Auto-update cooldown downgrades are prevented.

    0.4.0release notes

  • Tilde is expanded in the --cd argument.

    0.4.0release notes

  • Tilde is expanded in the --config argument.

    0.4.0release notes

  • Tilde is expanded in the --git-dir argument.

    0.4.0release notes

  • Tilde is expanded in the --log-file argument.

    0.4.0release notes

  • Node hooks use a managed npm cache.

    0.4.0release notes

Tooling 2

  • Alpine Docker images are now published.

    0.4.10release notes

  • Files identified as 'mts' and 'cts' are now recognized as TypeScript files.

    0.4.10release notes

Fixes and other changes 28

  • Captured terminal output is sanitized before replay.

    0.4.14release notes

  • check-yaml now accepts non-finite floats.

    0.4.14release notes

  • check-yaml now allows comment-heavy YAML.

    0.4.14release notes

  • Dependency installs are isolated from inherited Git repository state.

    0.4.13release notes

  • Fixes Node hook installation with npm 11.

    0.4.13release notes

  • Uses full object IDs in diff snapshots.

    0.4.12release notes

  • Improves top-level command descriptions, helping developers understand available commands.

    0.4.12release notes

  • Builtin hooks now honor filenames specified in their entry and args.

    0.4.11release notes

  • Hook output order is preserved with a shared pipe.

    0.4.11release notes

  • Identify tags now match across filename parts.

    0.4.11release notes

  • Applying metadata now preserves the system download policy.

    0.4.11release notes

  • Configured repository values are now preserved during updates.

    0.4.10release notes

  • The synthetic GIT_WORK_TREE is now scoped to git commands.

    0.4.10release notes

  • Python discovery order was fixed.

    0.4.10release notes

  • Progress rendering on Windows was fixed.

    0.4.10release notes

  • Validates complete XML documents.

    0.4.9release notes

  • Uses the resolved gem executable.

    0.4.9release notes

  • Fixes local path resolution for try-repo.

    0.4.9release notes

  • Fixes handling of mixed workspace selectors.

    0.4.9release notes

  • Fixes the ordering of collapsed progress rows.

    0.4.8release notes

  • Fixes insertion of progress after collapsed rows.

    0.4.8release notes

  • Ignores the coursier channel from the working repository.

    0.4.5release notes

  • Handles missing blobs in diff snapshots.

    0.4.5release notes

  • Fixes CRLF handling in pretty-format-json.

    0.4.5release notes

  • Fixes restoring stashes involving intent-to-add files.

    0.4.4release notes

  • Stat-only hook rewrites are ignored.

    0.4.3release notes

  • Fixes the pre-push range after a rebase.

    0.4.1release notes

  • Fixes npm config environment overrides for node hooks.

    0.4.0release notes

prek 0.374 changes

Breaking changes 2

  • The schema disallows rev for non-remote repositories.

    0.3.10release notes

  • Renames prek install-hooks to prek prepare-hooks.

    0.3.6release notes

Security 3

  • Restricts patch directory permissions.

    0.3.9release notes

  • Validates pinned SHAs against fetched upstream refs and detects impostor commits.

    0.3.9release notes

  • Validates the uv binary after downloading it.

    0.3.8release notes

New APIs and options 26

  • Adds a cooldown-days setting for prek auto-update in both user-level global config and project config, allowing a project to override the user default.

    0.3.12release notes

  • Hook configuration now supports language: dart.

    0.3.12release notes

  • Workspace hooks now receive the commit message file.

    0.3.12release notes

  • Skip specified repositories during auto-update.

    0.3.11release notes

  • Exit with a non-zero status when updates are found.

    0.3.11release notes

  • Use glob patterns to limit update candidates to matching tag names.

    0.3.11release notes

  • Hook entries can set shell to sh, bash, pwsh, powershell, or cmd to evaluate snippets with that shell; unset entries keep direct argv execution.

    0.3.11release notes

  • Adds forbid-new-submodules as a builtin hook.

    0.3.9release notes

  • Adds experimental support for the dotnet language.

    0.3.9release notes

  • Adds a check mode that exits non-zero for available updates, stale frozen comments, or pinned SHAs absent from fetched upstream refs, without rewriting the config.

    0.3.9release notes

  • Adds a flag to override the config file's fail-fast setting.

    0.3.9release notes

  • Adds check-illegal-windows-names as a builtin hook.

    0.3.8release notes

  • Adds check-shebang-scripts-are-executable as a builtin hook.

    0.3.8release notes

  • Adds check-vcs-permalinks as a builtin hook.

    0.3.8release notes

  • Adds destroyed-symlinks as a builtin hook.

    0.3.8release notes

  • Adds file-contents-sorter as a builtin hook.

    0.3.8release notes

  • Adds experimental support for deno as a language.

    0.3.8release notes

  • Adds the --all flag to prek uninstall.

    0.3.8release notes

  • Adds pretty-format-json as a builtin hook.

    0.3.8release notes

  • Rust supports package disambiguation through the fourth segment of a cli: Git dependency.

    0.3.5release notes

  • Hook scripts can now use legacy mode.

    0.3.5release notes

  • Use --git-dir to force the target for hook installation.

    0.3.5release notes

  • Requests can use the system proxy.

    0.3.5release notes

  • Add an environment variable for configuring log truncation.

    0.3.4release notes

  • Add an environment variable for configuring maximum concurrency.

    0.3.4release notes

  • prek can now be run as a Python module.

    0.3.4release notes

Performance 2

  • Gems are installed and compiled in parallel.

    0.3.4release notes

  • Tag masks are precomputed to speed up hook type filtering.

    0.3.4release notes

Behavior and default changes 15

  • The --hook-dir option is now optional for hook-impl.

    0.3.11release notes

  • Finished hooks remain visible.

    0.3.10release notes

  • Merge conflict marker detection is improved.

    0.3.10release notes

  • Up-to-date output is hidden in non-verbose mode.

    0.3.10release notes

  • Shows tag names in freeze output and writes frozen SHAs with matching frozen-tag comments.

    0.3.9release notes

  • Displays auto-update results by configuration entry.

    0.3.9release notes

  • Cleans stale patch files during cache garbage collection.

    0.3.9release notes

  • Relaxes the alias-anchor ratio check for check-yaml.

    0.3.8release notes

  • Gem retries can now run in parallel.

    0.3.5release notes

  • The open file limit is adjusted when the process starts.

    0.3.5release notes

  • The --no-progress option is passed through into generated hook scripts.

    0.3.5release notes

  • The --quiet option is passed through into generated hook scripts.

    0.3.5release notes

  • The --verbose option is passed through into generated hook scripts.

    0.3.5release notes

  • File-type mappings are synchronized with pre-commit identify, affecting how file types are identified.

    0.3.4release notes

  • pass_filenames now accepts a positive integer, allowing configuration of the number of filenames passed.

    0.3.4release notes

Tooling 2

  • Ruby can now be downloaded automatically using rv binaries.

    0.3.5release notes

  • Rust cargo install commands use --locked.

    0.3.4release notes

Fixes and other changes 24

  • Hook filters are now respected for message files, so configured filtering applies to those files.

    0.3.13release notes

  • Preserves non-UTF8 filenames obtained from Git.

    0.3.12release notes

  • Ruby hooks put the resolved Ruby's bin directory on PATH for gem invocations.

    0.3.12release notes

  • prek uses a dedicated Android npm package.

    0.3.11release notes

  • A missing --script-version no longer triggers a shim warning.

    0.3.11release notes

  • Repository keys are stable without breaking cached clones.

    0.3.11release notes

  • The Ruby executable is installed in the gem bin.

    0.3.11release notes

  • Auto-update preserves spacing in frozen comments.

    0.3.10release notes

  • The npm package is reimplemented; the notes do not specify changes to its developer-facing behavior or interface.

    0.3.10release notes

  • Honors repo and worktree core.hooksPath settings.

    0.3.9release notes

  • Canonicalizes CWD and GIT_ROOT paths.

    0.3.9release notes

  • Auto-update keeps rev values and # frozen: comments in sync, repairing stale frozen comments.

    0.3.9release notes

  • Adds quotes for non-string revisions in auto-update output.

    0.3.9release notes

  • Improves error reporting when file patterns fail to parse.

    0.3.8release notes

  • Fixes handling of workspace-relative paths for added files.

    0.3.8release notes

  • Uses GOTOOLCHAIN=local when probing system Go.

    0.3.6release notes

  • Selectors can now target hook ids containing colons.

    0.3.6release notes

  • Ensures child output is drained in the PTY subprocess.

    0.3.6release notes

  • Auth-failed repository clones are retried with terminal prompts enabled.

    0.3.6release notes

  • Stage defaulting behavior is aligned with pre-commit.

    0.3.6release notes

  • Hook permissions now respect Git's core.sharedRepository setting.

    0.3.5release notes

  • Fixes the Python __main__.py entry.

    0.3.5release notes

  • The variable is stripped from uv venv and pip install commands.

    0.3.5release notes

  • Invalid Rust toolchains are skipped instead of causing failure.

    0.3.4release notes