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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ repos:
hooks:
- id: studio-typecheck
name: Run UI typecheck
entry: bash -c '[ -n "$CI" ] && exit 0; command -v pnpm >/dev/null 2>&1 || { echo "pnpm not installed, skipping typecheck (see web/README.md for setup)"; exit 0; }; cd web && pnpm --filter="...[origin/main]" run --parallel --if-present typecheck:go'
entry: bash -c '[ -n "$CI" ] && exit 0; command -v pnpm >/dev/null 2>&1 || { echo "pnpm not installed, skipping typecheck (see web/README.md for setup)"; exit 0; }; cd web && pnpm --filter="...[origin/main]" run --parallel --if-present typecheck'
Comment thread
coderabbitai[bot] marked this conversation as resolved.
language: system
files: ^web/
pass_filenames: false
Expand Down
4 changes: 2 additions & 2 deletions web/.agents/skills/test-coverage-improvement/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ disable-model-invocation: true

1. If the user named a package, use it (e.g. `studio`, `common`, `sdk`).
2. Otherwise infer from open files or cwd under `web/packages/`.
3. Read **`package.json`**: **`name`**, **`test`**, **`test:ci`**, **`typecheck`**, **`typecheck:go`** (if present), **`lint`** / **`lint:fix`** (if present).
3. Read **`package.json`**: **`name`**, **`test`**, **`test:ci`**, **`typecheck`**, **`lint`** / **`lint:fix`** (if present).
4. Read Vitest config (**`vite.config.ts`** / **`vitest.config.ts`**) → **`test.coverage`**: **`reportsDirectory`**, **`include` / `exclude`**.

If there is **no** coverage tooling, add **`--coverage`** + reporters on the CLI for baseline, or build the shortlist without JSON (search + file importance only).
Expand Down Expand Up @@ -78,7 +78,7 @@ If the file is **untestable without refactor**, add a **short skip note** in the
### 3d. Verify before next file

1. `pnpm vitest --run path/to/File.test.ts` (and any related specs) until **exit 0**.
2. **`pnpm typecheck`**; **`pnpm typecheck:go`** if defined. Fix TypeScript issues (TanStack context, SDK types, etc.).
2. **`pnpm typecheck`**. Fix TypeScript issues (TanStack context, SDK types, etc.).
3. Optionally re-run coverage for the package and note improvement for that file.

Keep a **running list** of every file path you **create or edit** during §3 (new **`*.test.*`**, and any production files you touch). You will pass that list to eslint in §4.
Expand Down
4 changes: 2 additions & 2 deletions web/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Runs type checking across all packages before pushing to remote.

**What it does:**

- Executes `pnpm run --recursive --parallel typecheck:go`
- Uses the [TypeScript native port](https://devblogs.microsoft.com/typescript/typescript-native-port/) for improved performance
- From `web/`, executes `pnpm --filter="...[origin/main]" run --parallel --if-present typecheck`
- Runs the native TypeScript 7 compiler (`tsc`), matching CI
- Prevents pushing code with type errors

**Bypass if needed:**
Expand Down
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"lint-staged": "^16.4.0",
"prettier": "^3.6.2",
"tsx": "catalog:",
"typescript": "npm:@typescript/typescript6@6.0.2",
"typescript-eslint": "^8.59.0"
},
"engines": {
Expand Down
4 changes: 1 addition & 3 deletions web/packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"test:ci": "vitest run --coverage",
"test:watch": "vitest watch",
"test:once": "vitest --run",
"typecheck": "tsc --noEmit",
"typecheck:go": "tsgo --noEmit"
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"@nemo/sdk": "workspace:*",
Expand Down Expand Up @@ -50,7 +49,6 @@
"@types/papaparse": "^5.3.16",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@typescript/native-preview": "catalog:",
"@vitejs/plugin-react": "catalog:",
"@vitest/coverage-v8": "catalog:",
"happy-dom": "catalog:",
Expand Down
2 changes: 0 additions & 2 deletions web/packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
"lint": "eslint . --max-warnings 0",
"lint:fix": "eslint . --fix",
"typecheck": "tsc --noEmit --noErrorTruncation",
"typecheck:go": "tsgo --noEmit --noErrorTruncation",
"sortEnv": "tsx ./src/sortEnv.ts "
},
"devDependencies": {
"@types/node": "catalog:",
"@types/yargs": "^17.0.33",
"@typescript/native-preview": "catalog:",
"knip": "^6.6.2",
"prettier": "^3.2.5",
"typescript": "catalog:",
Expand Down
2 changes: 0 additions & 2 deletions web/packages/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"test:e2e:record": "RECORD=1 playwright test --grep @record",
"test:ci": "NODE_OPTIONS=--max-old-space-size=10240 CI=true vitest --run --coverage --reporter=junit --reporter=default",
"typecheck": "tsc --noEmit --noErrorTruncation",
"typecheck:go": "tsgo --noEmit --noErrorTruncation",
"bundle-visualize": "pnpm exec vite-bundle-visualizer -c vite.config.ts",
"update-warning-count": "pnpm tsx ../common/scripts/update-max-warnings.ts",
"screenshots": "tsx screenshots/capture.ts",
Expand Down Expand Up @@ -111,7 +110,6 @@
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@types/seedrandom": "^3.0.8",
"@typescript/native-preview": "catalog:",
"@vitest/coverage-v8": "catalog:",
"@vitest/ui": "catalog:",
"blob-polyfill": "^9.0.20240710",
Expand Down
4 changes: 1 addition & 3 deletions web/packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit",
"typecheck:go": "tsgo --noEmit"
"typecheck": "tsc --noEmit"
},
"exports": {
"./*": "./src/*.ts"
Expand All @@ -15,7 +14,6 @@
"@testing-library/jest-dom": "catalog:",
"@testing-library/react": "catalog:",
"@types/react-dom": "catalog:",
"@typescript/native-preview": "catalog:",
"happy-dom": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:",
Expand Down
Loading