@taraxvoid/voidflow 0.13.0-next → 0.13.0-next.1
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/README.md +22 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -220,10 +220,30 @@ site's own `lefthook.yml` can add commands (for example image compression) but
|
|
|
220
220
|
cannot override ones defined here. Differences go through `package.json`
|
|
221
221
|
scripts: define `test:unit:precommit` (for example excluding tests that need a
|
|
222
222
|
built `dist/`) and the pre-commit unit step runs it instead of `test:unit`.
|
|
223
|
+
Likewise, define `check:precommit` and the typecheck step runs it instead of
|
|
224
|
+
`check`. CI keeps calling the full scripts, so these only narrow what runs
|
|
225
|
+
locally. Common uses:
|
|
226
|
+
|
|
227
|
+
- bun: `"test:unit:precommit": "bun test --changed"` runs only the test files
|
|
228
|
+
whose imports reach an uncommitted change.
|
|
229
|
+
- pnpm workspace: `pnpm -r --filter '...[HEAD]' run <script>` runs only the
|
|
230
|
+
changed packages and their dependents. Fall back to the full run when a
|
|
231
|
+
root-level file (lockfile, shared tsconfig) changed, since those don't
|
|
232
|
+
belong to any package. If the root `package.json` defines the same script
|
|
233
|
+
as a recursive run, add `--filter '!{.}'` so it doesn't recurse.
|
|
223
234
|
|
|
224
235
|
Install the binary through mise (`lefthook = "<version>"` in `mise.toml`) and
|
|
225
|
-
set `
|
|
226
|
-
|
|
236
|
+
set the `prepare` script so `bun install` wires the hooks, but make it tolerate a
|
|
237
|
+
missing binary:
|
|
238
|
+
|
|
239
|
+
```json
|
|
240
|
+
"prepare": "lefthook install || echo 'lefthook not installed (run mise install); git hooks skipped'"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
A bare `lefthook install` fails the whole install step (exit 127) on any runner
|
|
244
|
+
without the `lefthook` binary, which includes GitHub-hosted and self-hosted CI
|
|
245
|
+
images, and CI never runs git hooks anyway. `ref` cannot be a commit SHA; pin a
|
|
246
|
+
release tag.
|
|
227
247
|
|
|
228
248
|
## Branch rulesets as code
|
|
229
249
|
|