@j178/prek 0.4.12 → 0.4.13

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 +66 -0
  2. package/README.md +19 -17
  3. package/package.json +18 -18
package/CHANGELOG.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.13
4
+
5
+ Released on 2026-08-10.
6
+
7
+ ### Highlights
8
+
9
+ #### Manage hook tools with mise
10
+
11
+ The new `language: mise` support lets hooks install tools using
12
+ [`mise`](https://mise.jdx.dev/) in an isolated environment:
13
+
14
+ ```yaml
15
+ repos:
16
+ - repo: local
17
+ hooks:
18
+ - id: golangci-lint
19
+ name: golangci-lint
20
+ language: mise
21
+ additional_dependencies: ["aqua:golangci/golangci-lint@2"]
22
+ entry: golangci-lint run --fast-only ./...
23
+ pass_filenames: false
24
+ ```
25
+
26
+ #### Run commands in hook environments
27
+
28
+ The new `prek exec` subcommand can run an explicit command in a configured
29
+ hook's prepared environment. For example, the hook above makes its managed
30
+ binary available to this command:
31
+
32
+ ```console
33
+ $ prek exec golangci-lint -- golangci-lint --version
34
+ ```
35
+
36
+ ### Enhancements
37
+
38
+ - Add `mise` language support ([#2540](https://github.com/j178/prek/pull/2540))
39
+ - Add `deny-filename-pattern` and `require-filename-pattern` hooks ([#2488](https://github.com/j178/prek/pull/2488))
40
+ - Add `prek exec` for running commands in a hook environment ([#2478](https://github.com/j178/prek/pull/2478))
41
+ - Add `yaml-language-server:` comment to YAML sample config ([#2486](https://github.com/j178/prek/pull/2486))
42
+ - Make `prek cache size` output terminal-aware ([#2508](https://github.com/j178/prek/pull/2508))
43
+ - Match file regexes against path bytes ([#2541](https://github.com/j178/prek/pull/2541))
44
+ - Show hook aliases in run output ([#2497](https://github.com/j178/prek/pull/2497))
45
+ - Show hook descriptions in run output ([#2490](https://github.com/j178/prek/pull/2490))
46
+
47
+ ### Performance
48
+
49
+ - Avoid env cache scans for skipped hooks ([#2502](https://github.com/j178/prek/pull/2502))
50
+ - Cache Node version queries ([#2500](https://github.com/j178/prek/pull/2500))
51
+
52
+ ### Bug fixes
53
+
54
+ - Fix Node hook installation with npm 11 ([#2487](https://github.com/j178/prek/pull/2487))
55
+ - Isolate dependency installs from inherited Git repository state ([#2506](https://github.com/j178/prek/pull/2506))
56
+
57
+ ### Documentation
58
+
59
+ - Document combined group filtering ([#2495](https://github.com/j178/prek/pull/2495))
60
+ - Explain what prek does in README ([#2507](https://github.com/j178/prek/pull/2507))
61
+ - Refresh "Why prek" highlights ([#2474](https://github.com/j178/prek/pull/2474))
62
+
63
+ ### Contributors
64
+
65
+ - @will-wright-eng
66
+ - @Repiteo
67
+ - @j178
68
+
3
69
  ## 0.4.12
4
70
 
5
71
  Released on 2026-08-03.
package/README.md CHANGED
@@ -21,12 +21,13 @@
21
21
 
22
22
  <!-- --8<-- [start: description] -->
23
23
 
24
- [pre-commit](https://pre-commit.com/) is a framework to run hooks written in many languages, and it manages the
25
- language toolchain and dependencies for running the hooks.
24
+ prek is a framework for running hooks on your code. It runs them before you commit changes, on demand, or in CI.
25
+ These hooks can format files, catch lint errors, detect secrets, or run any other command your project defines.
26
+ prek also installs and manages the tools and dependencies they need.
26
27
 
27
- prek is a reimagined version of pre-commit, built in Rust.
28
- It is designed to be a faster, dependency-free and drop-in alternative for it,
29
- while also providing some additional long-requested features.
28
+ You may already be familiar with the [pre-commit](https://pre-commit.com/) tool. prek is a reimagined version of it,
29
+ built in Rust. It is faster and distributed as a single binary with no runtime dependencies. It is fully compatible
30
+ with pre-commit configurations and hooks, so you can use it as a drop-in replacement without changing your setup.
30
31
 
31
32
  <!-- --8<-- [end: description] -->
32
33
 
@@ -58,7 +59,7 @@ On Linux and macOS:
58
59
  <!-- --8<-- [start: linux-standalone-install] -->
59
60
 
60
61
  ```bash
61
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.12/prek-installer.sh | sh
62
+ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.13/prek-installer.sh | sh
62
63
  ```
63
64
 
64
65
  <!-- --8<-- [end: linux-standalone-install] -->
@@ -68,7 +69,7 @@ On Windows:
68
69
  <!-- --8<-- [start: windows-standalone-install] -->
69
70
 
70
71
  ```powershell
71
- powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.4.12/prek-installer.ps1 | iex"
72
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.4.13/prek-installer.ps1 | iex"
72
73
  ```
73
74
 
74
75
  <!-- --8<-- [end: windows-standalone-install] -->
@@ -301,7 +302,7 @@ jobs:
301
302
  runs-on: ubuntu-latest
302
303
  steps:
303
304
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
304
- - uses: j178/prek-action@5337cb91e0fa35a7ff31b9ca345126d8bbbcdf16 # v2
305
+ - uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # v3.0.0
305
306
  ```
306
307
 
307
308
  This action installs prek and runs `prek run --all-files` on your repository.
@@ -350,26 +351,27 @@ prek self update
350
351
 
351
352
  - It is [multiple times faster](https://prek.j178.dev/benchmark/) than `pre-commit` while also using less disk space.
352
353
  - Hook environments and toolchains are shared across hooks instead of being duplicated per repository, which reduces both install time and cache size.
353
- - 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.
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.
354
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.
355
- - It implements some common hooks in Rust as [builtins](https://prek.j178.dev/builtin/), which are faster than their Python counterparts.
356
- - It supports `repo: builtin` for offline, zero-setup hooks, which is not available in `pre-commit`.
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.
357
+ - The prek-only `repo: builtin` mode provides offline, zero-setup hooks, including native `deny-pattern` and `require-pattern` alternatives for common `pygrep` checks.
357
358
 
358
359
  ### prek is easier to work with
359
360
 
360
361
  - No need to install Python or any other runtime just to use `prek`; it is a single binary.
361
- - `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.
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
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.
363
- - 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.
364
- - Workspace mode schedules independent same-depth projects concurrently while preserving parent/child ordering, which helps large monorepos finish faster without mixing project file scopes.
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.
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
- - [`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`.
367
- - [`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.
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
+ - [`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`.
368
+ - The progress UI streams a live preview from running hooks, so long-running checks do not look stuck and failures are easier to diagnose.
369
+ - [`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 -v`](https://prek.j178.dev/reference/cli/#prek-util-list-builtins) make it easier to inspect configured hooks, debug file matching, and discover builtins with their supported options.
368
370
 
369
371
  ### prek includes security-focused safeguards
370
372
 
371
373
  - For supported managed toolchain downloads, `prek` verifies the downloaded archive or installer checksum before extracting or installing it, helping ensure the integrity of downloaded toolchains.
372
- - [`prek update`](https://prek.j178.dev/reference/cli/#prek-update) supports `--cooldown-days`, so you can keep newly published releases on hold for a cooling-off period before adopting them.
374
+ - [`prek update`](https://prek.j178.dev/reference/cli/#prek-update) can keep newly published releases on hold with `--cooldown-days`, filter eligible tags with glob patterns, and freeze revisions to commit SHAs.
373
375
  - [`prek update`](https://prek.j178.dev/reference/cli/#prek-update) validates pinned SHA revisions against the fetched upstream refs, including impostor-commit detection, and keeps `# frozen:` comments in sync with the configured commit.
374
376
  - [`prek update --check`](https://prek.j178.dev/reference/cli/#prek-update--check) is useful in CI when you want updates or frozen-reference mismatches to fail the job without rewriting the config.
375
377
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j178/prek",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
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.12",
30
- "@j178/prek-darwin-x64": "0.4.12",
31
- "@j178/prek-linux-arm64-gnu": "0.4.12",
32
- "@j178/prek-linux-arm64-musl": "0.4.12",
33
- "@j178/prek-android-arm64": "0.4.12",
34
- "@j178/prek-linux-arm-gnueabihf": "0.4.12",
35
- "@j178/prek-linux-arm-musleabihf": "0.4.12",
36
- "@j178/prek-linux-armv7-musleabihf": "0.4.12",
37
- "@j178/prek-linux-ia32-gnu": "0.4.12",
38
- "@j178/prek-linux-ia32-musl": "0.4.12",
39
- "@j178/prek-linux-riscv64-gnu": "0.4.12",
40
- "@j178/prek-linux-s390x-gnu": "0.4.12",
41
- "@j178/prek-linux-x64-gnu": "0.4.12",
42
- "@j178/prek-linux-x64-musl": "0.4.12",
43
- "@j178/prek-win32-arm64-msvc": "0.4.12",
44
- "@j178/prek-win32-ia32-msvc": "0.4.12",
45
- "@j178/prek-win32-x64-msvc": "0.4.12"
29
+ "@j178/prek-darwin-arm64": "0.4.13",
30
+ "@j178/prek-darwin-x64": "0.4.13",
31
+ "@j178/prek-linux-arm64-gnu": "0.4.13",
32
+ "@j178/prek-linux-arm64-musl": "0.4.13",
33
+ "@j178/prek-android-arm64": "0.4.13",
34
+ "@j178/prek-linux-arm-gnueabihf": "0.4.13",
35
+ "@j178/prek-linux-arm-musleabihf": "0.4.13",
36
+ "@j178/prek-linux-armv7-musleabihf": "0.4.13",
37
+ "@j178/prek-linux-ia32-gnu": "0.4.13",
38
+ "@j178/prek-linux-ia32-musl": "0.4.13",
39
+ "@j178/prek-linux-riscv64-gnu": "0.4.13",
40
+ "@j178/prek-linux-s390x-gnu": "0.4.13",
41
+ "@j178/prek-linux-x64-gnu": "0.4.13",
42
+ "@j178/prek-linux-x64-musl": "0.4.13",
43
+ "@j178/prek-win32-arm64-msvc": "0.4.13",
44
+ "@j178/prek-win32-ia32-msvc": "0.4.13",
45
+ "@j178/prek-win32-x64-msvc": "0.4.13"
46
46
  }
47
47
  }