-
-
Notifications
You must be signed in to change notification settings - Fork 3k
CI: git hooks, bun run ci, turbo cache, cli-smoke heap cap #985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
| # Biome on staged files, the same check `bun run check` runs in CI. | ||
| # Installed by `bun install` (core.hooksPath). Skip once with --no-verify. | ||
| set -euo pipefail | ||
| files=() | ||
| while IFS= read -r file; do files+=("$file"); done < <( | ||
| git diff --cached --name-only --diff-filter=ACMR | | ||
| grep -E '\.(ts|tsx|js|jsx|mjs|cjs|json|jsonc|css|md|mdx)$' || true | ||
| ) | ||
| [ ${#files[@]} -eq 0 ] && exit 0 | ||
| bun run --silent check --no-errors-on-unmatched --diagnostic-level=error --write "${files[@]}" | ||
| git add -- "${files[@]}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/usr/bin/env bash | ||
| # Fast local mirror of the CI quality job for what this branch changes. | ||
| # Full parity: `bun run ci`. Skip once with `git push --no-verify`. | ||
| set -euo pipefail | ||
|
|
||
| base=$(git merge-base HEAD origin/main 2>/dev/null || echo origin/main) | ||
| changed=$(git diff --name-only "$base" HEAD) | ||
|
|
||
| if echo "$changed" | grep -qE '(^|/)package\.json$|^bun\.lock$'; then | ||
| echo "pre-push: checking bun.lock is in sync" | ||
| if ! bun install --frozen-lockfile --dry-run >/dev/null 2>&1; then | ||
| echo "pre-push: bun.lock is out of date. Run \`bun install\` and commit bun.lock." >&2 | ||
| exit 1 | ||
| fi | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lockfile check sees working treeMedium Severity The lockfile gate runs Reviewed by Cursor Bugbot for commit 55f8f71. Configure here. |
||
| fi | ||
|
|
||
| echo "pre-push: lint" | ||
| bun run --silent check | ||
|
|
||
| echo "pre-push: typecheck and test changed packages" | ||
| bun run --silent ci:changed --filter="...[$base]" | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-commit restages unstaged edits
Low Severity
After Biome
--write, the hookgit adds every staged path it selected. Unstaged hunks in those same files, including leftover WIP or secrets, get pulled into the commit along with the formatter fixes.Reviewed by Cursor Bugbot for commit 55f8f71. Configure here.