@j178/prek 0.5.11 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,105 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0
4
+
5
+ Released on 2026-12-01.
6
+
7
+ ### Breaking changes
8
+
9
+ Most users can upgrade to 0.6 without changing their configuration or scripts.
10
+ The two CLI changes below align prek's exit codes with `pre-commit`.
11
+
12
+ - If you pass hook names and `--hook-stage` to `prek run`, it now exits with status `1` when none of those hooks matches the requested stage. To run every hook configured for a stage, omit the hook names. ([#3105](https://github.com/j178/prek/pull/3105))
13
+ - `prek update` and `prek autoupdate` now validate every `--repo` argument before updating any revisions. A single unknown repository makes the command exit with status `1`. Use the `repo` value as written in your config. ([#3106](https://github.com/j178/prek/pull/3106))
14
+ - When `SSL_CERT_FILE` or `SSL_CERT_DIR` is non-empty, prek's HTTP client (`reqwest`) trusts only the CA certificates loaded from those paths, even if it finds none. If you used these variables to add a private CA, include the public roots you need in the same trust bundle. To use the system trust store, unset both variables and set `PREK_SYSTEM_CERTS=true`. `PREK_NATIVE_TLS` remains a deprecated alias. ([#2964](https://github.com/j178/prek/pull/2964))
15
+
16
+ ### Highlights
17
+
18
+ #### Faster repeat checks with `prek update`
19
+
20
+ `prek update` now reuses Git objects from earlier checks while still looking for
21
+ new upstream tags. In our GitHub benchmark, repeat runs of `prek update --check`
22
+ took **62–74% less time** with a warm cache. Median time fell from 2.20 s to 0.84 s
23
+ for `pre-commit/pre-commit-hooks` and from 3.04 s to 0.80 s for `crate-ci/typos`. ([#3080](https://github.com/j178/prek/pull/3080))
24
+
25
+ #### Configure hooks in `pyproject.toml` or `Cargo.toml`
26
+
27
+ Keep your hooks in the manifest you already use. Put the same settings you would
28
+ use in `prek.toml` under `[tool.prek]` in `pyproject.toml`, or under
29
+ `[package.metadata.prek]` or `[workspace.metadata.prek]` in `Cargo.toml`.
30
+ A standalone hook configuration in the same directory still takes precedence. ([#3093](https://github.com/j178/prek/pull/3093))
31
+
32
+ #### Include formatter fixes in the same commit
33
+
34
+ Set `stage_fixed = true` on a formatter to let the installed Git `pre-commit`
35
+ hook include verified fixes to matching staged files in the same commit. This
36
+ saves a second round of `git add` and `git commit`. Manual `prek run` invocations
37
+ still leave fixes in the working tree for review. ([#3085](https://github.com/j178/prek/pull/3085))
38
+
39
+ ```toml
40
+ # pyproject.toml
41
+ [[tool.prek.repos]]
42
+ repo = "builtin"
43
+ hooks = [{ id = "end-of-file-fixer", stage_fixed = true }]
44
+ ```
45
+
46
+ ### Enhancements
47
+
48
+ - Allow pre-commit hooks to stage verified fixes ([#3085](https://github.com/j178/prek/pull/3085))
49
+ - Load hook configuration from pyproject.toml and Cargo.toml ([#3093](https://github.com/j178/prek/pull/3093))
50
+ - Restore prebuilt packages for RISC-V Linux ([#3087](https://github.com/j178/prek/pull/3087))
51
+ - Skip the full history walk for new pre-push refs ([#3035](https://github.com/j178/prek/pull/3035))
52
+ - Support `{config_dir}` in hook entries and arguments ([#3089](https://github.com/j178/prek/pull/3089))
53
+
54
+ ### Performance
55
+
56
+ - Extract toolchain archives with synchronous tar and ZIP readers ([#3094](https://github.com/j178/prek/pull/3094))
57
+ - Keep small packs when fetching hook repositories ([#3076](https://github.com/j178/prek/pull/3076))
58
+ - Read pre-push diff bases from git rev-list ([#3090](https://github.com/j178/prek/pull/3090))
59
+ - Reuse Git objects across hook update checks ([#3080](https://github.com/j178/prek/pull/3080))
60
+ - Reuse cached Git objects when fetching another hook revision ([#3078](https://github.com/j178/prek/pull/3078))
61
+ - Reuse installed hook environments across try-repo runs ([#3082](https://github.com/j178/prek/pull/3082))
62
+ - Reuse the installed hook manifest during update checks ([#3083](https://github.com/j178/prek/pull/3083))
63
+ - Skip tag discovery when fetching hook repositories ([#3075](https://github.com/j178/prek/pull/3075))
64
+
65
+ ### Contributors
66
+
67
+ - @j178
68
+ - @eshattow
69
+ - @patrick-immometrica
70
+
71
+ ## 0.5.12
72
+
73
+ Released on 2026-11-26.
74
+
75
+ ### Enhancements
76
+
77
+ - Explain empty final diffs after hook changes ([#3057](https://github.com/j178/prek/pull/3057))
78
+ - Replace pre-commit shims during installation ([#3054](https://github.com/j178/prek/pull/3054))
79
+
80
+ ### Performance
81
+
82
+ - Skip unnecessary content reads during file identification ([#3049](https://github.com/j178/prek/pull/3049))
83
+
84
+ ### Bug fixes
85
+
86
+ - Fix post-merge squash status environment variable ([#3053](https://github.com/j178/prek/pull/3053))
87
+ - Protect running hooks from cache cleanup ([#3068](https://github.com/j178/prek/pull/3068))
88
+ - Skip binary and BOM-marked UTF-16/32 files in text fixers ([#3058](https://github.com/j178/prek/pull/3058))
89
+ - Select Haskell package executables explicitly ([#3067](https://github.com/j178/prek/pull/3067))
90
+ - Skip unreleased `mise` versions ([#3071](https://github.com/j178/prek/pull/3071))
91
+
92
+ ### Documentation
93
+
94
+ - Add sponsor recognition to README and website ([#3051](https://github.com/j178/prek/pull/3051))
95
+
96
+ ### Contributors
97
+
98
+ - @tianhaogutum
99
+ - @j178
100
+ - @YvanY0
101
+ - @flying-sheep
102
+
3
103
  ## 0.5.11
4
104
 
5
105
  Released on 2026-11-16.
package/README.md CHANGED
@@ -33,6 +33,39 @@ with pre-commit configurations and hooks, so you can use it as a drop-in replace
33
33
 
34
34
  Although prek is pretty new, it’s already powering real‑world projects like [CPython](https://github.com/python/cpython), [Apache Airflow](https://github.com/apache/airflow), [FastAPI](https://github.com/fastapi/fastapi), and more projects are picking it up—see [Who is using prek?](#who-is-using-prek). If you’re looking for an alternative to `pre-commit`, please give it a try—we’d love your feedback!
35
35
 
36
+ <!-- --8<-- [start:sponsors] -->
37
+
38
+ ## Sponsors
39
+
40
+ Thank you to everyone supporting prek's development, including our private sponsors.
41
+
42
+ ### Logo sponsors
43
+
44
+ <table>
45
+ <tr>
46
+ <td align="center" width="600">
47
+ <br />
48
+ <a href="https://github.com/sponsors/j178"><strong>Your logo here</strong></a>
49
+ <br />
50
+ Become a sponsor and feature your logo here.
51
+ <br /><br />
52
+ </td>
53
+ </tr>
54
+ </table>
55
+
56
+ ### Community sponsors
57
+
58
+ [Frost Ming](https://github.com/frostming) ·
59
+ [Corry Haines](https://github.com/tabletcorry) ·
60
+ [Alex Kraker](https://github.com/kraker) ·
61
+ [Janosh Riebesell](https://github.com/janosh) ·
62
+ [Udaya Prakash](https://github.com/udaya2899) ·
63
+ [openclaw](https://github.com/openclaw)
64
+
65
+ [Become a sponsor](https://github.com/sponsors/j178) and help keep prek growing.
66
+
67
+ <!-- --8<-- [end:sponsors] -->
68
+
36
69
  <!-- --8<-- [start:features] -->
37
70
 
38
71
  ## Features
@@ -59,7 +92,7 @@ On Linux and macOS:
59
92
  <!-- --8<-- [start: linux-standalone-install] -->
60
93
 
61
94
  ```bash
62
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.5.11/prek-installer.sh | sh
95
+ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.6.0/prek-installer.sh | sh
63
96
  ```
64
97
 
65
98
  <!-- --8<-- [end: linux-standalone-install] -->
@@ -69,7 +102,7 @@ On Windows:
69
102
  <!-- --8<-- [start: windows-standalone-install] -->
70
103
 
71
104
  ```powershell
72
- powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.5.11/prek-installer.ps1 | iex"
105
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.6.0/prek-installer.ps1 | iex"
73
106
  ```
74
107
 
75
108
  <!-- --8<-- [end: windows-standalone-install] -->
@@ -302,7 +335,7 @@ jobs:
302
335
  runs-on: ubuntu-latest
303
336
  steps:
304
337
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
305
- - uses: j178/prek-action@44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d # v3.1.0
338
+ - uses: j178/prek-action@7b101f8338a08d2bd6fdb3625e4e7692428763a3 # v3.1.1
306
339
  ```
307
340
 
308
341
  This action installs prek and runs `prek run --all-files` on your repository.
@@ -359,9 +392,11 @@ prek self update
359
392
  ### prek is easier to work with
360
393
 
361
394
  - No need to install Python or any other runtime just to use `prek`; it is a single binary.
395
+ - Formatters can fix staged files without making you retry `git commit`. Enable [`stage_fixed`](https://prek.j178.dev/reference/configuration/#stage_fixed) on a formatter to include its fixes while keeping your unstaged edits out of the commit.
362
396
  - Its [language support](https://prek.j178.dev/reference/language-support/) covers every language available in `pre-commit`, plus Bun, Deno, mise, and PHP, and it automatically installs managed toolchains when needed for Python, Node.js, Bun, Deno, Go, mise, Rust, and Ruby.
363
397
  - It supports native [`prek.toml`](https://prek.j178.dev/configuration/) in addition to pre-commit YAML, and [`prek util yaml-to-toml`](https://prek.j178.dev/reference/cli/#prek-util-yaml-to-toml) helps migrate existing configs.
364
- - Built-in support for [workspaces](https://prek.j178.dev/monorepos/) means monorepos can keep separate configs per project and still run everything from one command, while independent same-depth projects run concurrently without mixing file scopes.
398
+ - Keep hook configuration in the project manifest you already use. `prek` reads `[tool.prek]` from `pyproject.toml` and `[package.metadata.prek]` or `[workspace.metadata.prek]` from `Cargo.toml`.
399
+ - Built-in support for [workspaces](https://prek.j178.dev/monorepos/) means monorepos can keep separate configs per project and still run everything from one command, while independent same-depth projects can run concurrently without mixing file scopes.
365
400
  - [`prek install`](https://prek.j178.dev/reference/cli/#prek-install) and [`prek uninstall`](https://prek.j178.dev/reference/cli/#prek-uninstall) honor repo-local and worktree-local `core.hooksPath`.
366
401
  - Hook [`groups`](https://prek.j178.dev/reference/configuration/#groups) let one config define workflows such as CI, linting, or formatting; `--group`, `--require-group`, and `--no-group` select them at runtime.
367
402
  - [`prek run`](https://prek.j178.dev/reference/cli/#prek-run) can select or skip multiple projects and hooks, target tracked files with repeatable `--glob` or `--directory` filters, pass explicit paths with `--files`, and preview the selection with `--dry-run`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j178/prek",
3
- "version": "0.5.11",
3
+ "version": "0.6.0",
4
4
  "description": "A fast Git hook manager written in Rust, designed as a drop-in alternative to pre-commit, reimagined.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,14 +26,15 @@
26
26
  "LICENSE"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "@j178/prek-darwin-arm64": "0.5.11",
30
- "@j178/prek-darwin-x64": "0.5.11",
31
- "@j178/prek-linux-arm64-gnu": "0.5.11",
32
- "@j178/prek-linux-arm64-musl": "0.5.11",
33
- "@j178/prek-android-arm64": "0.5.11",
34
- "@j178/prek-linux-x64-gnu": "0.5.11",
35
- "@j178/prek-linux-x64-musl": "0.5.11",
36
- "@j178/prek-win32-arm64-msvc": "0.5.11",
37
- "@j178/prek-win32-x64-msvc": "0.5.11"
29
+ "@j178/prek-darwin-arm64": "0.6.0",
30
+ "@j178/prek-darwin-x64": "0.6.0",
31
+ "@j178/prek-linux-arm64-gnu": "0.6.0",
32
+ "@j178/prek-linux-arm64-musl": "0.6.0",
33
+ "@j178/prek-android-arm64": "0.6.0",
34
+ "@j178/prek-linux-riscv64-gnu": "0.6.0",
35
+ "@j178/prek-linux-x64-gnu": "0.6.0",
36
+ "@j178/prek-linux-x64-musl": "0.6.0",
37
+ "@j178/prek-win32-arm64-msvc": "0.6.0",
38
+ "@j178/prek-win32-x64-msvc": "0.6.0"
38
39
  }
39
40
  }
package/platforms.json CHANGED
@@ -56,6 +56,18 @@
56
56
  "arm64"
57
57
  ]
58
58
  },
59
+ {
60
+ "rustTarget": "riscv64gc-unknown-linux-gnu",
61
+ "packageName": "@j178/prek-linux-riscv64-gnu",
62
+ "binaryName": "prek",
63
+ "os": [
64
+ "linux"
65
+ ],
66
+ "cpu": [
67
+ "riscv64"
68
+ ],
69
+ "libc": "glibc"
70
+ },
59
71
  {
60
72
  "rustTarget": "x86_64-unknown-linux-gnu",
61
73
  "packageName": "@j178/prek-linux-x64-gnu",