Skip to content

Commit 4040867

Browse files
t3dotggclaude
andauthored
chore(typecheck): typescript is the tsc-rs drop-in, no effect-tsgo patch (pingdotgg#23023)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 3b95e78 commit 4040867

37 files changed

Lines changed: 478 additions & 898 deletions

File tree

‎.pnpmfile.cjs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
// Release scripts stage their own installs with explicit architectures.
66
module.exports = {
77
hooks: {
8+
// `typescript` is @tsc-rs/typescript (the catalog entry). Its npm version (0.8.x) is outside
9+
// vite-plus-core's typescript peer range, so pnpm gave the vite-plus that @effect/vitest
10+
// imports apps/marketing's [email protected] instead, and tests loaded a second vitest.
11+
readPackage(pkg) {
12+
if (pkg.name === "@voidzero-dev/vite-plus-core" && pkg.peerDependencies?.typescript) {
13+
pkg.peerDependencies.typescript = "*";
14+
}
15+
return pkg;
16+
},
817
updateConfig(config) {
918
// oxlint-disable-next-line t3code/no-global-process-runtime -- pnpm loads this file before any Effect runtime exists.
1019
if (process.platform !== "win32") return config;

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ An empty database is a bad test. Seed your worktree's `.t3` with a copy of real
100100

101101
- Before you push, run `vp run check:changed`. It runs CI's fast checks for changed files: format, lint, knip, typecheck of affected packages and dependents, and tests beside changes. CI still runs the full test suites.
102102
- While you iterate, run `vp test run <files>`. For big files, add `-t "<name>"`.
103-
- Do not use `npx tsc`. Use `vp run typecheck`; it uses tsc-rs, which is 3x faster.
103+
- Use `vp run typecheck`, not `npx tsc`; it caches per package. Both run tsc-rs (`typescript` is the `@tsc-rs/typescript` drop-in).
104104
- Run `node -e` snippets from `apps/server` or the owning package. `effect` does not resolve from the repo root.
105105
- Test meaningful logic or observable behavior. Do not render components to static markup to assert props or attributes, or add tests that merely assert callback wiring or mirror the implementation.
106106
- **Do not run repo-wide checks.** No `vp check`, no `vp run -r test`, no `vp run -r typecheck` unless I ask. CI owns the full suite.

‎apps/desktop/vite.config.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ 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.
46+
// tsc (tsc-rs) rewrites the tsbuildinfo it reads, which keeps a task out of the cache.
4747
typecheck: {
48-
command: "tsc-rs --noEmit",
48+
command: "tsc --noEmit",
4949
cache: { input: [{ auto: true }, "!*.tsbuildinfo"] },
5050
},
5151
},

‎apps/mobile/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"measure-renders": "node scripts/measure-renders.mts",
4646
"generate": "node --disable-warning=MODULE_TYPELESS_PACKAGE_JSON scripts/generate-uniwind-themes.mts",
4747
"test": "vp test run --project unit --project react",
48-
"typecheck": "tsc-rs --noEmit"
48+
"typecheck": "tsc --noEmit"
4949
},
5050
"dependencies": {
5151
"@clerk/expo": "catalog:",

‎apps/server/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"build:bundle": "vp pack",
2121
"build:exe": "node scripts/cli.ts build-exe",
2222
"start": "node dist/bin.mjs",
23-
"typecheck": "tsc-rs --noEmit",
23+
"typecheck": "tsc --noEmit",
2424
"test": "vp test run",
2525
"record:codex-replay": "bun scripts/record-codex-app-server-replay-fixture.ts",
2626
"record:claude-replay": "bun scripts/record-claude-agent-sdk-replay-fixture.ts",

‎apps/web/vite.config.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ export default defineConfig(() => {
190190
return {
191191
run: {
192192
tasks: {
193-
// tsc-rs rewrites the tsbuildinfo it reads, which keeps a task out of the cache.
193+
// tsc (tsc-rs) rewrites the tsbuildinfo it reads, which keeps a task out of the cache.
194194
typecheck: {
195-
command: "tsc-rs --noEmit",
195+
command: "tsc --noEmit",
196196
cache: { input: [{ auto: true }, "!*.tsbuildinfo"] },
197197
},
198198
},

‎docs/operations/development.md‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,9 @@ In `apps/web`, a test that renders React or touches the DOM is named `*.browser.
129129
and runs in headless Chromium with the React Compiler on, like the app. There is no jsdom; other
130130
`*.test.ts` files run in Node.
131131

132-
TypeScript workspaces typecheck with tsc-rs, which has Effect diagnostics built in.
133-
Keep `typescript`, `@effect/tsgo`, and the `effect-tsgo patch` prepare step: editors
134-
still use them for Effect quick fixes and refactors. Keep `@effect/tsgo` on the
135-
effect-tsgo version that tsc-rs ports (see the tsc-rs README), or the two disagree
136-
on rule names.
132+
TypeScript workspaces typecheck with `tsc`. The `typescript` catalog entry is
133+
`@tsc-rs/typescript`, the tsc-rs drop-in, with Effect diagnostics, quick fixes, and
134+
refactors built in. VS Code uses it through `js/ts.tsdk.path` in `.vscode/settings.json`.
137135
Marketing keeps `astro check` for Astro files.
138136

139137
Use `vp run lint:mobile` for native mobile changes. CI owns the full suite; see

‎infra/relay/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"tunnels:census": "node scripts/tunnel-census.ts",
1010
"destroy": "alchemy destroy",
1111
"test": "vp test run --config ../../vite.config.ts --dir .",
12-
"typecheck": "tsc-rs --noEmit"
12+
"typecheck": "tsc --noEmit"
1313
},
1414
"dependencies": {
1515
"@clerk/backend": "catalog:",

‎oxlint-plugin-t3code/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"typecheck": "tsc-rs --noEmit",
6+
"typecheck": "tsc --noEmit",
77
"test": "vp test run --config ../vite.config.ts --dir ."
88
},
99
"dependencies": {

‎package.json‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"prepare": "effect-tsgo patch && vp config --no-agent",
6+
"prepare": "vp config --no-agent",
77
"dev": "node scripts/dev-runner.ts dev",
88
"dev:share": "node scripts/dev-runner.ts dev --share",
99
"dev:server": "node scripts/dev-runner.ts dev:server",
@@ -53,11 +53,9 @@
5353
},
5454
"devDependencies": {
5555
"@coderabbitai/config": "1.1.0",
56-
"@effect/tsgo": "catalog:",
5756
"@shadcn/lint": "0.1.5",
5857
"@types/node": "catalog:",
5958
"knip": "6.34.0",
60-
"tsc-rs": "0.7.0",
6159
"typescript": "catalog:",
6260
"vite-plus": "catalog:"
6361
},

0 commit comments

Comments
 (0)