@j178/prek 0.5.3 → 0.5.5

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +103 -3
  2. package/README.md +9 -9
  3. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,105 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.5
4
+
5
+ Released on 2026-10-05.
6
+
7
+ ### Enhancements
8
+
9
+ - Add Nushell completion generation ([#2785](https://github.com/j178/prek/pull/2785))
10
+ - Add `ppc64le` wheel and binary builds ([#2809](https://github.com/j178/prek/pull/2809))
11
+
12
+ ### Performance
13
+
14
+ - Avoid JSON imports when querying Python interpreters ([#2790](https://github.com/j178/prek/pull/2790))
15
+ - Avoid duplicate diffs after hooks rewrite files ([#2815](https://github.com/j178/prek/pull/2815))
16
+ - Batch file reads in shebang checks ([#2793](https://github.com/j178/prek/pull/2793))
17
+ - Check cached hook environments concurrently ([#2797](https://github.com/j178/prek/pull/2797))
18
+ - Overlap Git discovery with worktree status checks ([#2821](https://github.com/j178/prek/pull/2821))
19
+ - Query staged additions only for case conflicts ([#2802](https://github.com/j178/prek/pull/2802))
20
+ - Reduce worker overhead in XML and pygrep checks ([#2789](https://github.com/j178/prek/pull/2789))
21
+ - Reuse Git worktree state during hook startup ([#2787](https://github.com/j178/prek/pull/2787))
22
+ - Reuse intent-to-add paths when saving unstaged changes ([#2788](https://github.com/j178/prek/pull/2788))
23
+ - Run Git queries concurrently for case-conflict checks ([#2792](https://github.com/j178/prek/pull/2792))
24
+ - Share Bun and Deno version queries across environments ([#2795](https://github.com/j178/prek/pull/2795))
25
+ - Share Lua runtime probes across hook environments ([#2796](https://github.com/j178/prek/pull/2796))
26
+ - Share Ruby version queries across hook environments ([#2794](https://github.com/j178/prek/pull/2794))
27
+ - Share mise version queries across hook environments ([#2798](https://github.com/j178/prek/pull/2798))
28
+ - Skip site initialization in Python interpreter probes ([#2822](https://github.com/j178/prek/pull/2822))
29
+ - Skip untracked files in destroyed symlink checks ([#2799](https://github.com/j178/prek/pull/2799))
30
+ - Skip unused file input for always-run hooks ([#2813](https://github.com/j178/prek/pull/2813))
31
+
32
+ ### Bug fixes
33
+
34
+ - Preserve staged and unstaged changes on conflicted stash restore ([#2803](https://github.com/j178/prek/pull/2803))
35
+ - Default missing `core.fileMode` in shebang checks ([#2832](https://github.com/j178/prek/pull/2832))
36
+ - Match protected branch patterns from the start ([#2829](https://github.com/j178/prek/pull/2829))
37
+ - Normalize explicit paths in shebang index checks ([#2831](https://github.com/j178/prek/pull/2831))
38
+ - Preserve empty `trailing-whitespace` character sets ([#2830](https://github.com/j178/prek/pull/2830))
39
+ - Reject empty files in `check-json` ([#2826](https://github.com/j178/prek/pull/2826))
40
+ - Reject trailing data in `check-json` ([#2828](https://github.com/j178/prek/pull/2828))
41
+ - Round up file sizes in `check-added-large-files` ([#2827](https://github.com/j178/prek/pull/2827))
42
+
43
+ ### Documentation
44
+
45
+ - Redesign the prek badge and refresh logo details ([#2818](https://github.com/j178/prek/pull/2818))
46
+
47
+ ### Contributors
48
+
49
+ - @imphil
50
+ - @j178
51
+
52
+ ## 0.5.4
53
+
54
+ Released on 2026-09-28.
55
+
56
+ ### Highlights
57
+
58
+ #### Faster builtin hooks
59
+
60
+ In our end-to-end benchmark, prek is about 38% faster than 0.5.3, with some builtin
61
+ hooks up to 273% faster (`check-yaml`: 273%, `check-json`: 80%,
62
+ `check-merge-conflict`: 71%).
63
+
64
+ ### Enhancements
65
+
66
+ - Add `include_deleted` to allow hooks to include deleted files ([#2733](https://github.com/j178/prek/pull/2733))
67
+ - Add `--check` and simplify `end-of-file-fixer` ([#2764](https://github.com/j178/prek/pull/2764))
68
+ - Add `--check` to `file-contents-sorter` ([#2765](https://github.com/j178/prek/pull/2765))
69
+ - Add `--check` to `requirements-txt-fixer` ([#2766](https://github.com/j178/prek/pull/2766))
70
+ - Add `--check` to `trailing-whitespace` ([#2763](https://github.com/j178/prek/pull/2763))
71
+ - Expose and document `prek util generate-shell-completion` ([#2727](https://github.com/j178/prek/pull/2727))
72
+ - Support `hide_status` in project and user configuration ([#2760](https://github.com/j178/prek/pull/2760))
73
+ - Support look-around regex in builtin pattern hooks ([#2732](https://github.com/j178/prek/pull/2732))
74
+
75
+ ### Performance
76
+
77
+ - Cache the resolved Git executable on macOS ([#2726](https://github.com/j178/prek/pull/2726))
78
+ - Combine and cache Git repository path queries ([#2724](https://github.com/j178/prek/pull/2724))
79
+ - Optimize common builtin hook execution ([#2768](https://github.com/j178/prek/pull/2768))
80
+ - Optimize scanning in `mixed-line-ending` and `trailing-whitespace` ([#2769](https://github.com/j178/prek/pull/2769))
81
+ - Scan `check-merge-conflict` files in fixed-size blocks ([#2781](https://github.com/j178/prek/pull/2781))
82
+ - Use SIMD UTF-8 validation in `check-json`, `check-toml`, and `check-yaml` ([#2770](https://github.com/j178/prek/pull/2770))
83
+
84
+ ### Bug fixes
85
+
86
+ - Retry transient rename failures on Windows ([#2756](https://github.com/j178/prek/pull/2756))
87
+ - Use PATH to resolve prek in completion scripts ([#2719](https://github.com/j178/prek/pull/2719))
88
+
89
+ ### Documentation
90
+
91
+ - Clarify the flow and scope of usage guides ([#2710](https://github.com/j178/prek/pull/2710))
92
+ - Reorganize usage guides and reference documentation ([#2709](https://github.com/j178/prek/pull/2709))
93
+
94
+ ### Other changes
95
+
96
+ - Sync latest identify tags ([#2762](https://github.com/j178/prek/pull/2762))
97
+
98
+ ### Contributors
99
+
100
+ - @github-actions
101
+ - @j178
102
+
3
103
  ## 0.5.3
4
104
 
5
105
  Released on 2026-09-13.
@@ -1578,7 +1678,7 @@ In this release, prek adds a new special repo type `repo: builtin` that lets you
1578
1678
  It basically gives you another way to use the existing built‑in fast path for pre‑commit‑hooks, but without needing to point to an external repo.
1579
1679
  Since prek doesn’t have to clone anything or set up a virtual environment, `repo: builtin` hooks work even in air‑gapped environments.
1580
1680
 
1581
- For more details, see: https://prek.j178.dev/builtin/
1681
+ For more details, see: https://prek.j178.dev/built-in-hooks/
1582
1682
 
1583
1683
  ### Enhancements
1584
1684
 
@@ -2002,7 +2102,7 @@ This is a huge milestone release that introduces **Workspace Mode** — first‑
2002
2102
  It auto‑discovers nested projects, runs hooks in project scope, and provides flexible selectors to target specific projects and hooks.
2003
2103
  This makes `prek` a powerful tool for managing pre-commit hooks in complex repository structures.
2004
2104
 
2005
- For more details, see [Workspace Mode](https://prek.j178.dev/workspace/). If you encounter any issues, please report them at [Issues](https://github.com/j178/prek/issues).
2105
+ For more details, see [Workspace Mode](https://prek.j178.dev/monorepos/). If you encounter any issues, please report them at [Issues](https://github.com/j178/prek/issues).
2006
2106
 
2007
2107
  **Note**: If you ran `prek install` in a repo before, you gonna need to run `prek install` again to replace the old git hook scripts for the workspace mode to work.
2008
2108
 
@@ -2111,7 +2211,7 @@ This is a huge milestone release that introduces **Workspace Mode** — first‑
2111
2211
 
2112
2212
  **Note**: If you ran `prek install` in a repo before, you gonna need to run `prek install` again to replace the old git hook scripts for the workspace mode to work.
2113
2213
 
2114
- For more details, see [Workspace Mode](https://prek.j178.dev/workspace/). If you encounter any issues, please report them at [Issues](https://github.com/j178/prek/issues).
2214
+ For more details, see [Workspace Mode](https://prek.j178.dev/monorepos/). If you encounter any issues, please report them at [Issues](https://github.com/j178/prek/issues).
2115
2215
 
2116
2216
  Special thanks to @potiuk for all the help and feedback in designing and testing this feature!
2117
2217
 
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <a href="https://trendshift.io/repositories/14578?utm_source=repository-badge&amp;utm_medium=badge&amp;utm_campaign=badge-repository-14578" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/14578" alt="j178%2Fprek | Trendshift" width="250" height="55"/></a>
9
9
 
10
- [![prek](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json)](https://github.com/j178/prek)
10
+ [![prek](https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge.svg)](https://github.com/j178/prek)
11
11
  [![PyPI version](https://img.shields.io/pypi/v/prek.svg)](https://pypi.python.org/pypi/prek)
12
12
  [![codecov](https://codecov.io/github/j178/prek/graph/badge.svg?token=MP6TY24F43)](https://codecov.io/github/j178/prek)
13
13
  [![PyPI Downloads](https://static.pepy.tech/personalized-badge/prek?period=monthly&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=BLUE&left_text=downloads%2Fmonth)](https://pepy.tech/projects/prek)
@@ -40,10 +40,10 @@ Although prek is pretty new, it’s already powering real‑world projects like
40
40
  - A single binary with no dependencies, does not require Python or any other runtime.
41
41
  - [Faster](https://prek.j178.dev/benchmark/) than `pre-commit` and more efficient in disk space usage.
42
42
  - Fully compatible with the original pre-commit configurations and hooks.
43
- - Built-in support for monorepos (i.e. [workspace mode](https://prek.j178.dev/workspace/)), including concurrent execution for independent same-depth projects.
43
+ - Built-in support for monorepos (i.e. [workspace mode](https://prek.j178.dev/monorepos/)), including concurrent execution for independent same-depth projects.
44
44
  - Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python virtual environments and dependencies.
45
45
  - Improved toolchain installations for Python, Node.js, Bun, Go, Rust and Ruby, shared between hooks.
46
- - [Built-in](https://prek.j178.dev/builtin/) Rust-native implementation of some common hooks.
46
+ - [Built-in](https://prek.j178.dev/built-in-hooks/) Rust-native implementation of some common hooks.
47
47
 
48
48
  <!-- --8<-- [end:features] -->
49
49
 
@@ -59,7 +59,7 @@ On Linux and macOS:
59
59
  <!-- --8<-- [start: linux-standalone-install] -->
60
60
 
61
61
  ```bash
62
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.5.3/prek-installer.sh | sh
62
+ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.5.5/prek-installer.sh | sh
63
63
  ```
64
64
 
65
65
  <!-- --8<-- [end: linux-standalone-install] -->
@@ -69,7 +69,7 @@ On Windows:
69
69
  <!-- --8<-- [start: windows-standalone-install] -->
70
70
 
71
71
  ```powershell
72
- powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.5.3/prek-installer.ps1 | iex"
72
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.5.5/prek-installer.ps1 | iex"
73
73
  ```
74
74
 
75
75
  <!-- --8<-- [end: windows-standalone-install] -->
@@ -152,7 +152,7 @@ cargo binstall prek
152
152
 
153
153
  <!-- --8<-- [start: cargo-install] -->
154
154
 
155
- Build from source using Cargo (Rust 1.96+ is required):
155
+ Build from source using Cargo (Rust 1.97+ is required):
156
156
 
157
157
  ```bash
158
158
  cargo install --locked prek
@@ -353,15 +353,15 @@ prek self update
353
353
  - Hook environments and toolchains are shared across hooks instead of being duplicated per repository, which reduces both install time and cache size.
354
354
  - Repository fetches and independent hook environment setup run in parallel, hooks can run concurrently by [`priority`](https://prek.j178.dev/reference/configuration/#priority) using reusable [aliases](https://prek.j178.dev/reference/configuration/#priorities), and independent workspace projects at the same directory depth can run concurrently.
355
355
  - It uses [`uv`](https://github.com/astral-sh/uv) for creating Python virtualenvs and installing dependencies, which is known for its speed and efficiency.
356
- - For supported hooks from `pre-commit-hooks`, the [automatic fast path](https://prek.j178.dev/builtin/#1-automatic-fast-path) runs built-in Rust implementations without requiring any configuration changes.
356
+ - For supported hooks from `pre-commit-hooks`, the [automatic fast path](https://prek.j178.dev/built-in-hooks/#use-the-automatic-fast-path) runs built-in Rust implementations without requiring any configuration changes.
357
357
  - The prek-only `repo: builtin` mode provides offline, zero-setup hooks, including native `deny-pattern` and `require-pattern` alternatives for common `pygrep` checks.
358
358
 
359
359
  ### prek is easier to work with
360
360
 
361
361
  - No need to install Python or any other runtime just to use `prek`; it is a single binary.
362
- - Its [language support](https://prek.j178.dev/languages/) 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.
362
+ - 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
363
  - 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/workspace/) 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.
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.
365
365
  - [`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
366
  - 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
367
  - [`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.3",
3
+ "version": "0.5.5",
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,14 @@
26
26
  "LICENSE"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "@j178/prek-darwin-arm64": "0.5.3",
30
- "@j178/prek-darwin-x64": "0.5.3",
31
- "@j178/prek-linux-arm64-gnu": "0.5.3",
32
- "@j178/prek-linux-arm64-musl": "0.5.3",
33
- "@j178/prek-android-arm64": "0.5.3",
34
- "@j178/prek-linux-x64-gnu": "0.5.3",
35
- "@j178/prek-linux-x64-musl": "0.5.3",
36
- "@j178/prek-win32-arm64-msvc": "0.5.3",
37
- "@j178/prek-win32-x64-msvc": "0.5.3"
29
+ "@j178/prek-darwin-arm64": "0.5.5",
30
+ "@j178/prek-darwin-x64": "0.5.5",
31
+ "@j178/prek-linux-arm64-gnu": "0.5.5",
32
+ "@j178/prek-linux-arm64-musl": "0.5.5",
33
+ "@j178/prek-android-arm64": "0.5.5",
34
+ "@j178/prek-linux-x64-gnu": "0.5.5",
35
+ "@j178/prek-linux-x64-musl": "0.5.5",
36
+ "@j178/prek-win32-arm64-msvc": "0.5.5",
37
+ "@j178/prek-win32-x64-msvc": "0.5.5"
38
38
  }
39
39
  }