Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
# Pre-commit gate:
# 1. lint-staged — biome check/format on staged files only
# 2. fast unit tests — node:test against the built CLI
# 2. unit tests — node:test against a freshly built CLI
#
# Skip with `git commit --no-verify` only when truly necessary; the gate is
# cheap (lint=<1s, tests<10s on a clean tree) so the bypass should be rare.
Expand All @@ -11,5 +11,7 @@ set -e
# 1. Lint + format staged files
npx --no-install lint-staged

# 2. Fast unit tests. Build first so dist/ matches src/.
npm run test:fast --silent 2>&1 | tail -20
# 2. Unit tests. `npm test` rebuilds dist/ first so it matches src/ — without
# the rebuild, test:fast runs against a stale build and can pass-or-fail on
# code that isn't what's being committed.
npm test --silent 2>&1 | tail -20
Loading