@j178/prek 0.5.0 → 0.5.2

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,53 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.2
4
+
5
+ Released on 2026-09-03.
6
+
7
+ ### Enhancements
8
+
9
+ - Allow unknown tags by default in `check-yaml` ([#2678](https://github.com/j178/prek/pull/2678))
10
+
11
+ ### Contributors
12
+
13
+ - @j178
14
+
15
+ ## 0.5.1
16
+
17
+ Released on 2026-09-01.
18
+
19
+ ### Enhancements
20
+
21
+ - Add `--hide-status <passed|failed|skipped>` for hook reports ([#2644](https://github.com/j178/prek/pull/2644))
22
+ - Add `prek init` for repository setup ([#2636](https://github.com/j178/prek/pull/2636))
23
+ - Apply hook `env` during environment creation ([#2650](https://github.com/j178/prek/pull/2650))
24
+ - Disable error snippets in `check-yaml` diagnostics ([#2664](https://github.com/j178/prek/pull/2664))
25
+ - Show hooks excluded by skip selectors ([#2645](https://github.com/j178/prek/pull/2645))
26
+ - Support Pixi for Conda environments ([#2667](https://github.com/j178/prek/pull/2667))
27
+ - Support `cargo-binstall` for Rust CLI dependencies ([#2658](https://github.com/j178/prek/pull/2658))
28
+ - Warn about unused keys in user settings ([#2665](https://github.com/j178/prek/pull/2665))
29
+
30
+ ### Bug fixes
31
+
32
+ - Reject unsupported YAML tags in check-yaml ([#2656](https://github.com/j178/prek/pull/2656))
33
+
34
+ ### Documentation
35
+
36
+ - Clarify local hook documentation ([#2640](https://github.com/j178/prek/pull/2640))
37
+ - Clarify pre-commit command compatibility ([#2635](https://github.com/j178/prek/pull/2635))
38
+ - Document automatic PR fixes with autofix.ci ([#2643](https://github.com/j178/prek/pull/2643))
39
+ - Document check-yaml unsafe support ([#2632](https://github.com/j178/prek/pull/2632))
40
+ - Improve setup and workflow documentation ([#2637](https://github.com/j178/prek/pull/2637))
41
+
42
+ ### Other changes
43
+
44
+ - Drop low-usage release targets ([#2651](https://github.com/j178/prek/pull/2651))
45
+ - Generate a prek manifest JSON schema ([#2648](https://github.com/j178/prek/pull/2648))
46
+
47
+ ### Contributors
48
+
49
+ - @j178
50
+
3
51
  ## 0.5.0
4
52
 
5
53
  Released on 2026-08-27.
package/README.md CHANGED
@@ -59,7 +59,7 @@ On Linux and macOS:
59
59
  <!-- --8<-- [start: linux-standalone-install] -->
60
60
 
61
61
  ```bash
62
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.5.0/prek-installer.sh | sh
62
+ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.5.2/prek-installer.sh | sh
63
63
  ```
64
64
 
65
65
  <!-- --8<-- [end: linux-standalone-install] -->
@@ -69,7 +69,7 @@ On Windows:
69
69
  <!-- --8<-- [start: windows-standalone-install] -->
70
70
 
71
71
  ```powershell
72
- powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.5.0/prek-installer.ps1 | iex"
72
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.5.2/prek-installer.ps1 | iex"
73
73
  ```
74
74
 
75
75
  <!-- --8<-- [end: windows-standalone-install] -->
package/bin/prek.js CHANGED
@@ -76,22 +76,6 @@ function isMusl() {
76
76
  return false;
77
77
  }
78
78
 
79
- function armVersion() {
80
- const version = Number(process.config.variables.arm_version ?? 0);
81
- return Number.isFinite(version) ? version : 0;
82
- }
83
-
84
- function matchesArmVersion(spec) {
85
- const version = armVersion();
86
- if (spec.armVersionMin != null && version < spec.armVersionMin) {
87
- return false;
88
- }
89
- if (spec.armVersionMax != null && version > spec.armVersionMax) {
90
- return false;
91
- }
92
- return true;
93
- }
94
-
95
79
  function currentLibc() {
96
80
  if (process.platform !== "linux") {
97
81
  return null;
@@ -102,11 +86,10 @@ function currentLibc() {
102
86
  function pickPlatformPackage() {
103
87
  const libc = currentLibc();
104
88
  debug(
105
- `selecting package for platform=${process.platform} arch=${process.arch}` +
106
- `${libc ? ` libc=${libc}` : ""} armVersion=${armVersion()}`,
89
+ `selecting package for platform=${process.platform} arch=${process.arch}${libc ? ` libc=${libc}` : ""}`,
107
90
  );
108
91
 
109
- const candidates = PLATFORMS.filter((spec) => {
92
+ const candidate = PLATFORMS.find((spec) => {
110
93
  if (!spec.os.includes(process.platform)) {
111
94
  return false;
112
95
  }
@@ -116,24 +99,17 @@ function pickPlatformPackage() {
116
99
  if (spec.libc && spec.libc !== libc) {
117
100
  return false;
118
101
  }
119
- if (!matchesArmVersion(spec)) {
120
- return false;
121
- }
122
102
  return true;
123
- }).sort((left, right) => {
124
- const leftSpecificity = left.armVersionMin ?? 0;
125
- const rightSpecificity = right.armVersionMin ?? 0;
126
- return rightSpecificity - leftSpecificity;
127
103
  });
128
104
 
129
- if (candidates.length === 0) {
105
+ if (candidate == null) {
130
106
  const libcSuffix = libc ? ` (${libc})` : "";
131
107
  throw new Error(
132
108
  `Unsupported platform: ${process.platform} ${process.arch}${libcSuffix}`,
133
109
  );
134
110
  }
135
111
 
136
- return candidates[0];
112
+ return candidate;
137
113
  }
138
114
 
139
115
  function resolvePackageJson(packageName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j178/prek",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "A fast Git hook manager written in Rust, designed as a drop-in alternative to pre-commit, reimagined.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,22 +26,14 @@
26
26
  "LICENSE"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "@j178/prek-darwin-arm64": "0.5.0",
30
- "@j178/prek-darwin-x64": "0.5.0",
31
- "@j178/prek-linux-arm64-gnu": "0.5.0",
32
- "@j178/prek-linux-arm64-musl": "0.5.0",
33
- "@j178/prek-android-arm64": "0.5.0",
34
- "@j178/prek-linux-arm-gnueabihf": "0.5.0",
35
- "@j178/prek-linux-arm-musleabihf": "0.5.0",
36
- "@j178/prek-linux-armv7-musleabihf": "0.5.0",
37
- "@j178/prek-linux-ia32-gnu": "0.5.0",
38
- "@j178/prek-linux-ia32-musl": "0.5.0",
39
- "@j178/prek-linux-riscv64-gnu": "0.5.0",
40
- "@j178/prek-linux-s390x-gnu": "0.5.0",
41
- "@j178/prek-linux-x64-gnu": "0.5.0",
42
- "@j178/prek-linux-x64-musl": "0.5.0",
43
- "@j178/prek-win32-arm64-msvc": "0.5.0",
44
- "@j178/prek-win32-ia32-msvc": "0.5.0",
45
- "@j178/prek-win32-x64-msvc": "0.5.0"
29
+ "@j178/prek-darwin-arm64": "0.5.2",
30
+ "@j178/prek-darwin-x64": "0.5.2",
31
+ "@j178/prek-linux-arm64-gnu": "0.5.2",
32
+ "@j178/prek-linux-arm64-musl": "0.5.2",
33
+ "@j178/prek-android-arm64": "0.5.2",
34
+ "@j178/prek-linux-x64-gnu": "0.5.2",
35
+ "@j178/prek-linux-x64-musl": "0.5.2",
36
+ "@j178/prek-win32-arm64-msvc": "0.5.2",
37
+ "@j178/prek-win32-x64-msvc": "0.5.2"
46
38
  }
47
39
  }
package/platforms.json CHANGED
@@ -56,92 +56,6 @@
56
56
  "arm64"
57
57
  ]
58
58
  },
59
- {
60
- "rustTarget": "armv7-unknown-linux-gnueabihf",
61
- "packageName": "@j178/prek-linux-arm-gnueabihf",
62
- "binaryName": "prek",
63
- "os": [
64
- "linux"
65
- ],
66
- "cpu": [
67
- "arm"
68
- ],
69
- "libc": "glibc",
70
- "armVersionMin": 7
71
- },
72
- {
73
- "rustTarget": "arm-unknown-linux-musleabihf",
74
- "packageName": "@j178/prek-linux-arm-musleabihf",
75
- "binaryName": "prek",
76
- "os": [
77
- "linux"
78
- ],
79
- "cpu": [
80
- "arm"
81
- ],
82
- "libc": "musl"
83
- },
84
- {
85
- "rustTarget": "armv7-unknown-linux-musleabihf",
86
- "packageName": "@j178/prek-linux-armv7-musleabihf",
87
- "binaryName": "prek",
88
- "os": [
89
- "linux"
90
- ],
91
- "cpu": [
92
- "arm"
93
- ],
94
- "libc": "musl",
95
- "armVersionMin": 7
96
- },
97
- {
98
- "rustTarget": "i686-unknown-linux-gnu",
99
- "packageName": "@j178/prek-linux-ia32-gnu",
100
- "binaryName": "prek",
101
- "os": [
102
- "linux"
103
- ],
104
- "cpu": [
105
- "ia32"
106
- ],
107
- "libc": "glibc"
108
- },
109
- {
110
- "rustTarget": "i686-unknown-linux-musl",
111
- "packageName": "@j178/prek-linux-ia32-musl",
112
- "binaryName": "prek",
113
- "os": [
114
- "linux"
115
- ],
116
- "cpu": [
117
- "ia32"
118
- ],
119
- "libc": "musl"
120
- },
121
- {
122
- "rustTarget": "riscv64gc-unknown-linux-gnu",
123
- "packageName": "@j178/prek-linux-riscv64-gnu",
124
- "binaryName": "prek",
125
- "os": [
126
- "linux"
127
- ],
128
- "cpu": [
129
- "riscv64"
130
- ],
131
- "libc": "glibc"
132
- },
133
- {
134
- "rustTarget": "s390x-unknown-linux-gnu",
135
- "packageName": "@j178/prek-linux-s390x-gnu",
136
- "binaryName": "prek",
137
- "os": [
138
- "linux"
139
- ],
140
- "cpu": [
141
- "s390x"
142
- ],
143
- "libc": "glibc"
144
- },
145
59
  {
146
60
  "rustTarget": "x86_64-unknown-linux-gnu",
147
61
  "packageName": "@j178/prek-linux-x64-gnu",
@@ -177,17 +91,6 @@
177
91
  "arm64"
178
92
  ]
179
93
  },
180
- {
181
- "rustTarget": "i686-pc-windows-msvc",
182
- "packageName": "@j178/prek-win32-ia32-msvc",
183
- "binaryName": "prek.exe",
184
- "os": [
185
- "win32"
186
- ],
187
- "cpu": [
188
- "ia32"
189
- ]
190
- },
191
94
  {
192
95
  "rustTarget": "x86_64-pc-windows-msvc",
193
96
  "packageName": "@j178/prek-win32-x64-msvc",