Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions apps/blade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"with-env": "dotenv -e ../../.env --",
"analyze:react": "tsx ../../scripts/analyze-react.ts src",
"analyze:react:changed": "tsx ../../scripts/analyze-react-changed.ts",
"test": "pnpm with-env vitest run --passWithNoTests",
"test:watch": "pnpm with-env vitest --passWithNoTests",
"test": "NODE_ENV=test pnpm with-env vitest run --passWithNoTests",
"test:watch": "NODE_ENV=test pnpm with-env vitest --passWithNoTests",
"e2e": "BLADE_E2E_AUTH=true NEXT_PUBLIC_BLADE_E2E_AUTH=true BLADE_E2E_DEFAULT_USER_ID=00000000-0000-4000-8000-000000000101 pnpm with-env playwright test --pass-with-no-tests"
},
"dependencies": {
Expand Down
9 changes: 8 additions & 1 deletion apps/blade/src/tests/events/event-detail-dialog.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ReactNode } from "react";
import { createElement } from "react";
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it, vi } from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

import { EventDetailDialog } from "~/app/_components/admin/events/event-detail-dialog";

Expand Down Expand Up @@ -83,6 +83,13 @@ const detail = {
};

describe("EventDetailDialog", () => {
beforeEach(() => {
vi.useFakeTimers();
vi.setSystemTime(new Date("2026-08-12T23:00:00.000Z"));
});

afterEach(() => vi.useRealTimers());

it("TC-007 TC-023 renders one sectioned read-only hierarchy", () => {
const html = renderToStaticMarkup(
createElement(EventDetailDialog, {
Expand Down
40 changes: 21 additions & 19 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
# Local quality gates.
#
# These hooks mirror the CI jobs so contributors catch failures before pushing.
# Keep commit-time work quick and limited to staged files. Broader validation
# remains available through the package scripts and CI rather than a push hook.
#
# The split matters: a pre-commit hook that runs the whole gate gets slow, people
# learn `--no-verify`, and the hook becomes decoration. Commit-time work is
# formatting only and touches staged files; the real gate runs once per push.
#
# Escape hatches: `git commit --no-verify`, or `LEFTHOOK=0 git push` to skip
# everything. Use them when you mean to, not by habit.
# Escape hatch: `git commit --no-verify`. Use it when you mean to, not by habit.

pre-commit:
parallel: true
parallel: false
jobs:
- name: format staged files
glob: "*.{ts,tsx,js,jsx,cjs,mjs,json,md,css,yml,yaml}"
run: npx prettier --write {staged_files}
glob: "*.{ts,tsx,js,jsx,cjs,mjs,json,md,css,yml,yaml,md}"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
run: pnpm exec prettier --write "{staged_files}"
stage_fixed: true

pre-push:
parallel: false
jobs:
# The same commands as CI's format, lint, and typecheck jobs.
- name: verify
run: pnpm verify:push
- name: lint staged files
glob: "*.{ts,tsx,js,jsx,cjs,mjs}"
run: pnpm exec eslint "{staged_files}"

- name: typecheck staged files
glob: "*.{ts,tsx,cts,mts}"
run: |
filters=$(
git diff --cached --name-only --diff-filter=ACMRD |
sed -nE 's#^((apps|packages|tooling)/[^/]+)/.*#--filter=./\1#p' |
sort -u
)

# CI runs this as its own job; keep the local push gate aligned with it.
- name: test
run: pnpm test
if [ -n "$filters" ]; then
pnpm exec turbo run typecheck $filters
fi
Comment thread
alexanderpaolini marked this conversation as resolved.
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
"test": "pnpm with-env vitest run --passWithNoTests",
"test:watch": "pnpm with-env vitest --passWithNoTests",
"test": "NODE_ENV=test pnpm with-env vitest run --passWithNoTests",
"test:watch": "NODE_ENV=test pnpm with-env vitest --passWithNoTests",
"with-env": "dotenv -e ../../.env --"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"studio": "pnpm with-env drizzle-kit studio",
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
"with-env": "dotenv -e ../../.env --",
"test": "pnpm with-env vitest run --passWithNoTests",
"test:watch": "pnpm with-env vitest --passWithNoTests"
"test": "NODE_ENV=test pnpm with-env vitest run --passWithNoTests",
"test:watch": "NODE_ENV=test pnpm with-env vitest --passWithNoTests"
},
"dependencies": {
"@forge/consts": "workspace:*",
Expand Down
Loading