Skip to content

Commit a1dc856

Browse files
t3dotggclaude
andauthored
build: upgrade Vite+ to 1.3 and cache typecheck (#22716)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent d0e427d commit a1dc856

13 files changed

Lines changed: 797 additions & 869 deletions

‎apps/desktop/package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"scripts": {
88
"ensure:electron": "node scripts/ensure-electron-runtime.mjs",
99
"start": "node scripts/start-electron.mjs",
10-
"typecheck": "tsc-rs --noEmit",
1110
"test": "vp test run --passWithNoTests",
1211
"smoke-test": "node scripts/smoke-test.mjs"
1312
},

‎apps/desktop/vite.config.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ export default defineConfig({
4343
dependsOn: ["t3#build"],
4444
cache: false,
4545
},
46+
// tsc-rs rewrites the tsbuildinfo it reads, which keeps a task out of the cache.
47+
typecheck: {
48+
command: "tsc-rs --noEmit",
49+
cache: { input: [{ auto: true }, "!*.tsbuildinfo"] },
50+
},
4651
},
4752
},
4853
pack: [

‎apps/marketing/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"stage:install-scripts": "node scripts/stage-install-scripts.mjs",
88
"dev": "node scripts/stage-install-scripts.mjs && astro dev",
99
"build": "node scripts/stage-install-scripts.mjs && astro build",
10-
"preview": "astro preview",
11-
"typecheck": "astro check"
10+
"preview": "astro preview"
1211
},
1312
"dependencies": {
1413
"@t3tools/shared": "workspace:*",

‎apps/marketing/vite.config.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineConfig } from "vite-plus";
2+
3+
// Astro reads astro.config.mjs. This file only configures `vp run` tasks.
4+
export default defineConfig({
5+
run: {
6+
tasks: {
7+
// `astro check` regenerates .astro/*.d.ts and then reads them, which
8+
// keeps a task out of the cache. Its real inputs are tracked as usual.
9+
typecheck: {
10+
command: "astro check",
11+
cache: { input: [{ auto: true }, "!.astro/**"] },
12+
},
13+
},
14+
},
15+
});

