@j178/prek 0.3.1 → 0.3.3

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,160 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.3
4
+
5
+ Released on 2026-02-15.
6
+
7
+ ### Enhancements
8
+
9
+ - Read Python version specifier from hook repo `pyproject.toml` ([#1596](https://github.com/j178/prek/pull/1596))
10
+ - Add `#:schema` directives to generated prek.toml ([#1597](https://github.com/j178/prek/pull/1597))
11
+ - Add `prek util list-builtins` command ([#1600](https://github.com/j178/prek/pull/1600))
12
+ - Expand install source detection to `mise`, `uv tool`, `pipx`, and `asdf` ([#1605](https://github.com/j178/prek/pull/1605), [#1607](https://github.com/j178/prek/pull/1607))
13
+ - Add progress bar to `cache clean` and show removal summary ([#1616](https://github.com/j178/prek/pull/1616))
14
+ - Make `yaml-to-toml` CONFIG argument optional ([#1593](https://github.com/j178/prek/pull/1593))
15
+ - `prek uninstall` removes legacy scripts too ([#1622](https://github.com/j178/prek/pull/1622))
16
+
17
+ ### Bug fixes
18
+
19
+ - Fix underflow when formatting summary output ([#1626](https://github.com/j178/prek/pull/1626))
20
+ - Match `files/exclude` filter against relative path of nested project ([#1624](https://github.com/j178/prek/pull/1624))
21
+ - Select `musllinux` wheel tag for uv on musl-based distros ([#1628](https://github.com/j178/prek/pull/1628))
22
+
23
+ ### Documentation
24
+
25
+ - Clarify `prek list` description ([#1604](https://github.com/j178/prek/pull/1604))
26
+
27
+ ### Contributors
28
+
29
+ - @ichoosetoaccept
30
+ - @shaanmajid
31
+ - @soraxas
32
+ - @9999years
33
+ - @j178
34
+
35
+ ## 0.3.2
36
+
37
+ Released on 2026-02-06.
38
+
39
+ ### Highlights
40
+
41
+ - **`prek.toml` is here!**
42
+
43
+ You can now use `prek.toml` as an alternative to `.pre-commit-config.yaml` for configuring prek. `prek.toml` mirrors the structure of `.pre-commit-config.yaml`, but TOML is less error-prone. Your existing `.pre-commit-config.yaml` will continue to work, but for new users and new projects, `prek.toml` may make more sense. If you want to switch, run `prek util yaml-to-toml` to convert YAML configs to `prek.toml`. See [configuration docs](configuration.md) for details.
44
+
45
+ For example, this config:
46
+
47
+ ```yaml
48
+ repos:
49
+ - repo: https://github.com/pre-commit/pre-commit-hooks
50
+ rev: v6.0.0
51
+ hooks:
52
+ - id: check-yaml
53
+ ```
54
+
55
+ Can be written as `prek.toml` like this:
56
+
57
+ ```toml
58
+ [[repos]]
59
+ repo = "https://github.com/pre-commit/pre-commit-hooks"
60
+ rev = "v6.0.0"
61
+ hooks = [ { id = "check-yaml" } ]
62
+ ```
63
+
64
+ - **`serde-yaml` has been replaced with `serde-saphyr`**
65
+
66
+ We replaced the long-deprecated `serde-yaml` crate with [`serde-saphyr`](https://crates.io/crates/serde-saphyr) for YAML parsing. It is written in safe Rust and has better error messages, performance, and security. This lets us provide precise location information for configuration parsing errors, which should make it easier to fix config issues.
67
+
68
+ For example, this invalid config:
69
+
70
+ ```yaml
71
+ repos:
72
+ - repo: https://github.com/crate-ci/typos
73
+ hooks:
74
+ - id: typos
75
+ ```
76
+
77
+ Before:
78
+
79
+ ```console
80
+ $ prek run
81
+ error: Failed to parse `.pre-commit-config.yaml`
82
+ caused by: Invalid remote repo: missing field `rev`
83
+ ```
84
+
85
+ Now:
86
+
87
+ ```console
88
+ $ prek run
89
+ error: Failed to parse `.pre-commit-config.yaml`
90
+ caused by: error: line 2 column 5: missing field `rev` at line 2, column 5
91
+ --> <input>:2:5
92
+ |
93
+ 1 | repos:
94
+ 2 | - repo: https://github.com/crate-ci/typos
95
+ | ^ missing field `rev` at line 2, column 5
96
+ 3 | hooks:
97
+ 4 | - id: typos
98
+ |
99
+ ```
100
+
101
+ - **`prek util` subcommands**
102
+
103
+ We added a new `prek util` top-level command for miscellaneous utilities that don't fit into other categories. The first two utilities are:
104
+
105
+ - `prek util identify`: shows the identification tags of files that prek uses for file filtering, which can be useful for debugging and writing `types/types_or/exclude_types` filters.
106
+ - `prek util yaml-to-toml`: converts `.pre-commit-config.yaml` to `prek.toml`.
107
+
108
+ We also moved `prek init-template-dir` under `prek util` for better organization. The old `prek init-template-dir` command is still available (hidden) as an alias for backward compatibility.
109
+
110
+ ### Enhancements
111
+
112
+ - Add `prek util identify` subcommand ([#1554](https://github.com/j178/prek/pull/1554))
113
+ - Add `prek util yaml-to-toml` to convert `.pre-commit-config.yaml` to `prek.toml` ([#1584](https://github.com/j178/prek/pull/1584))
114
+ - Detect install source for actionable upgrade hints ([#1540](https://github.com/j178/prek/pull/1540))
115
+ - Detect prek installed by the standalone installer ([#1545](https://github.com/j178/prek/pull/1545))
116
+ - Implement `serialize_yaml_scalar` using `serde-saphyr` ([#1534](https://github.com/j178/prek/pull/1534))
117
+ - Improve max cli arguments length calculation ([#1518](https://github.com/j178/prek/pull/1518))
118
+ - Move `identify` and `init-template-dir` under the `prek util` top-level command ([#1574](https://github.com/j178/prek/pull/1574))
119
+ - Replace serde-yaml with serde-saphyr (again) ([#1520](https://github.com/j178/prek/pull/1520))
120
+ - Show precise location for config parsing error ([#1530](https://github.com/j178/prek/pull/1530))
121
+ - Support `Julia` language ([#1519](https://github.com/j178/prek/pull/1519))
122
+ - Support `prek.toml` ([#1271](https://github.com/j178/prek/pull/1271))
123
+ - Added `PREK_QUIET` environment variable support ([#1513](https://github.com/j178/prek/pull/1513))
124
+ - Remove upper bound constraint of uv version ([#1588](https://github.com/j178/prek/pull/1588))
125
+
126
+ ### Bug fixes
127
+
128
+ - Do not make the child a session leader ([#1586](https://github.com/j178/prek/pull/1586))
129
+ - Fix FilePattern schema to accept plain strings ([#1564](https://github.com/j178/prek/pull/1564))
130
+ - Use semver fallback sort when tag timestamps are equal ([#1579](https://github.com/j178/prek/pull/1579))
131
+
132
+ ### Documentation
133
+
134
+ - Add `OpenClaw` to the list of users ([#1517](https://github.com/j178/prek/pull/1517))
135
+ - Add `cachix/devenv`, `apache/lucene`, `copper-project/copper-rs` as projects using prek ([#1531](https://github.com/j178/prek/pull/1531), [#1514](https://github.com/j178/prek/pull/1514), [#1569](https://github.com/j178/prek/pull/1569))
136
+ - Add document about authoring remote hooks ([#1571](https://github.com/j178/prek/pull/1571))
137
+ - Add `llms.txt` generation for LLM-friendly documentation ([#1553](https://github.com/j178/prek/pull/1553))
138
+ - Document using `--refresh` to pick up `.prekignore` changes ([#1575](https://github.com/j178/prek/pull/1575))
139
+ - Fix PowerShell completion instruction syntax ([#1568](https://github.com/j178/prek/pull/1568))
140
+ - Update quick start to use `prek.toml` ([#1576](https://github.com/j178/prek/pull/1576))
141
+
142
+ ### Other changes
143
+
144
+ - Include `prek.toml` in run hint for config filename ([#1578](https://github.com/j178/prek/pull/1578))
145
+
146
+ ### Contributors
147
+
148
+ - @fatelei
149
+ - @domenkozar
150
+ - @makeecat
151
+ - @fllesser
152
+ - @j178
153
+ - @copilot-swe-agent
154
+ - @oopscompiled
155
+ - @rmuir
156
+ - @shaanmajid
157
+
3
158
  ## 0.3.1
4
159
 
5
160
  Released on 2026-01-31.
package/README.md CHANGED
@@ -27,19 +27,19 @@ while also providing some additional long-requested features.
27
27
  > [!NOTE]
28
28
  > Although prek is pretty new, it’s already powering real‑world projects like [CPython](https://github.com/python/cpython), [Apache Airflow](https://github.com/apache/airflow), [FastAPI](https://github.com/fastapi/fastapi), and more projects are picking it up—see [Who is using prek?](#who-is-using-prek). If you’re looking for an alternative to `pre-commit`, please give it a try—we’d love your feedback!
29
29
  >
30
- > Please note that some subcommands and languages are still missing for full drop‑in parity with `pre-commit`. Track the remaining gaps here: [TODO](https://prek.j178.dev/todo/).
30
+ > Please note that some languages are not yet supported for full drop‑in parity with `pre-commit`. See [Language Support](https://prek.j178.dev/languages/) for current status.
31
31
 
32
32
  <!-- --8<-- [start:features] -->
33
33
 
34
34
  ## Features
35
35
 
36
- - 🚀 A single binary with no dependencies, does not require Python or any other runtime.
37
- - ⚡ [Faster](https://prek.j178.dev/benchmark/) than `pre-commit` and more efficient in disk space usage.
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/)).
40
- - 🐍 Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python virtual environments and dependencies.
41
- - 🛠️ Improved toolchain installations for Python, Node.js, Bun, Go, Rust and Ruby, shared between hooks.
42
- - 📦 [Built-in](https://prek.j178.dev/builtin/) Rust-native implementation of some common hooks.
36
+ - A single binary with no dependencies, does not require Python or any other runtime.
37
+ - [Faster](https://prek.j178.dev/benchmark/) than `pre-commit` and more efficient in disk space usage.
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/)).
40
+ - Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python virtual environments and dependencies.
41
+ - Improved toolchain installations for Python, Node.js, Bun, Go, Rust and Ruby, shared between hooks.
42
+ - [Built-in](https://prek.j178.dev/builtin/) Rust-native implementation of some common hooks.
43
43
 
44
44
  <!-- --8<-- [end:features] -->
45
45
 
@@ -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.3.1/prek-installer.sh | sh
66
+ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.3.3/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.3.1/prek-installer.ps1 | iex"
76
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.3.3/prek-installer.ps1 | iex"
77
77
  ```
78
78
 
79
79
  <!-- --8<-- [end: windows-standalone-install] -->
@@ -358,6 +358,7 @@ prek is pretty new, but it is already being used or recommend by some projects a
358
358
  - [fastapi/asyncer](https://github.com/fastapi/asyncer/pull/437)
359
359
  - [astral-sh/ruff](https://github.com/astral-sh/ruff/pull/22505)
360
360
  - [astral-sh/ty](https://github.com/astral-sh/ty/pull/2469)
361
+ - [openclaw/openclaw](https://github.com/openclaw/openclaw/pull/1720)
361
362
  - [home-assistant/core](https://github.com/home-assistant/core/pull/160427)
362
363
  - [DetachHead/basedpyright](https://github.com/DetachHead/basedpyright/pull/1413)
363
364
  - [OpenLineage/OpenLineage](https://github.com/OpenLineage/OpenLineage/pull/3965)
@@ -369,6 +370,7 @@ prek is pretty new, but it is already being used or recommend by some projects a
369
370
  - [python-attrs/attrs](https://github.com/python-attrs/attrs/commit/c95b177682e76a63478d29d040f9cb36a8d31915)
370
371
  - [jlowin/fastmcp](https://github.com/jlowin/fastmcp/pull/2309)
371
372
  - [apache/iceberg-python](https://github.com/apache/iceberg-python/pull/2533)
373
+ - [apache/lucene](https://github.com/apache/lucene/pull/15629)
372
374
  - [jcrist/msgspec](https://github.com/jcrist/msgspec/pull/918)
373
375
  - [python-humanize/humanize](https://github.com/python-humanize/humanize/pull/276)
374
376
  - [MoonshotAI/kimi-cli](https://github.com/MoonshotAI/kimi-cli/pull/535)
@@ -376,6 +378,9 @@ prek is pretty new, but it is already being used or recommend by some projects a
376
378
  - [ast-grep/ast-grep](https://github.com/ast-grep/ast-grep.github.io/commit/e30818144b2967a7f9172c8cf2f4596bba219bf5)
377
379
  - [commitizen-tools/commitizen](https://github.com/commitizen-tools/commitizen)
378
380
  - [cocoindex-io/cocoindex](https://github.com/cocoindex-io/cocoindex/pull/1564)
381
+ - [cachix/devenv](https://github.com/cachix/devenv/pull/2304)
382
+ - [copper-project/copper-rs](https://github.com/copper-project/copper-rs/pull/783)
383
+ - [bramstroker/homeassistant-powercalc](https://github.com/bramstroker/homeassistant-powercalc/pull/3978)
379
384
 
380
385
  <!-- --8<-- [end: why] -->
381
386
 
@@ -23,7 +23,7 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "MIT",
25
25
  "name": "@j178/prek",
26
- "version": "0.3.1"
26
+ "version": "0.3.3"
27
27
  },
28
28
  "node_modules/@isaacs/balanced-match": {
29
29
  "engines": {
@@ -515,5 +515,5 @@
515
515
  }
516
516
  },
517
517
  "requires": true,
518
- "version": "0.3.1"
518
+ "version": "0.3.3"
519
519
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactDownloadUrl": "https://github.com/j178/prek/releases/download/v0.3.1",
2
+ "artifactDownloadUrl": "https://github.com/j178/prek/releases/download/v0.3.3",
3
3
  "author": "j178 <hi@j178.dev>",
4
4
  "bin": {
5
5
  "prek": "run-prek.js"
@@ -210,7 +210,7 @@
210
210
  "zipExt": ".tar.gz"
211
211
  }
212
212
  },
213
- "version": "0.3.1",
213
+ "version": "0.3.3",
214
214
  "volta": {
215
215
  "node": "18.14.1",
216
216
  "npm": "9.5.0"