@j178/prek 0.2.10 → 0.2.11
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 +23 -1
- package/README.md +55 -60
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.11
|
|
4
|
+
|
|
5
|
+
Released on 2025-10-24.
|
|
6
|
+
|
|
7
|
+
### Enhancements
|
|
8
|
+
|
|
9
|
+
- Support `language: lua` hooks ([#954](https://github.com/j178/prek/pull/954))
|
|
10
|
+
- Support `language_version: system` ([#949](https://github.com/j178/prek/pull/949))
|
|
11
|
+
- Implement `no-commit-to-branch` as builtin hook ([#930](https://github.com/j178/prek/pull/930))
|
|
12
|
+
- Improve styling for stashing error message ([#953](https://github.com/j178/prek/pull/953))
|
|
13
|
+
- Support nix-shell style shebang ([#929](https://github.com/j178/prek/pull/929))
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
|
|
17
|
+
- Add a page about "Quick start" ([#934](https://github.com/j178/prek/pull/934))
|
|
18
|
+
- Add kreuzberg to "who is using prek" ([#936](https://github.com/j178/prek/pull/936))
|
|
19
|
+
- Clarify minimum mise version required to use `mise use prek` ([#931](https://github.com/j178/prek/pull/931))
|
|
20
|
+
|
|
21
|
+
### Contributors
|
|
22
|
+
|
|
23
|
+
- @fllesser
|
|
24
|
+
- @j178
|
|
25
|
+
|
|
3
26
|
## 0.2.10
|
|
4
27
|
|
|
5
28
|
Released on 2025-10-18.
|
|
@@ -25,7 +48,6 @@ Released on 2025-10-18.
|
|
|
25
48
|
|
|
26
49
|
### Other changes
|
|
27
50
|
|
|
28
|
-
|
|
29
51
|
### Contributors
|
|
30
52
|
|
|
31
53
|
- @AdityasWorks
|
package/README.md
CHANGED
|
@@ -38,64 +38,13 @@ while also providing some additional long-requested features.
|
|
|
38
38
|
- 📦 [Built-in](https://prek.j178.dev/builtin/) Rust-native implementation of some common hooks.
|
|
39
39
|
<!-- features:end -->
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## Table of contents
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- [
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
```console
|
|
50
|
-
$ prek run
|
|
51
|
-
trim trailing whitespace.................................................Passed
|
|
52
|
-
fix end of files.........................................................Passed
|
|
53
|
-
typos....................................................................Passed
|
|
54
|
-
cargo fmt................................................................Passed
|
|
55
|
-
cargo clippy.............................................................Passed
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
For configuring `.pre-commit-config.yaml` and writing hooks, you can refer to the [pre-commit documentation](https://pre-commit.com/) as prek is fully compatible with it.
|
|
59
|
-
|
|
60
|
-
<!-- why:start -->
|
|
61
|
-
## Why prek?
|
|
62
|
-
|
|
63
|
-
### prek is faster
|
|
64
|
-
|
|
65
|
-
- It is [multiple times faster](https://prek.j178.dev/benchmark/) than `pre-commit` and takes up half the disk space.
|
|
66
|
-
- 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.
|
|
67
|
-
- Repositories are cloned in parallel, and hooks are installed in parallel if their dependencies are disjoint.
|
|
68
|
-
- It uses [`uv`](https://github.com/astral-sh/uv) for creating Python virtualenvs and installing dependencies, which is known for its speed and efficiency.
|
|
69
|
-
- It implements some common hooks in Rust, [built in prek](https://prek.j178.dev/builtin/), which are faster than their Python counterparts.
|
|
70
|
-
|
|
71
|
-
### prek provides a better user experience
|
|
72
|
-
|
|
73
|
-
- No need to install Python or any other runtime, just download a single binary.
|
|
74
|
-
- No hassle with your Python version or virtual environments, prek automatically installs the required Python version and creates a virtual environment for you.
|
|
75
|
-
- Built-in support for workspaces (or monorepos), each subproject can have its own `.pre-commit-config.yaml` file.
|
|
76
|
-
- `prek run` has some nifty improvements over `pre-commit run`, such as:
|
|
77
|
-
- `prek run --directory <dir>` runs hooks for files in the specified directory, no need to use `git ls-files -- <dir> | xargs pre-commit run --files` anymore.
|
|
78
|
-
- `prek run --last-commit` runs hooks for files changed in the last commit.
|
|
79
|
-
- `prek run [HOOK] [HOOK]` selects and runs multiple hooks.
|
|
80
|
-
- `prek list` command lists all available hooks, their ids, and descriptions, providing a better overview of the configured hooks.
|
|
81
|
-
- prek provides shell completions for `prek run <hook_id>` command, making it easier to run specific hooks without remembering their ids.
|
|
82
|
-
|
|
83
|
-
For more detailed improvements prek offers, take a look at [Difference from pre-commit](https://prek.j178.dev/diff/).
|
|
84
|
-
|
|
85
|
-
## Who is using prek?
|
|
86
|
-
|
|
87
|
-
prek is pretty new, but it is already being used or recommend by some projects and organizations:
|
|
88
|
-
|
|
89
|
-
- [Airflow](https://github.com/apache/airflow/issues/44995)
|
|
90
|
-
- [PDM](https://github.com/pdm-project/pdm/pull/3593)
|
|
91
|
-
- [basedpyright](https://github.com/DetachHead/basedpyright/pull/1413)
|
|
92
|
-
- [OpenLineage](https://github.com/OpenLineage/OpenLineage/pull/3965)
|
|
93
|
-
- [Authlib](https://github.com/authlib/authlib/pull/804)
|
|
94
|
-
- [pre-commit-crocodile](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/)
|
|
95
|
-
- [PaperQA2](https://github.com/Future-House/paper-qa/pull/1098)
|
|
96
|
-
- [requests-cache](https://github.com/requests-cache/requests-cache/pull/1116)
|
|
97
|
-
|
|
98
|
-
<!-- why:end -->
|
|
43
|
+
- [Installation](#installation)
|
|
44
|
+
- [Quick start](#quick-start)
|
|
45
|
+
- [Why prek?](#why-prek)
|
|
46
|
+
- [Who is using prek?](#who-is-using-prek)
|
|
47
|
+
- [Acknowledgements](#acknowledgements)
|
|
99
48
|
|
|
100
49
|
## Installation
|
|
101
50
|
|
|
@@ -108,7 +57,7 @@ On Linux and macOS:
|
|
|
108
57
|
|
|
109
58
|
<!-- linux-standalone-install:start -->
|
|
110
59
|
```bash
|
|
111
|
-
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.
|
|
60
|
+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.11/prek-installer.sh | sh
|
|
112
61
|
```
|
|
113
62
|
<!-- linux-standalone-install:end -->
|
|
114
63
|
|
|
@@ -116,7 +65,7 @@ On Windows:
|
|
|
116
65
|
|
|
117
66
|
<!-- windows-standalone-install:start -->
|
|
118
67
|
```powershell
|
|
119
|
-
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.2.
|
|
68
|
+
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.2.11/prek-installer.ps1 | iex"
|
|
120
69
|
```
|
|
121
70
|
<!-- windows-standalone-install:end -->
|
|
122
71
|
|
|
@@ -160,7 +109,7 @@ brew install prek
|
|
|
160
109
|
<summary>mise</summary>
|
|
161
110
|
|
|
162
111
|
<!-- mise-install:start -->
|
|
163
|
-
To use prek with [mise](https://mise.jdx.dev):
|
|
112
|
+
To use prek with [mise](https://mise.jdx.dev) ([v2025.8.11](https://github.com/jdx/mise/releases/tag/v2025.8.11) or later):
|
|
164
113
|
|
|
165
114
|
```bash
|
|
166
115
|
mise use prek
|
|
@@ -294,6 +243,52 @@ prek self update
|
|
|
294
243
|
```
|
|
295
244
|
<!-- self-update:end -->
|
|
296
245
|
|
|
246
|
+
## Quick start
|
|
247
|
+
|
|
248
|
+
- **I already use pre-commit:** follow the short migration checklist in the [quickstart guide](https://prek.j178.dev/quickstart/#already-using-pre-commit) to swap in `prek` safely.
|
|
249
|
+
- **I'm new to pre-commit-style tools:** learn the basics—creating a config, running hooks, and installing git hooks—in the [beginner quickstart walkthrough](https://prek.j178.dev/quickstart/#new-to-pre-commit-style-workflows).
|
|
250
|
+
|
|
251
|
+
<!-- why:start -->
|
|
252
|
+
## Why prek?
|
|
253
|
+
|
|
254
|
+
### prek is faster
|
|
255
|
+
|
|
256
|
+
- It is [multiple times faster](https://prek.j178.dev/benchmark/) than `pre-commit` and takes up half the disk space.
|
|
257
|
+
- 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.
|
|
258
|
+
- Repositories are cloned in parallel, and hooks are installed in parallel if their dependencies are disjoint.
|
|
259
|
+
- It uses [`uv`](https://github.com/astral-sh/uv) for creating Python virtualenvs and installing dependencies, which is known for its speed and efficiency.
|
|
260
|
+
- It implements some common hooks in Rust, [built in prek](https://prek.j178.dev/builtin/), which are faster than their Python counterparts.
|
|
261
|
+
|
|
262
|
+
### prek provides a better user experience
|
|
263
|
+
|
|
264
|
+
- No need to install Python or any other runtime, just download a single binary.
|
|
265
|
+
- No hassle with your Python version or virtual environments, prek automatically installs the required Python version and creates a virtual environment for you.
|
|
266
|
+
- Built-in support for [workspaces](https://prek.j178.dev/workspace/) (or monorepos), each subproject can have its own `.pre-commit-config.yaml` file.
|
|
267
|
+
- [`prek run`](https://prek.j178.dev/cli/#prek-run) has some nifty improvements over `pre-commit run`, such as:
|
|
268
|
+
- `prek run --directory <dir>` runs hooks for files in the specified directory, no need to use `git ls-files -- <dir> | xargs pre-commit run --files` anymore.
|
|
269
|
+
- `prek run --last-commit` runs hooks for files changed in the last commit.
|
|
270
|
+
- `prek run [HOOK] [HOOK]` selects and runs multiple hooks.
|
|
271
|
+
- [`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.
|
|
272
|
+
- prek provides shell completions for `prek run <hook_id>` command, making it easier to run specific hooks without remembering their ids.
|
|
273
|
+
|
|
274
|
+
For more detailed improvements prek offers, take a look at [Difference from pre-commit](https://prek.j178.dev/diff/).
|
|
275
|
+
|
|
276
|
+
## Who is using prek?
|
|
277
|
+
|
|
278
|
+
prek is pretty new, but it is already being used or recommend by some projects and organizations:
|
|
279
|
+
|
|
280
|
+
- [Airflow](https://github.com/apache/airflow/issues/44995)
|
|
281
|
+
- [PDM](https://github.com/pdm-project/pdm/pull/3593)
|
|
282
|
+
- [basedpyright](https://github.com/DetachHead/basedpyright/pull/1413)
|
|
283
|
+
- [OpenLineage](https://github.com/OpenLineage/OpenLineage/pull/3965)
|
|
284
|
+
- [Authlib](https://github.com/authlib/authlib/pull/804)
|
|
285
|
+
- [pre-commit-crocodile](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/)
|
|
286
|
+
- [PaperQA2](https://github.com/Future-House/paper-qa/pull/1098)
|
|
287
|
+
- [requests-cache](https://github.com/requests-cache/requests-cache/pull/1116)
|
|
288
|
+
- [kreuzberg](https://github.com/Goldziher/kreuzberg/pull/142)
|
|
289
|
+
|
|
290
|
+
<!-- why:end -->
|
|
291
|
+
|
|
297
292
|
## Acknowledgements
|
|
298
293
|
|
|
299
294
|
This project is heavily inspired by the original [pre-commit](https://pre-commit.com/) tool, and it wouldn't be possible without the hard work
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"name": "@j178/prek",
|
|
26
|
-
"version": "0.2.
|
|
26
|
+
"version": "0.2.11"
|
|
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.
|
|
899
|
+
"version": "0.2.11"
|
|
900
900
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"artifactDownloadUrl": "https://github.com/j178/prek/releases/download/v0.2.
|
|
2
|
+
"artifactDownloadUrl": "https://github.com/j178/prek/releases/download/v0.2.11",
|
|
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.
|
|
227
|
+
"version": "0.2.11",
|
|
228
228
|
"volta": {
|
|
229
229
|
"node": "18.14.1",
|
|
230
230
|
"npm": "9.5.0"
|