-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtsconfig.dev.json
More file actions
82 lines (78 loc) · 4.14 KB
/
Copy pathtsconfig.dev.json
File metadata and controls
82 lines (78 loc) · 4.14 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"extends": "./tsconfig.json",
"compilerOptions": {
// Dev-only types — makes Bun globals (`Bun`, `bun:test`, …) and Node
// globals (`process`, `Buffer`, `node:*`) visible to the IDE / local
// typecheck. NOT inherited into the build output: see `tsconfig.json`
// which emits `.d.ts` without any of these baked in.
"types": ["bun", "node"],
"lib": ["ES2022", "DOM"],
"rootDir": "."
},
"include": [
"src/**/*.ts",
"tests/**/*.ts",
"benchmarks/**/*.ts",
"examples/**/*.ts"
],
// Everything below `node_modules` / `dist` is excluded for the obvious
// reason. The rest is one rule, applied narrowly (#540):
//
// A file is excluded when its imports are resolved by a manifest OTHER
// than the root `package.json`.
//
// That is not a burn-down shortcut — it is the only correct scope. The
// root install is deliberately tiny (two runtime deps; every backend is
// an optional peer), so a file whose dependencies come from a different
// manifest can never resolve here no matter how much of it is fixed, and
// a config that is permanently red cannot gate anything. Each entry
// below names the manifest that DOES own it and the CI job that DOES
// check it, so nothing is merely dropped.
"exclude": [
"node_modules",
"dist",
// The eight bundled example frontends: each carries its own
// package.json + package-lock.json + tsconfig, and its dependencies
// (`@angular/core`, `react`, `vite`, `@sveltejs/kit/vite`, …) are
// installed per-directory by `npm ci` in `.github/workflows/examples.yml`
// — never by the root `bun install`. That workflow's matrix runs
// `npm ci && npm run build` in all eight, which is a stronger check
// than this config could give them: it compiles each one against the
// framework version it actually declares.
"examples/*/frontend-*/**",
// The live-broker test runners: `tests/integration/brokers/package.json`
// is a second dependency context on purpose — it "[m]irrors what an
// end-user would install", one regular `dependencies` entry per adapter
// peer, so `Dockerfile.runner` needs no peer-dep tricks. `amqplib`,
// `ioredis`, `@aws-sdk/client-s3` and the rest are absent from the root
// node_modules by design. These files are compiled and run inside the
// containers `bun run test:integration:brokers` starts.
"tests/integration/brokers/**",
// The framework-comparison benchmarks: `benchmarks/comparison/package.json`
// is a second dependency context on purpose (#27). Its arms import the
// frameworks actor-ts is measured against — third-party code that exists
// only to be benchmarked, so it must stay out of the shipped closure and
// out of `bun audit`'s surface. Those imports resolve against
// `benchmarks/comparison/node_modules`, which the root install does not
// and must not carry. The config that owns them is
// `benchmarks/comparison/tsconfig.json`, run as `bun run typecheck:compare`
// by the `comparison` job in `.github/workflows/benchmarks.yml`.
"benchmarks/comparison/**",
// Two examples that demonstrate an optional peer the root install does
// not carry. Each one loads it through a guarded `import()` and prints
// an "install it with …" message when it is missing — the type positions
// (`typeof import('@opentelemetry/api')`) are what the root cannot
// resolve, not the code around them.
//
// `examples/voice/smoke-test.ts` used to be listed here too, excused as a
// black-box script that "imports nothing from `src/` and this config would
// catch no API drift in it either way". That reasoning does not match the
// rule above — its imports (`node:*`, `ws`) all resolve from the root
// manifest — and it was wrong on its own terms: the file was returning
// `unknown` where it declared `Uint8Array | undefined`, and being listed
// here is the only reason nothing said so (#1015). Drift is not the only
// thing a typecheck catches. Do not re-add it.
"examples/management/otel-jaeger.ts",
"examples/management/prom-client-shared.ts"
]
}