Files
initiative/lefthook.yml
T
LukasandClaude Opus 5 2e4865d5fc
CI / check (push) Successful in 2m46s
CI / build-image (push) Successful in 47s
Upgrade Knip back to 6, with raw transfer disabled
Knip 5 is effectively frozen: 5.88.1 (2026-03-19) was its last release,
with only three patches after 6.0.0 shipped and none since.

The reason for the earlier downgrade (968cc72) was misdiagnosed. The 6 GiB
allocation is not the Rust-side arena tracked in oxc-project/oxc#20513, but
a JS-side `new ArrayBuffer(BLOCK_SIZE + BLOCK_ALIGN)` in oxc-parser's
raw-transfer path, allocated by V8. Linux refuses it under heuristic
overcommit on the CI runner (3.7 GB RAM, no swap). The upstream allocator
work that has landed does not touch this path, so waiting on it would not
have helped.

Set KNIP_DISABLE_RAW_TRANSFER=1 in the `knip` script instead, and route
lefthook and `check` through the script rather than the bare binary — the
default path would otherwise crash with an opaque RangeError. Raw transfer
is worth ~5% on a repo this size (3.1s vs 3.15s); the upstream 2-4x figure
applies to large codebases. Knip 6 is still ~20% faster than 5 overall.

No change in unused-code detection. Verified under overcommit_memory=0 on
Linux as well as locally.

Closes #11

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 17:24:20 +02:00

34 lines
1.1 KiB
YAML

pre-commit:
parallel: true
jobs:
- name: audit
run: pnpm audit --audit-level=high
# Must go through the npm script, not `pnpm exec knip`: the script sets
# KNIP_DISABLE_RAW_TRANSFER=1. Knip 6's default oxc-parser raw-transfer path
# allocates a 6 GiB ArrayBuffer, which Linux refuses under heuristic
# overcommit on the CI runner (3.7 GB RAM, no swap). See issue #11.
- name: knip
run: pnpm knip
- name: biome
run: pnpm exec biome check .
- name: check-ignores
run: node scripts/check-lint-ignores.mjs
- name: check-classnames
run: node scripts/check-cn-classnames.mjs
- name: check-props
run: node scripts/check-component-props.mjs
- name: jscpd
run: pnpm jscpd
- name: jsinspect
run: pnpm jsinspect
- name: typecheck-oxlint-test
group:
piped: true
jobs:
- name: typecheck
run: pnpm exec tsc --build
- name: oxlint
run: pnpm oxlint
- name: test
run: pnpm vitest run --reporter=dot --coverage.reporter=text-summary