@j178/prek 0.2.10 → 0.2.12
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 +48 -1
- package/README.md +59 -63
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.12
|
|
4
|
+
|
|
5
|
+
Released on 2025-10-27.
|
|
6
|
+
|
|
7
|
+
### Enhancements
|
|
8
|
+
|
|
9
|
+
- Add a warning for unimplemented hooks ([#976](https://github.com/j178/prek/pull/976))
|
|
10
|
+
- Allow using system trusted store by `PREK_NATIVE_TLS` ([#959](https://github.com/j178/prek/pull/959))
|
|
11
|
+
|
|
12
|
+
### Bug fixes
|
|
13
|
+
|
|
14
|
+
- Do not check for `script` subprocess status ([#964](https://github.com/j178/prek/pull/964))
|
|
15
|
+
- Fix compatibility with older luarocks ([#967](https://github.com/j178/prek/pull/967))
|
|
16
|
+
- Fix local relative path in `try-repo` ([#975](https://github.com/j178/prek/pull/975))
|
|
17
|
+
|
|
18
|
+
### Documentation
|
|
19
|
+
|
|
20
|
+
- Update language support status ([#970](https://github.com/j178/prek/pull/970))
|
|
21
|
+
|
|
22
|
+
### Contributors
|
|
23
|
+
|
|
24
|
+
- @yihong0618
|
|
25
|
+
- @st1971
|
|
26
|
+
- @j178
|
|
27
|
+
|
|
28
|
+
## 0.2.11
|
|
29
|
+
|
|
30
|
+
Released on 2025-10-24.
|
|
31
|
+
|
|
32
|
+
### Enhancements
|
|
33
|
+
|
|
34
|
+
- Support `language: lua` hooks ([#954](https://github.com/j178/prek/pull/954))
|
|
35
|
+
- Support `language_version: system` ([#949](https://github.com/j178/prek/pull/949))
|
|
36
|
+
- Implement `no-commit-to-branch` as builtin hook ([#930](https://github.com/j178/prek/pull/930))
|
|
37
|
+
- Improve styling for stashing error message ([#953](https://github.com/j178/prek/pull/953))
|
|
38
|
+
- Support nix-shell style shebang ([#929](https://github.com/j178/prek/pull/929))
|
|
39
|
+
|
|
40
|
+
### Documentation
|
|
41
|
+
|
|
42
|
+
- Add a page about "Quick start" ([#934](https://github.com/j178/prek/pull/934))
|
|
43
|
+
- Add kreuzberg to "who is using prek" ([#936](https://github.com/j178/prek/pull/936))
|
|
44
|
+
- Clarify minimum mise version required to use `mise use prek` ([#931](https://github.com/j178/prek/pull/931))
|
|
45
|
+
|
|
46
|
+
### Contributors
|
|
47
|
+
|
|
48
|
+
- @fllesser
|
|
49
|
+
- @j178
|
|
50
|
+
|
|
3
51
|
## 0.2.10
|
|
4
52
|
|
|
5
53
|
Released on 2025-10-18.
|
|
@@ -25,7 +73,6 @@ Released on 2025-10-18.
|
|
|
25
73
|
|
|
26
74
|
### Other changes
|
|
27
75
|
|
|
28
|
-
|
|
29
76
|
### Contributors
|
|
30
77
|
|
|
31
78
|
- @AdityasWorks
|
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
3
|
+
<h1>
|
|
4
|
+
<img width="180" alt="prek" src="./docs/assets/logo.webp" />
|
|
5
|
+
<br/>prek
|
|
6
|
+
</h1>
|
|
6
7
|
|
|
7
8
|
[](https://github.com/j178/prek/actions/workflows/ci.yml)
|
|
8
9
|
[](https://codecov.io/github/j178/prek)
|
|
@@ -38,64 +39,13 @@ while also providing some additional long-requested features.
|
|
|
38
39
|
- 📦 [Built-in](https://prek.j178.dev/builtin/) Rust-native implementation of some common hooks.
|
|
39
40
|
<!-- features:end -->
|
|
40
41
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
prek is designed as a drop-in replacement:
|
|
44
|
-
|
|
45
|
-
- [Install prek](#installation)
|
|
46
|
-
- Replace `pre-commit` with `prek` in your commands
|
|
47
|
-
- Your existing `.pre-commit-config.yaml` works unchanged
|
|
42
|
+
## Table of contents
|
|
48
43
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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 -->
|
|
44
|
+
- [Installation](#installation)
|
|
45
|
+
- [Quick start](#quick-start)
|
|
46
|
+
- [Why prek?](#why-prek)
|
|
47
|
+
- [Who is using prek?](#who-is-using-prek)
|
|
48
|
+
- [Acknowledgements](#acknowledgements)
|
|
99
49
|
|
|
100
50
|
## Installation
|
|
101
51
|
|
|
@@ -108,7 +58,7 @@ On Linux and macOS:
|
|
|
108
58
|
|
|
109
59
|
<!-- linux-standalone-install:start -->
|
|
110
60
|
```bash
|
|
111
|
-
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.
|
|
61
|
+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.12/prek-installer.sh | sh
|
|
112
62
|
```
|
|
113
63
|
<!-- linux-standalone-install:end -->
|
|
114
64
|
|
|
@@ -116,7 +66,7 @@ On Windows:
|
|
|
116
66
|
|
|
117
67
|
<!-- windows-standalone-install:start -->
|
|
118
68
|
```powershell
|
|
119
|
-
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.2.
|
|
69
|
+
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.2.12/prek-installer.ps1 | iex"
|
|
120
70
|
```
|
|
121
71
|
<!-- windows-standalone-install:end -->
|
|
122
72
|
|
|
@@ -160,7 +110,7 @@ brew install prek
|
|
|
160
110
|
<summary>mise</summary>
|
|
161
111
|
|
|
162
112
|
<!-- mise-install:start -->
|
|
163
|
-
To use prek with [mise](https://mise.jdx.dev):
|
|
113
|
+
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
114
|
|
|
165
115
|
```bash
|
|
166
116
|
mise use prek
|
|
@@ -294,6 +244,52 @@ prek self update
|
|
|
294
244
|
```
|
|
295
245
|
<!-- self-update:end -->
|
|
296
246
|
|
|
247
|
+
## Quick start
|
|
248
|
+
|
|
249
|
+
- **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.
|
|
250
|
+
- **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).
|
|
251
|
+
|
|
252
|
+
<!-- why:start -->
|
|
253
|
+
## Why prek?
|
|
254
|
+
|
|
255
|
+
### prek is faster
|
|
256
|
+
|
|
257
|
+
- It is [multiple times faster](https://prek.j178.dev/benchmark/) than `pre-commit` and takes up half the disk space.
|
|
258
|
+
- 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.
|
|
259
|
+
- Repositories are cloned in parallel, and hooks are installed in parallel if their dependencies are disjoint.
|
|
260
|
+
- It uses [`uv`](https://github.com/astral-sh/uv) for creating Python virtualenvs and installing dependencies, which is known for its speed and efficiency.
|
|
261
|
+
- It implements some common hooks in Rust, [built in prek](https://prek.j178.dev/builtin/), which are faster than their Python counterparts.
|
|
262
|
+
|
|
263
|
+
### prek provides a better user experience
|
|
264
|
+
|
|
265
|
+
- No need to install Python or any other runtime, just download a single binary.
|
|
266
|
+
- No hassle with your Python version or virtual environments, prek automatically installs the required Python version and creates a virtual environment for you.
|
|
267
|
+
- Built-in support for [workspaces](https://prek.j178.dev/workspace/) (or monorepos), each subproject can have its own `.pre-commit-config.yaml` file.
|
|
268
|
+
- [`prek run`](https://prek.j178.dev/cli/#prek-run) has some nifty improvements over `pre-commit run`, such as:
|
|
269
|
+
- `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.
|
|
270
|
+
- `prek run --last-commit` runs hooks for files changed in the last commit.
|
|
271
|
+
- `prek run [HOOK] [HOOK]` selects and runs multiple hooks.
|
|
272
|
+
- [`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.
|
|
273
|
+
- prek provides shell completions for `prek run <hook_id>` command, making it easier to run specific hooks without remembering their ids.
|
|
274
|
+
|
|
275
|
+
For more detailed improvements prek offers, take a look at [Difference from pre-commit](https://prek.j178.dev/diff/).
|
|
276
|
+
|
|
277
|
+
## Who is using prek?
|
|
278
|
+
|
|
279
|
+
prek is pretty new, but it is already being used or recommend by some projects and organizations:
|
|
280
|
+
|
|
281
|
+
- [Airflow](https://github.com/apache/airflow/issues/44995)
|
|
282
|
+
- [PDM](https://github.com/pdm-project/pdm/pull/3593)
|
|
283
|
+
- [basedpyright](https://github.com/DetachHead/basedpyright/pull/1413)
|
|
284
|
+
- [OpenLineage](https://github.com/OpenLineage/OpenLineage/pull/3965)
|
|
285
|
+
- [Authlib](https://github.com/authlib/authlib/pull/804)
|
|
286
|
+
- [pre-commit-crocodile](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/)
|
|
287
|
+
- [PaperQA2](https://github.com/Future-House/paper-qa/pull/1098)
|
|
288
|
+
- [requests-cache](https://github.com/requests-cache/requests-cache/pull/1116)
|
|
289
|
+
- [kreuzberg](https://github.com/Goldziher/kreuzberg/pull/142)
|
|
290
|
+
|
|
291
|
+
<!-- why:end -->
|
|
292
|
+
|
|
297
293
|
## Acknowledgements
|
|
298
294
|
|
|
299
295
|
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.12"
|
|
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.12"
|
|
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.12",
|
|
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.12",
|
|
228
228
|
"volta": {
|
|
229
229
|
"node": "18.14.1",
|
|
230
230
|
"npm": "9.5.0"
|