Skip to content

Commit 71790f3

Browse files
authored
Bump version to 0.3.2 (#1587)
1 parent 9172278 commit 71790f3

File tree

6 files changed

+175
-53
lines changed

6 files changed

+175
-53
lines changed

CHANGELOG.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,128 @@
11
# Changelog
22

3+
## 0.3.2
4+
5+
Released on 2026-02-06.
6+
7+
### Highlights
8+
9+
- **`prek.toml` is here!**
10+
11+
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.
12+
13+
For example, this config:
14+
15+
```yaml
16+
repos:
17+
- repo: https://github.com/pre-commit/pre-commit-hooks
18+
rev: v6.0.0
19+
hooks:
20+
- id: check-yaml
21+
```
22+
23+
Can be written as `prek.toml` like this:
24+
25+
```toml
26+
[[repos]]
27+
repo = "https://github.com/pre-commit/pre-commit-hooks"
28+
rev = "v6.0.0"
29+
hooks = [ { id = "check-yaml" } ]
30+
```
31+
32+
- **`serde-yaml` has been replaced with `serde-saphyr`**
33+
34+
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.
35+
36+
For example, this invalid config:
37+
38+
```yaml
39+
repos:
40+
- repo: https://github.com/crate-ci/typos
41+
hooks:
42+
- id: typos
43+
```
44+
45+
Before:
46+
47+
```console
48+
$ prek run
49+
error: Failed to parse `.pre-commit-config.yaml`
50+
caused by: Invalid remote repo: missing field `rev`
51+
```
52+
53+
Now:
54+
55+
```console
56+
$ prek run
57+
error: Failed to parse `.pre-commit-config.yaml`
58+
caused by: error: line 2 column 5: missing field `rev` at line 2, column 5
59+
--> <input>:2:5
60+
|
61+
1 | repos:
62+
2 | - repo: https://github.com/crate-ci/typos
63+
| ^ missing field `rev` at line 2, column 5
64+
3 | hooks:
65+
4 | - id: typos
66+
|
67+
```
68+
69+
- **`prek util` subcommands**
70+
71+
We added a new `prek util` top-level command for miscellaneous utilities that don't fit into other categories. The first two utilities are:
72+
73+
- `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.
74+
- `prek util yaml-to-toml`: converts `.pre-commit-config.yaml` to `prek.toml`.
75+
76+
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.
77+
78+
### Enhancements
79+
80+
- Add `prek util identify` subcommand ([#1554](https://github.com/j178/prek/pull/1554))
81+
- Add `prek util yaml-to-toml` to convert `.pre-commit-config.yaml` to `prek.toml` ([#1584](https://github.com/j178/prek/pull/1584))
82+
- Detect install source for actionable upgrade hints ([#1540](https://github.com/j178/prek/pull/1540))
83+
- Detect prek installed by the standalone installer ([#1545](https://github.com/j178/prek/pull/1545))
84+
- Implement `serialize_yaml_scalar` using `serde-saphyr` ([#1534](https://github.com/j178/prek/pull/1534))
85+
- Improve max cli arguments length calculation ([#1518](https://github.com/j178/prek/pull/1518))
86+
- Move `identify` and `init-template-dir` under the `prek util` top-level command ([#1574](https://github.com/j178/prek/pull/1574))
87+
- Replace serde-yaml with serde-saphyr (again) ([#1520](https://github.com/j178/prek/pull/1520))
88+
- Show precise location for config parsing error ([#1530](https://github.com/j178/prek/pull/1530))
89+
- Support `Julia` language ([#1519](https://github.com/j178/prek/pull/1519))
90+
- Support `prek.toml` ([#1271](https://github.com/j178/prek/pull/1271))
91+
- Added `PREK_QUIET` environment variable support ([#1513](https://github.com/j178/prek/pull/1513))
92+
- Remove upper bound constraint of uv version ([#1588](https://github.com/j178/prek/pull/1588))
93+
94+
### Bug fixes
95+
96+
- Do not make the child a session leader ([#1586](https://github.com/j178/prek/pull/1586))
97+
- Fix FilePattern schema to accept plain strings ([#1564](https://github.com/j178/prek/pull/1564))
98+
- Use semver fallback sort when tag timestamps are equal ([#1579](https://github.com/j178/prek/pull/1579))
99+
100+
### Documentation
101+
102+
- Add `OpenClaw` to the list of users ([#1517](https://github.com/j178/prek/pull/1517))
103+
- 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))
104+
- Add document about authoring remote hooks ([#1571](https://github.com/j178/prek/pull/1571))
105+
- Add `llms.txt` generation for LLM-friendly documentation ([#1553](https://github.com/j178/prek/pull/1553))
106+
- Document using `--refresh` to pick up `.prekignore` changes ([#1575](https://github.com/j178/prek/pull/1575))
107+
- Fix PowerShell completion instruction syntax ([#1568](https://github.com/j178/prek/pull/1568))
108+
- Update quick start to use `prek.toml` ([#1576](https://github.com/j178/prek/pull/1576))
109+
110+
### Other changes
111+
112+
- Include `prek.toml` in run hint for config filename ([#1578](https://github.com/j178/prek/pull/1578))
113+
114+
### Contributors
115+
116+
- @fatelei
117+
- @domenkozar
118+
- @makeecat
119+
- @fllesser
120+
- @j178
121+
- @copilot-swe-agent
122+
- @oopscompiled
123+
- @rmuir
124+
- @shaanmajid
125+
3126
## 0.3.1
4127

5128
Released on 2026-01-31.

Cargo.lock

Lines changed: 43 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)