‎apps/web/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"dev": "vp dev",
99
"build": "vp build",
1010
"preview": "vp preview",
11-
"typecheck": "tsc-rs --noEmit",
1211
"test": "vp test run --passWithNoTests --project unit --project browser"
1312
},
1413
"dependencies": {
@@ -92,7 +91,7 @@
9291
"@types/use-sync-external-store": "^0.0.6",
9392
"@vercel/config": "^0.3.0",
9493
"@vitejs/plugin-react": "^6.1.2",
95-
"@vitest/browser-playwright": "5.0.1",
94+
"@vitest/browser-playwright": "5.0.5",
9695
"compression": "^1.8.2",
9796
"oxc-transform-react": "~0.152.0",
9897
"playwright": "1.60.0",

‎apps/web/vite.config.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ const allowedHosts = [".ts.net", ...configuredAllowedHosts];
181181

182182
export default defineConfig(() => {
183183
return {
184+
run: {
185+
tasks: {
186+
// tsc-rs rewrites the tsbuildinfo it reads, which keeps a task out of the cache.
187+
typecheck: {
188+
command: "tsc-rs --noEmit",
189+
cache: { input: [{ auto: true }, "!*.tsbuildinfo"] },
190+
},
191+
},
192+
},
184193
assetsInclude: ["**/*.wasm"],
185194
plugins: [
186195
devCompressionPlugin(),

‎docs/orchestration-v2/core-graph-and-data-model.md‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,13 @@ type RunAttempt = {
231231
providerTurnId: ProviderTurnId | null;
232232
reason: "initial" | "steering_restart" | "retry" | "provider_recovery";
233233
status:
234-
"pending" | "running" | "completed" | "interrupted" | "failed" | "cancelled" | "superseded";
234+
| "pending"
235+
| "running"
236+
| "completed"
237+
| "interrupted"
238+
| "failed"
239+
| "cancelled"
240+
| "superseded";
235241
startedAt: string | null;
236242
completedAt: string | null;
237243
};
@@ -374,7 +380,12 @@ type ContextTransfer = {
374380
sourceProvider: ProviderKind | null;
375381
targetProvider: ProviderKind | null;
376382
status:
377-
"pending" | "resolved_native" | "resolved_portable" | "failed" | "consumed" | "superseded";
383+
| "pending"
384+
| "resolved_native"
385+
| "resolved_portable"
386+
| "failed"
387+
| "consumed"
388+
| "superseded";
378389
resolution: ContextTransferResolution | null;
379390
createdBy: "user" | "agent" | "system";
380391
createdAt: string;
@@ -468,7 +479,12 @@ type RuntimeRequest = {
468479
providerTurnId: ProviderTurnId | null;
469480
nativeRequestRef: string | null;
470481
kind:
471-
"command" | "file-read" | "file-change" | "dynamic_tool_call" | "user_input" | "auth_refresh";
482+
| "command"
483+
| "file-read"
484+
| "file-change"
485+
| "dynamic_tool_call"
486+
| "user_input"
487+
| "auth_refresh";
472488
status: "pending" | "resolved" | "expired" | "cancelled";
473489
responseCapability:
474490
| { type: "live"; providerSessionId: ProviderSessionId }

‎docs/orchestration-v2/thread-lineage-and-context-transfer.md‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ Thread relationship describes why a target thread or run exists relative to anot
7979

8080
```ts
8181
type ThreadRelationshipKind =
82-
"fork" | "provider_handoff" | "merge_back" | "subagent_spawn" | "subagent_result";
82+
| "fork"
83+
| "provider_handoff"
84+
| "merge_back"
85+
| "subagent_spawn"
86+
| "subagent_result";
8387
```
8488

8589
Relationships are product-level and provider-neutral. A fork is not the same thing as a provider-native fork. A provider-native fork is one possible resolution strategy for a fork relationship.
@@ -116,7 +120,12 @@ type ContextTransfer = {
116120
sourceProvider?: ProviderKind;
117121
targetProvider?: ProviderKind;
118122
status:
119-
"pending" | "resolved_native" | "resolved_portable" | "failed" | "consumed" | "superseded";
123+
| "pending"
124+
| "resolved_native"
125+
| "resolved_portable"
126+
| "failed"
127+
| "consumed"
128+
| "superseded";
120129
resolution?: ContextTransferResolution;
121130
createdBy: "user" | "agent" | "system";
122131
createdAt: string;

‎knip.jsonc‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
// reports an entire component module when nothing imports it.
8787
"ignoreIssues": { "src/components/ui/*.tsx": ["exports", "nsExports", "duplicates"] },
8888
},
89+
"apps/marketing": {
90+
// `astro check` runs from the typecheck task in vite.config.ts, which knip does not read.
91+
"ignoreDependencies": ["@astrojs/check"],
92+
},
8993
"apps/mobile": {
9094
// Expo loads plugins and the fingerprint config by string; Metro embeds the browser entry in the native WebView.
9195
"entry": [

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"build:marketing": "vp run --filter @t3tools/marketing build",
2525
"build:desktop": "vp run --filter @t3tools/desktop --filter t3 build",
2626
"build:resource-monitor": "cargo build --locked --release --manifest-path native/resource-monitor/Cargo.toml",
27-
"typecheck": "vp run -r --concurrency-limit 2 typecheck",
28-
"tc": "vp run -r --concurrency-limit 2 typecheck",
27+
"typecheck": "vp run -r --cache --concurrency-limit 4 typecheck",
28+
"tc": "vp run -r --cache --concurrency-limit 4 typecheck",
2929
"lint": "vp lint --report-unused-disable-directives",
3030
"knip": "knip --preprocessor ./scripts/knip-schemas.ts",
3131
"knip:check": "knip --include files,dependencies --no-config-hints && knip --workspace apps/server --workspace apps/desktop --workspace apps/web --workspace packages/client-runtime --workspace packages/contracts --workspace packages/effect-acp --workspace packages/effect-codex-app-server --workspace packages/shared --workspace packages/ssh --workspace packages/tailscale --workspace packages/provider-core --workspace packages/provider-acp --workspace packages/provider-acp-registry --workspace packages/provider-testing --workspace packages/provider-pi --workspace packages/provider-muse --workspace packages/provider-opencode --workspace packages/provider-cursor --workspace packages/provider-grok --workspace packages/source-control-core --workspace packages/source-control-azure-devops --workspace packages/source-control-bitbucket --workspace packages/source-control-forgejo --workspace packages/source-control-gitcafe --workspace packages/source-control-github --workspace packages/source-control-gitlab --workspace packages/source-control-testing --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints",

0 commit comments

Comments
 (0)