@j178/prek 0.5.12 → 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,73 @@
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
+
3
71
  ## 0.5.12
4
72
 
5
73
  Released on 2026-11-26.
package/README.md CHANGED
@@ -92,7 +92,7 @@ On Linux and macOS:
92
92
  <!-- --8<-- [start: linux-standalone-install] -->
93
93
 
94
94
  ```bash
95
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.5.12/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
96
96
  ```
97
97
 
98
98
  <!-- --8<-- [end: linux-standalone-install] -->
@@ -102,7 +102,7 @@ On Windows:
102
102
  <!-- --8<-- [start: windows-standalone-install] -->
103
103
 
104
104
  ```powershell
105
- powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.5.12/prek-installer.ps1 | iex"
105
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.6.0/prek-installer.ps1 | iex"
106
106
  ```
107
107
 
108
108
  <!-- --8<-- [end: windows-standalone-install] -->
@@ -335,7 +335,7 @@ jobs:
335
335
  runs-on: ubuntu-latest
336
336
  steps:
337
337
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
338
- - uses: j178/prek-action@44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d # v3.1.0
338
+ - uses: j178/prek-action@7b101f8338a08d2bd6fdb3625e4e7692428763a3 # v3.1.1
339
339
  ```
340
340
 
341
341
  This action installs prek and runs `prek run --all-files` on your repository.
@@ -392,9 +392,11 @@ prek self update
392
392
  ### prek is easier to work with
393
393
 
394
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.
395
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.
396
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.
397
- - 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.
398
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`.
399
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.
400
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.12",
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.12",
30
- "@j178/prek-darwin-x64": "0.5.12",
31
- "@j178/prek-linux-arm64-gnu": "0.5.12",
32
- "@j178/prek-linux-arm64-musl": "0.5.12",
33
- "@j178/prek-android-arm64": "0.5.12",
34
- "@j178/prek-linux-x64-gnu": "0.5.12",
35
- "@j178/prek-linux-x64-musl": "0.5.12",
36
- "@j178/prek-win32-arm64-msvc": "0.5.12",
37
- "@j178/prek-win32-x64-msvc": "0.5.12"
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",