@j178/prek 0.2.21 → 0.2.23

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,62 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.23
4
+
5
+ Released on 2025-12-20.
6
+
7
+ ### Highlights
8
+
9
+ 🚀 This release introduces priority-based parallel hook execution: prek can run multiple hooks in parallel when they share the same `priority`, which can be a huge speed-up for many configs. See configuration docs for [`priority`](https://prek.j178.dev/configuration/#priority).
10
+
11
+ ### Enhancements
12
+
13
+ - Allow uv reading user-level or system-level configuration files ([#1227](https://github.com/j178/prek/pull/1227))
14
+ - Implement `check-case-conflict` as builtin hook ([#888](https://github.com/j178/prek/pull/888))
15
+ - Implement `priority` based parallel execution ([#1232](https://github.com/j178/prek/pull/1232))
16
+
17
+ ### Bug fixes
18
+
19
+ - Fix `check-executable-have-shebangs` "command line too long" error on Windows ([#1236](https://github.com/j178/prek/pull/1236))
20
+
21
+ ### Documentation
22
+
23
+ - Add FastAPI to the list of projects using prek ([#1241](https://github.com/j178/prek/pull/1241))
24
+ - Document hook_types flag and default_install_hook_types behavior ([#1225](https://github.com/j178/prek/pull/1225))
25
+ - Improve documentation for `priority` ([#1245](https://github.com/j178/prek/pull/1245))
26
+ - Mention prek can be installed via`taiki-e/install-action@prek` ([#1234](https://github.com/j178/prek/pull/1234))
27
+
28
+ ### Contributors
29
+
30
+ - @j178
31
+ - @copilot-swe-agent
32
+ - @lmmx
33
+
34
+ ## 0.2.22
35
+
36
+ Released on 2025-12-13.
37
+
38
+ ### Highlights
39
+
40
+ In this release, prek adds support for the `--cooldown-days` option in the `prek auto-update` command.
41
+ This option allows users to skip releases that are newer than a specified number of days.
42
+ It is useful to mitigate open source supply chain risks by avoiding very recent releases that may not have been widely adopted or vetted yet.
43
+ Big thanks to @lmmx for driving this feature!
44
+
45
+ ### Enhancements
46
+
47
+ - Support`--cooldown-days` in `prek auto-update` ([#1172](https://github.com/j178/prek/pull/1172))
48
+ - Prefer tag creation timestamp in `--cooldown-days` ([#1221](https://github.com/j178/prek/pull/1221))
49
+ - Use `cargo install` for packages in workspace ([#1207](https://github.com/j178/prek/pull/1207))
50
+
51
+ ### Bug fixes
52
+
53
+ - Set `CARGO_HOME` for `cargo metadata` ([#1209](https://github.com/j178/prek/pull/1209))
54
+
55
+ ### Contributors
56
+
57
+ - @j178
58
+ - @lmmx
59
+
3
60
  ## 0.2.21
4
61
 
5
62
  Released on 2025-12-09.
package/README.md CHANGED
@@ -6,7 +6,6 @@
6
6
  </h1>
7
7
 
8
8
  [![prek](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json)](https://github.com/j178/prek)
9
- [![CI](https://github.com/j178/prek/actions/workflows/ci.yml/badge.svg)](https://github.com/j178/prek/actions/workflows/ci.yml)
10
9
  [![codecov](https://codecov.io/github/j178/prek/graph/badge.svg?token=MP6TY24F43)](https://codecov.io/github/j178/prek)
11
10
  [![GitHub Downloads](https://img.shields.io/github/downloads/j178/prek/total?logo=github)](https://github.com/j178/prek/releases)
12
11
  [![PyPI Downloads](https://img.shields.io/pypi/dm/prek?logo=python)](https://pepy.tech/projects/prek)
@@ -24,7 +23,7 @@ while also providing some additional long-requested features.
24
23
  <!-- description:end -->
25
24
 
26
25
  > [!NOTE]
27
- > Although prek is pretty new, it’s already powering real‑world projects like [Apache Airflow](https://github.com/apache/airflow), 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!
26
+ > Although prek is pretty new, it’s already powering real‑world projects like [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!
28
27
  >
29
28
  > 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
29
 
@@ -59,7 +58,7 @@ On Linux and macOS:
59
58
 
60
59
  <!-- linux-standalone-install:start -->
61
60
  ```bash
62
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.21/prek-installer.sh | sh
61
+ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.23/prek-installer.sh | sh
63
62
  ```
64
63
  <!-- linux-standalone-install:end -->
65
64
 
@@ -67,7 +66,7 @@ On Windows:
67
66
 
68
67
  <!-- windows-standalone-install:start -->
69
68
  ```powershell
70
- powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.2.21/prek-installer.ps1 | iex"
69
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.2.23/prek-installer.ps1 | iex"
71
70
  ```
72
71
  <!-- windows-standalone-install:end -->
73
72
 
@@ -86,6 +85,9 @@ uv tool install prek
86
85
  # Using uvx (install and run in one command)
87
86
  uvx prek
88
87
 
88
+ # Adding prek to the project dev-dependencies
89
+ uv add --dev prek
90
+
89
91
  # Using pip
90
92
  pip install prek
91
93
 
@@ -260,6 +262,8 @@ jobs:
260
262
  ```
261
263
 
262
264
  This action installs prek and runs `prek run --all-files` on your repository.
265
+
266
+ prek is also available via [`taiki-e/install-action`](https://github.com/taiki-e/install-action) for installing various tools.
263
267
  <!-- github-actions:end -->
264
268
  </details>
265
269
 
@@ -284,6 +288,7 @@ prek self update
284
288
  - It is [multiple times faster](https://prek.j178.dev/benchmark/) than `pre-commit` and takes up half the disk space.
285
289
  - It redesigned how hook environments and toolchains are managed, they are all shared between hooks, which reduces the disk space usage and speeds up the installation process.
286
290
  - Repositories are cloned in parallel, and hooks are installed in parallel if their dependencies are disjoint.
291
+ - Hooks can run in parallel by priority (hooks with the same [`priority`](https://prek.j178.dev/configuration/#priority) may run concurrently), reducing end-to-end runtime.
287
292
  - It uses [`uv`](https://github.com/astral-sh/uv) for creating Python virtualenvs and installing dependencies, which is known for its speed and efficiency.
288
293
  - It implements some common hooks in Rust, [built in prek](https://prek.j178.dev/builtin/), which are faster than their Python counterparts.
289
294
  - It supports `repo: builtin` for offline, zero-setup hooks, which is not available in `pre-commit`.
@@ -298,6 +303,7 @@ prek self update
298
303
  - `prek run --last-commit` runs hooks for files changed in the last commit.
299
304
  - `prek run [HOOK] [HOOK]` selects and runs multiple hooks.
300
305
  - [`prek list`](https://prek.j178.dev/cli/#prek-list) command lists all available hooks, their ids, and descriptions, providing a better overview of the configured hooks.
306
+ - [`prek auto-update`](https://prek.j178.dev/cli/#prek-auto-update) supports `--cooldown-days` to mitigate open source supply chain attacks.
301
307
  - prek provides shell completions for `prek run <hook_id>` command, making it easier to run specific hooks without remembering their ids.
302
308
 
303
309
  For more detailed improvements prek offers, take a look at [Difference from pre-commit](https://prek.j178.dev/diff/).
@@ -308,6 +314,7 @@ prek is pretty new, but it is already being used or recommend by some projects a
308
314
 
309
315
  - [Apache Airflow](https://github.com/apache/airflow/issues/44995)
310
316
  - [PDM](https://github.com/pdm-project/pdm/pull/3593)
317
+ - [FastAPI](https://github.com/fastapi/fastapi/pull/14572)
311
318
  - [basedpyright](https://github.com/DetachHead/basedpyright/pull/1413)
312
319
  - [OpenLineage](https://github.com/OpenLineage/OpenLineage/pull/3965)
313
320
  - [Authlib](https://github.com/authlib/authlib/pull/804)
@@ -23,7 +23,7 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "MIT",
25
25
  "name": "@j178/prek",
26
- "version": "0.2.21"
26
+ "version": "0.2.23"
27
27
  },
28
28
  "node_modules/@isaacs/balanced-match": {
29
29
  "engines": {
@@ -896,5 +896,5 @@
896
896
  }
897
897
  },
898
898
  "requires": true,
899
- "version": "0.2.21"
899
+ "version": "0.2.23"
900
900
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactDownloadUrl": "https://github.com/j178/prek/releases/download/v0.2.21",
2
+ "artifactDownloadUrl": "https://github.com/j178/prek/releases/download/v0.2.23",
3
3
  "author": "j178 <hi@j178.dev>",
4
4
  "bin": {
5
5
  "prek": "run-prek.js"
@@ -224,7 +224,7 @@
224
224
  "zipExt": ".tar.gz"
225
225
  }
226
226
  },
227
- "version": "0.2.21",
227
+ "version": "0.2.23",
228
228
  "volta": {
229
229
  "node": "18.14.1",
230
230
  "npm": "9.5.0"