From 4e1b142fbd05157fd3e42fa0e3e000e38b27ef5a Mon Sep 17 00:00:00 2001 From: Gaubee Date: Mon, 22 Dec 2025 13:43:59 +0800 Subject: [PATCH 1/2] fix: use turbo for e2e:all and disable auto-open report - e2e:all now runs through turbo for caching - e2e:run is the actual playwright test command - HTML report no longer auto-opens (blocks AI workflows) --- package.json | 5 +++-- playwright.config.ts | 2 +- turbo.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3a771dcfa..7dc836e62 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "build-storybook": "storybook build", "typecheck": "tsc --build --noEmit", "e2e": "bun scripts/e2e.ts", - "e2e:all": "playwright test", + "e2e:all": "turbo run e2e:run --", + "e2e:run": "playwright test", "e2e:ui": "playwright test --ui", "e2e:headed": "playwright test --headed", "e2e:update": "playwright test --update-snapshots", @@ -41,7 +42,7 @@ "turbo:test": "turbo run test", "turbo:typecheck": "turbo run typecheck", "turbo:i18n": "turbo run i18n:check", - "turbo:e2e": "turbo run e2e:all", + "turbo:e2e": "turbo run e2e:run", "turbo:check": "turbo run typecheck test i18n:check" }, "dependencies": { diff --git a/playwright.config.ts b/playwright.config.ts index 297632f35..12b771af1 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -25,7 +25,7 @@ export default defineConfig({ workers: process.env.CI ? 1 : undefined, reporter: [ - ['html', { outputFolder: './e2e/report' }], + ['html', { outputFolder: './e2e/report', open: 'never' }], ['list'], ], diff --git a/turbo.json b/turbo.json index b20a9fab5..4dd7e44e1 100644 --- a/turbo.json +++ b/turbo.json @@ -19,7 +19,7 @@ "outputs": [], "cache": true }, - "e2e:all": { + "e2e:run": { "dependsOn": [], "inputs": ["src/**", "e2e/**", "playwright.config.ts"], "outputs": ["e2e/report/**", "e2e/test-results/**"], From aebdfdf8cdbb39d0b791f1c55429c7b5447bd7e5 Mon Sep 17 00:00:00 2001 From: Gaubee Date: Mon, 22 Dec 2025 13:47:37 +0800 Subject: [PATCH 2/2] refactor: make turbo caching default for all check commands Commands now use turbo by default: - test -> turbo run test:run - typecheck -> turbo run typecheck:run - i18n:check -> turbo run i18n:run - e2e:all -> turbo run e2e:run Added 'check' command to run all checks at once: - pnpm check = typecheck + test + i18n:check Removed turbo:* prefix commands (no longer needed) --- package.json | 15 +++++++-------- turbo.json | 12 ++++++------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 7dc836e62..7813fe2bc 100644 --- a/package.json +++ b/package.json @@ -16,14 +16,16 @@ "lint": "oxlint .", "lint:fix": "oxlint --fix .", "preview": "vite preview", - "test": "vitest run --project=unit", + "test": "turbo run test:run --", + "test:run": "vitest run --project=unit", "test:storybook": "vitest run --project=storybook", "test:all": "vitest run", "test:coverage": "vitest run --project=unit --coverage", "test:ui": "vitest run --ui", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", - "typecheck": "tsc --build --noEmit", + "typecheck": "turbo run typecheck:run --", + "typecheck:run": "tsc --build --noEmit", "e2e": "bun scripts/e2e.ts", "e2e:all": "turbo run e2e:run --", "e2e:run": "playwright test", @@ -36,14 +38,11 @@ "docs:preview": "vitepress preview docs", "gen:stable": "bun scripts/gen-stable.ts", "i18n:extract": "bun scripts/i18n-extract.ts", - "i18n:check": "bun scripts/i18n-check.ts", + "i18n:check": "turbo run i18n:run --", + "i18n:run": "bun scripts/i18n-check.ts", "i18n:validate": "bun scripts/i18n-validate.ts", "agent": "bun scripts/agent-readme.ts", - "turbo:test": "turbo run test", - "turbo:typecheck": "turbo run typecheck", - "turbo:i18n": "turbo run i18n:check", - "turbo:e2e": "turbo run e2e:run", - "turbo:check": "turbo run typecheck test i18n:check" + "check": "turbo run typecheck:run test:run i18n:run" }, "dependencies": { "@base-ui/react": "^1.0.0", diff --git a/turbo.json b/turbo.json index 4dd7e44e1..4e16655c5 100644 --- a/turbo.json +++ b/turbo.json @@ -1,19 +1,19 @@ { "$schema": "https://turbo.build/schema.json", "tasks": { - "typecheck": { + "typecheck:run": { "dependsOn": [], "inputs": ["src/**/*.ts", "src/**/*.tsx", "tsconfig*.json"], "outputs": [], "cache": true }, - "test": { + "test:run": { "dependsOn": [], "inputs": ["src/**/*.ts", "src/**/*.tsx", "vitest.config.ts"], "outputs": ["coverage/**"], "cache": true }, - "i18n:check": { + "i18n:run": { "dependsOn": [], "inputs": ["src/**/*.ts", "src/**/*.tsx", "src/i18n/**/*.json", "scripts/i18n-check.ts"], "outputs": [], @@ -26,19 +26,19 @@ "cache": true }, "build": { - "dependsOn": ["typecheck"], + "dependsOn": ["typecheck:run"], "inputs": ["src/**", "index.html", "vite.config.ts", "tsconfig*.json"], "outputs": ["dist/**"], "cache": true }, "build:web": { - "dependsOn": ["typecheck"], + "dependsOn": ["typecheck:run"], "inputs": ["src/**", "index.html", "vite.config.ts", "tsconfig*.json"], "outputs": ["dist-web/**"], "cache": true }, "build:dweb": { - "dependsOn": ["typecheck"], + "dependsOn": ["typecheck:run"], "inputs": ["src/**", "index.html", "vite.config.ts", "tsconfig*.json"], "outputs": ["dist-dweb/**"], "cache": true