@j178/prek 0.4.12 → 0.4.14
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 +88 -0
- package/README.md +19 -17
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,93 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.14
|
|
4
|
+
|
|
5
|
+
Released on 2026-08-17.
|
|
6
|
+
|
|
7
|
+
### Enhancements
|
|
8
|
+
|
|
9
|
+
- Support check-yaml unsafe mode ([#2546](https://github.com/j178/prek/pull/2546))
|
|
10
|
+
|
|
11
|
+
### Performance
|
|
12
|
+
|
|
13
|
+
- Reuse allocations in common filters ([#2548](https://github.com/j178/prek/pull/2548))
|
|
14
|
+
|
|
15
|
+
### Bug fixes
|
|
16
|
+
|
|
17
|
+
- Accept non-finite floats in check-yaml ([#2545](https://github.com/j178/prek/pull/2545))
|
|
18
|
+
- Allow comment-heavy YAML in check-yaml ([#2554](https://github.com/j178/prek/pull/2554))
|
|
19
|
+
- Sanitize captured terminal output before replay ([#2552](https://github.com/j178/prek/pull/2552))
|
|
20
|
+
|
|
21
|
+
### Contributors
|
|
22
|
+
|
|
23
|
+
- @j178
|
|
24
|
+
|
|
25
|
+
## 0.4.13
|
|
26
|
+
|
|
27
|
+
Released on 2026-08-10.
|
|
28
|
+
|
|
29
|
+
### Highlights
|
|
30
|
+
|
|
31
|
+
#### Manage hook tools with mise
|
|
32
|
+
|
|
33
|
+
The new `language: mise` support lets hooks install tools using
|
|
34
|
+
[`mise`](https://mise.jdx.dev/) in an isolated environment:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
repos:
|
|
38
|
+
- repo: local
|
|
39
|
+
hooks:
|
|
40
|
+
- id: golangci-lint
|
|
41
|
+
name: golangci-lint
|
|
42
|
+
language: mise
|
|
43
|
+
additional_dependencies: ["aqua:golangci/golangci-lint@2"]
|
|
44
|
+
entry: golangci-lint run --fast-only ./...
|
|
45
|
+
pass_filenames: false
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Run commands in hook environments
|
|
49
|
+
|
|
50
|
+
The new `prek exec` subcommand can run an explicit command in a configured
|
|
51
|
+
hook's prepared environment. For example, the hook above makes its managed
|
|
52
|
+
binary available to this command:
|
|
53
|
+
|
|
54
|
+
```console
|
|
55
|
+
$ prek exec golangci-lint -- golangci-lint --version
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Enhancements
|
|
59
|
+
|
|
60
|
+
- Add `mise` language support ([#2540](https://github.com/j178/prek/pull/2540))
|
|
61
|
+
- Add `deny-filename-pattern` and `require-filename-pattern` hooks ([#2488](https://github.com/j178/prek/pull/2488))
|
|
62
|
+
- Add `prek exec` for running commands in a hook environment ([#2478](https://github.com/j178/prek/pull/2478))
|
|
63
|
+
- Add `yaml-language-server:` comment to YAML sample config ([#2486](https://github.com/j178/prek/pull/2486))
|
|
64
|
+
- Make `prek cache size` output terminal-aware ([#2508](https://github.com/j178/prek/pull/2508))
|
|
65
|
+
- Match file regexes against path bytes ([#2541](https://github.com/j178/prek/pull/2541))
|
|
66
|
+
- Show hook aliases in run output ([#2497](https://github.com/j178/prek/pull/2497))
|
|
67
|
+
- Show hook descriptions in run output ([#2490](https://github.com/j178/prek/pull/2490))
|
|
68
|
+
|
|
69
|
+
### Performance
|
|
70
|
+
|
|
71
|
+
- Avoid env cache scans for skipped hooks ([#2502](https://github.com/j178/prek/pull/2502))
|
|
72
|
+
- Cache Node version queries ([#2500](https://github.com/j178/prek/pull/2500))
|
|
73
|
+
|
|
74
|
+
### Bug fixes
|
|
75
|
+
|
|
76
|
+
- Fix Node hook installation with npm 11 ([#2487](https://github.com/j178/prek/pull/2487))
|
|
77
|
+
- Isolate dependency installs from inherited Git repository state ([#2506](https://github.com/j178/prek/pull/2506))
|
|
78
|
+
|
|
79
|
+
### Documentation
|
|
80
|
+
|
|
81
|
+
- Document combined group filtering ([#2495](https://github.com/j178/prek/pull/2495))
|
|
82
|
+
- Explain what prek does in README ([#2507](https://github.com/j178/prek/pull/2507))
|
|
83
|
+
- Refresh "Why prek" highlights ([#2474](https://github.com/j178/prek/pull/2474))
|
|
84
|
+
|
|
85
|
+
### Contributors
|
|
86
|
+
|
|
87
|
+
- @will-wright-eng
|
|
88
|
+
- @Repiteo
|
|
89
|
+
- @j178
|
|
90
|
+
|
|
3
91
|
## 0.4.12
|
|
4
92
|
|
|
5
93
|
Released on 2026-08-03.
|
package/README.md
CHANGED
|
@@ -21,12 +21,13 @@
|
|
|
21
21
|
|
|
22
22
|
<!-- --8<-- [start: description] -->
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
28
|
-
It is
|
|
29
|
-
|
|
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.
|
|
62
|
+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.14/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.
|
|
72
|
+
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.4.14/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@
|
|
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
|
-
-
|
|
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
|
-
-
|
|
356
|
-
-
|
|
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
|
-
-
|
|
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
|
-
- [`
|
|
367
|
-
- [`prek
|
|
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)
|
|
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.
|
|
3
|
+
"version": "0.4.14",
|
|
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.
|
|
30
|
-
"@j178/prek-darwin-x64": "0.4.
|
|
31
|
-
"@j178/prek-linux-arm64-gnu": "0.4.
|
|
32
|
-
"@j178/prek-linux-arm64-musl": "0.4.
|
|
33
|
-
"@j178/prek-android-arm64": "0.4.
|
|
34
|
-
"@j178/prek-linux-arm-gnueabihf": "0.4.
|
|
35
|
-
"@j178/prek-linux-arm-musleabihf": "0.4.
|
|
36
|
-
"@j178/prek-linux-armv7-musleabihf": "0.4.
|
|
37
|
-
"@j178/prek-linux-ia32-gnu": "0.4.
|
|
38
|
-
"@j178/prek-linux-ia32-musl": "0.4.
|
|
39
|
-
"@j178/prek-linux-riscv64-gnu": "0.4.
|
|
40
|
-
"@j178/prek-linux-s390x-gnu": "0.4.
|
|
41
|
-
"@j178/prek-linux-x64-gnu": "0.4.
|
|
42
|
-
"@j178/prek-linux-x64-musl": "0.4.
|
|
43
|
-
"@j178/prek-win32-arm64-msvc": "0.4.
|
|
44
|
-
"@j178/prek-win32-ia32-msvc": "0.4.
|
|
45
|
-
"@j178/prek-win32-x64-msvc": "0.4.
|
|
29
|
+
"@j178/prek-darwin-arm64": "0.4.14",
|
|
30
|
+
"@j178/prek-darwin-x64": "0.4.14",
|
|
31
|
+
"@j178/prek-linux-arm64-gnu": "0.4.14",
|
|
32
|
+
"@j178/prek-linux-arm64-musl": "0.4.14",
|
|
33
|
+
"@j178/prek-android-arm64": "0.4.14",
|
|
34
|
+
"@j178/prek-linux-arm-gnueabihf": "0.4.14",
|
|
35
|
+
"@j178/prek-linux-arm-musleabihf": "0.4.14",
|
|
36
|
+
"@j178/prek-linux-armv7-musleabihf": "0.4.14",
|
|
37
|
+
"@j178/prek-linux-ia32-gnu": "0.4.14",
|
|
38
|
+
"@j178/prek-linux-ia32-musl": "0.4.14",
|
|
39
|
+
"@j178/prek-linux-riscv64-gnu": "0.4.14",
|
|
40
|
+
"@j178/prek-linux-s390x-gnu": "0.4.14",
|
|
41
|
+
"@j178/prek-linux-x64-gnu": "0.4.14",
|
|
42
|
+
"@j178/prek-linux-x64-musl": "0.4.14",
|
|
43
|
+
"@j178/prek-win32-arm64-msvc": "0.4.14",
|
|
44
|
+
"@j178/prek-win32-ia32-msvc": "0.4.14",
|
|
45
|
+
"@j178/prek-win32-x64-msvc": "0.4.14"
|
|
46
46
|
}
|
|
47
47
|
}
|