@j178/prek 0.4.1 → 0.4.2

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 +47 -0
  2. package/README.md +7 -4
  3. package/package.json +18 -18
package/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2
4
+
5
+ Released on 2026-05-26.
6
+
7
+ ### Highlights
8
+
9
+ 0.4.2 is mainly about making `prek run` faster in large repos.
10
+
11
+ `prek` now does less `git diff` work. After hooks run, `prek` uses diff checks
12
+ to detect files changed by hooks. If a hook modifies files, prek marks that hook
13
+ as failed. That is important, but full diff snapshots can be slow in big repos,
14
+ especially when they happen after every hook group.
15
+
16
+ We skip the expensive diff path in two common cases: built-in hooks that prek
17
+ knows are read-only, and clean worktrees where a cheap dirty check is enough
18
+ unless a hook actually changes files. In the right large-repo workload,
19
+ skipping that work can make runs up to 10x faster.
20
+
21
+ Workspace mode is faster too. Hooks have historically been too serial.
22
+ Priority-based concurrency helped, but it required users to choose good
23
+ `priority` values. Now sibling projects at the same workspace depth run in
24
+ parallel automatically. Their files do not overlap, so this is safe and needs
25
+ no extra config. For multi-project workspaces, this can dramatically reduce
26
+ total hook time.
27
+
28
+ ### Sponsorship
29
+
30
+ If `prek` saves time for you or your team, please consider sponsoring the
31
+ project on [GitHub Sponsors](https://github.com/sponsors/j178). It helps keep
32
+ new features, performance work, and maintenance moving.
33
+
34
+ ### Enhancements
35
+
36
+ - Run same-depth projects concurrently ([#2110](https://github.com/j178/prek/pull/2110))
37
+ - Make rustup install profile configurable ([#2111](https://github.com/j178/prek/pull/2111))
38
+ - Simplify hook progress folding ([#2125](https://github.com/j178/prek/pull/2125))
39
+
40
+ ### Performance
41
+
42
+ - Optimize diff checks for clean worktrees ([#2109](https://github.com/j178/prek/pull/2109))
43
+ - Skip diff checks for read-only hooks ([#2108](https://github.com/j178/prek/pull/2108))
44
+
45
+ ### Contributors
46
+
47
+ - @j178
48
+ - @Carlomus
49
+
3
50
  ## 0.4.1
4
51
 
5
52
  Released on 2026-05-20.
package/README.md CHANGED
@@ -36,7 +36,7 @@ while also providing some additional long-requested features.
36
36
  - A single binary with no dependencies, does not require Python or any other runtime.
37
37
  - [Faster](https://prek.j178.dev/benchmark/) than `pre-commit` and more efficient in disk space usage.
38
38
  - Fully compatible with the original pre-commit configurations and hooks.
39
- - Built-in support for monorepos (i.e. [workspace mode](https://prek.j178.dev/workspace/)).
39
+ - Built-in support for monorepos (i.e. [workspace mode](https://prek.j178.dev/workspace/)), including concurrent execution for independent same-depth projects.
40
40
  - Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python virtual environments and dependencies.
41
41
  - Improved toolchain installations for Python, Node.js, Bun, Go, Rust and Ruby, shared between hooks.
42
42
  - [Built-in](https://prek.j178.dev/builtin/) Rust-native implementation of some common hooks.
@@ -63,7 +63,7 @@ On Linux and macOS:
63
63
  <!-- --8<-- [start: linux-standalone-install] -->
64
64
 
65
65
  ```bash
66
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.1/prek-installer.sh | sh
66
+ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.2/prek-installer.sh | sh
67
67
  ```
68
68
 
69
69
  <!-- --8<-- [end: linux-standalone-install] -->
@@ -73,7 +73,7 @@ On Windows:
73
73
  <!-- --8<-- [start: windows-standalone-install] -->
74
74
 
75
75
  ```powershell
76
- powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.4.1/prek-installer.ps1 | iex"
76
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.4.2/prek-installer.ps1 | iex"
77
77
  ```
78
78
 
79
79
  <!-- --8<-- [end: windows-standalone-install] -->
@@ -355,7 +355,7 @@ prek self update
355
355
 
356
356
  - It is [multiple times faster](https://prek.j178.dev/benchmark/) than `pre-commit` while also using less disk space.
357
357
  - Hook environments and toolchains are shared across hooks instead of being duplicated per repository, which reduces both install time and cache size.
358
- - Repositories are fetched in parallel, hook environments are prepared in parallel when their dependencies do not overlap, and hooks can run concurrently by [`priority`](https://prek.j178.dev/reference/configuration/#priority).
358
+ - Repositories are fetched in parallel, hook environments are prepared in parallel when their dependencies do not overlap, hooks can run concurrently by [`priority`](https://prek.j178.dev/reference/configuration/#priority), and independent workspace projects at the same directory depth can run concurrently.
359
359
  - It uses [`uv`](https://github.com/astral-sh/uv) for creating Python virtualenvs and installing dependencies, which is known for its speed and efficiency.
360
360
  - It implements some common hooks in Rust as [builtins](https://prek.j178.dev/builtin/), which are faster than their Python counterparts.
361
361
  - It supports `repo: builtin` for offline, zero-setup hooks, which is not available in `pre-commit`.
@@ -366,6 +366,7 @@ prek self update
366
366
  - `prek` automatically installs the toolchains it needs for supported languages, so you spend less time managing Python versions, Node runtimes, Ruby installs, and similar setup.
367
367
  - 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.
368
368
  - 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.
369
+ - Workspace mode schedules independent same-depth projects concurrently while preserving parent/child ordering, which helps large monorepos finish faster without mixing project file scopes.
369
370
  - [`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`.
370
371
  - [`prek run`](https://prek.j178.dev/reference/cli/#prek-run) supports selecting or skipping multiple projects or hooks in workspace mode, instead of only accepting a single optional hook id, and adds quality-of-life improvements such as `--dry-run`, `--directory`, `--last-commit`, and `--no-fail-fast`.
371
372
  - [`prek list`](https://prek.j178.dev/reference/cli/#prek-list), [`prek util identify`](https://prek.j178.dev/reference/cli/#prek-util-identify), and [`prek util list-builtins`](https://prek.j178.dev/reference/cli/#prek-util-list-builtins) make it easier to inspect configured hooks, debug file matching, and discover builtins.
@@ -416,6 +417,8 @@ GitHub stars are current as of April 15, 2026.
416
417
  - [python/cpython](https://github.com/python/cpython/issues/143148) <sub>72,330 stars</sub>
417
418
  - [simple-icons/simple-icons](https://github.com/simple-icons/simple-icons/pull/14245) <sub>24,873 stars</sub>
418
419
 
420
+ For a more comprehensive list of open-source projects using prek see the [list of dependents on github](https://github.com/j178/prek/network/dependents).
421
+
419
422
  <!-- --8<-- [end: why] -->
420
423
 
421
424
  ## Acknowledgements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j178/prek",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
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,22 +26,22 @@
26
26
  "LICENSE"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "@j178/prek-darwin-arm64": "0.4.1",
30
- "@j178/prek-darwin-x64": "0.4.1",
31
- "@j178/prek-linux-arm64-gnu": "0.4.1",
32
- "@j178/prek-linux-arm64-musl": "0.4.1",
33
- "@j178/prek-android-arm64": "0.4.1",
34
- "@j178/prek-linux-arm-gnueabihf": "0.4.1",
35
- "@j178/prek-linux-arm-musleabihf": "0.4.1",
36
- "@j178/prek-linux-armv7-musleabihf": "0.4.1",
37
- "@j178/prek-linux-ia32-gnu": "0.4.1",
38
- "@j178/prek-linux-ia32-musl": "0.4.1",
39
- "@j178/prek-linux-riscv64-gnu": "0.4.1",
40
- "@j178/prek-linux-s390x-gnu": "0.4.1",
41
- "@j178/prek-linux-x64-gnu": "0.4.1",
42
- "@j178/prek-linux-x64-musl": "0.4.1",
43
- "@j178/prek-win32-arm64-msvc": "0.4.1",
44
- "@j178/prek-win32-ia32-msvc": "0.4.1",
45
- "@j178/prek-win32-x64-msvc": "0.4.1"
29
+ "@j178/prek-darwin-arm64": "0.4.2",
30
+ "@j178/prek-darwin-x64": "0.4.2",
31
+ "@j178/prek-linux-arm64-gnu": "0.4.2",
32
+ "@j178/prek-linux-arm64-musl": "0.4.2",
33
+ "@j178/prek-android-arm64": "0.4.2",
34
+ "@j178/prek-linux-arm-gnueabihf": "0.4.2",
35
+ "@j178/prek-linux-arm-musleabihf": "0.4.2",
36
+ "@j178/prek-linux-armv7-musleabihf": "0.4.2",
37
+ "@j178/prek-linux-ia32-gnu": "0.4.2",
38
+ "@j178/prek-linux-ia32-musl": "0.4.2",
39
+ "@j178/prek-linux-riscv64-gnu": "0.4.2",
40
+ "@j178/prek-linux-s390x-gnu": "0.4.2",
41
+ "@j178/prek-linux-x64-gnu": "0.4.2",
42
+ "@j178/prek-linux-x64-musl": "0.4.2",
43
+ "@j178/prek-win32-arm64-msvc": "0.4.2",
44
+ "@j178/prek-win32-ia32-msvc": "0.4.2",
45
+ "@j178/prek-win32-x64-msvc": "0.4.2"
46
46
  }
47
47
  }