|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 0.5.0 |
| 4 | + |
| 5 | +Released on 2026-08-27. |
| 6 | + |
| 7 | +### Highlights |
| 8 | + |
| 9 | +#### Choose where hook toolchains come from |
| 10 | + |
| 11 | +`language_version` now accepts a source `preference` alongside the version |
| 12 | +`request`, letting you control where prek looks for a compatible toolchain when |
| 13 | +it creates a hook environment. Use `managed` (the default) or `system` to choose |
| 14 | +which source prek tries first while still allowing fallback and downloads. Use |
| 15 | +`only-managed` or `only-system` to require one source. |
| 16 | + |
| 17 | +For example, this local Ruff hook requires a Python 3.12 toolchain managed by |
| 18 | +prek: |
| 19 | + |
| 20 | +```yaml |
| 21 | +repos: |
| 22 | + - repo: local |
| 23 | + hooks: |
| 24 | + - id: ruff |
| 25 | + name: ruff |
| 26 | + language: python |
| 27 | + entry: ruff check |
| 28 | + additional_dependencies: [ruff] |
| 29 | + language_version: |
| 30 | + request: "3.12" |
| 31 | + preference: only-managed |
| 32 | +``` |
| 33 | +
|
| 34 | +With `only-managed`, prek reuses a compatible toolchain from its managed store |
| 35 | +or downloads one when needed. It never falls back to Python from `PATH`, an OS |
| 36 | +package manager, or a version manager, so toolchain selection does not depend on |
| 37 | +the developer or CI machine's external environment. |
| 38 | + |
| 39 | +Existing scalar values such as `language_version: "3.12"` continue to work. See |
| 40 | +[toolchain management and `language_version`](https://prek.j178.dev/0.5.0/languages/#toolchain-management-and-language_version) |
| 41 | +for the full source-selection behavior. ([#2613](https://github.com/j178/prek/pull/2613)) |
| 42 | + |
| 43 | +### Breaking changes |
| 44 | + |
| 45 | +The breaking changes in this release are mostly small cleanups, and most users should not be affected. |
| 46 | + |
| 47 | +- Group names can no longer start with `@`. This prefix is now reserved for special group selectors such as the new `@ungrouped` selector. ([#2617](https://github.com/j178/prek/pull/2617)) |
| 48 | +- `PREK_MAX_CONCURRENCY` has been removed. Use `PREK_CONCURRENT_HOOKS` and `PREK_CONCURRENT_BATCHES` to control hook and per-hook batch concurrency separately. ([#2620](https://github.com/j178/prek/pull/2620)) |
| 49 | +- The top-level `prek init-template-dir` command has been removed. Use `prek util init-template-dir`, or `prek init-templatedir` for drop-in compatibility with `pre-commit`. ([#2623](https://github.com/j178/prek/pull/2623)) |
| 50 | +- `prek auto-update` has been removed. Use `prek update`, or `prek autoupdate` for drop-in compatibility with `pre-commit`. ([#2619](https://github.com/j178/prek/pull/2619)) |
| 51 | + |
| 52 | +### Enhancements |
| 53 | + |
| 54 | +- Add configurable toolchain source preferences ([#2613](https://github.com/j178/prek/pull/2613)) |
| 55 | +- Allow explicit `language: python` to opt out of fast-path hooks ([#2608](https://github.com/j178/prek/pull/2608)) |
| 56 | +- Group `run` and `update` options in CLI help ([#2629](https://github.com/j178/prek/pull/2629)) |
| 57 | +- Preserve terminal theme contrast for status labels ([#2592](https://github.com/j178/prek/pull/2592)) |
| 58 | +- Add `@ungrouped` group selector ([#2617](https://github.com/j178/prek/pull/2617)) |
| 59 | +- Retry uv installation with static musl binary ([#2600](https://github.com/j178/prek/pull/2600)) |
| 60 | +- Support `{hook_repo}` placeholder in hook `entry` ([#2602](https://github.com/j178/prek/pull/2602)) |
| 61 | + |
| 62 | +### Bug fixes |
| 63 | + |
| 64 | +- Expose the git work tree to hooks running outside the git root ([#2579](https://github.com/j178/prek/pull/2579)) |
| 65 | +- Isolate local hook environment installation ([#2615](https://github.com/j178/prek/pull/2615)) |
| 66 | +- Preserve hook config deserialization error locations ([#2573](https://github.com/j178/prek/pull/2573)) |
| 67 | +- Resolve hook log files from their config directory ([#2580](https://github.com/j178/prek/pull/2580)) |
| 68 | +- Track explicit config paths as absolute paths ([#2574](https://github.com/j178/prek/pull/2574)) |
| 69 | + |
| 70 | +### Documentation |
| 71 | + |
| 72 | +- Document prek run architecture ([#2630](https://github.com/j178/prek/pull/2630)) |
| 73 | +- Publish versioned documentation ([#2626](https://github.com/j178/prek/pull/2626)) |
| 74 | + |
| 75 | +### Contributors |
| 76 | + |
| 77 | +- @jeromeheissler |
| 78 | +- @gurgeous |
| 79 | +- @j178 |
| 80 | + |
3 | 81 | ## 0.4.14 |
4 | 82 |
|
5 | 83 | Released on 2026-08-17. |
|
0 commit comments