Repository navigation
Expand file tree
/
Copy pathtsconfig.playwright.json
More file actions
65 lines (65 loc) · 3.74 KB
/
Copy pathtsconfig.playwright.json
File metadata and controls
65 lines (65 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
// Program for the E2E / integration specs under `tests/`.
//
// ⚠️ IT WAS NEVER RUN BY ANYTHING, and that was not an oversight about
// wiring — it could not run. `extends` brings the app program's settings,
// and with no `references` the 2000+ `../../../server/…` imports in
// `tests/**` were compiled AS SOURCE, so a single non-composite pass tried
// to hold the whole server tree plus the app tree plus every spec. Measured:
// 2 minutes to a heap OOM at the default ~4 GB limit. A program that dies is
// indistinguishable from a program nobody added to CI, and a real TS1005
// syntax error sat in `tests/e2e/core.integration.spec.ts` behind it.
//
// Now it REFERENCES the api project and consumes the `.d.ts` that project
// already emits — the same change that fixed `tsconfig.tests-typecheck.json`
// (238s → 7s) and the app pass before it. `app/**` and `workers/**` stay
// source-compiled: only ~20 test files import from them, against ~2045 that
// import from `server/`.
//
// ⚠️ `references` is NOT inherited through `extends`, and `tsc -p` does NOT
// build referenced projects — it expects their output to exist and fails
// TS6305 when it does not. `npm run type-check:e2e` therefore runs
// `tsc -b tsconfig.api.json` first. Do not invoke this config directly.
"extends": "./tsconfig.json",
"references": [{ "path": "./tsconfig.api.json" }],
"compilerOptions": {
"types": ["@types/node"],
"noEmit": true,
"incremental": true,
// Its own build-info file. Sharing one with the app program makes each
// run look cold to the other, which is how a 20s check becomes a 6-minute
// one with nothing in the diff to explain it.
"tsBuildInfoFile": "./.tsbuildinfo.playwright"
//
// ⚠️ MEASURED FOOTPRINT, and why `type-check:e2e` caps the heap at 2048
// rather than the 8192 its siblings use. With the reference in place this
// program needs between 256 MB (OOMs) and 512 MB (passes, 6s cold); it
// also passes on Node's DEFAULT heap, which is the exact condition that
// used to kill it. An 8 GB cap would be 16x the need — and it would let a
// regression HIDE: drop the `references` line or widen `include` back to
// `tests/**` and the program silently eats gigabytes and slows to minutes
// instead of failing. A tight cap makes that regression loud.
},
// ⚠️ SCOPED TO tests/e2e, not all of tests/**, and the difference is a
// decision rather than a name. Widened to the whole test tree this program
// reports HUNDREDS of pre-existing errors in `tests/unit/**` — missing
// Cloudflare globals, a better-sqlite3 handle passed where a D1 one is
// typed, drizzle insert shapes. None of that is checked by anything today
// (vitest strips types with esbuild), so it is real debt, but it is a
// cleanup and not this gate. Turning it all on at once would mean either a
// red gate nobody can land against or a suppression list, and a suppressed
// gate is the state this config was already in.
"include": [
"worker-configuration.d.ts",
"tests/e2e/**/*",
// The user-guide capture scripts. Named explicitly rather than by
// widening to `tests/**` — that is the change the comment above forbids,
// and this directory carries none of the debt that makes it expensive.
// It is here at all because a file no program includes is a file that
// type-checks vacuously forever while git and the runner both insist it
// exists.
"tests/docs-shots/**/*",
"playwright*.config.ts"
],
"exclude": ["node_modules", "dist", ".types"]
}