-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtsconfig.build.json
More file actions
53 lines (53 loc) · 2.42 KB
/
Copy pathtsconfig.build.json
File metadata and controls
53 lines (53 loc) · 2.42 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
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"ignoreDeprecations": "6.0",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist",
"rootDir": "src",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"types": ["node"]
},
"include": ["src"],
// Tests are not part of the shipped CLI. Compiling them had two costs beyond
// tarball weight: `files: ["dist"]` published them, and — because this package
// has no vitest config — `vitest run` COLLECTED the compiled copies too, so
// every `src/**/*.test.ts` also ran as a stale `dist/**/*.test.js` built from
// whatever the source said at the last build. That is how #4065's
// `packages/cli/.objectstack` residue survived a fix to the source: the run
// was still executing the pre-fix compiled duplicate. It also means a source
// test could be edited to pass while its stale twin asserted the old thing.
//
// `console-route-ledger.ts` joins them for the same reason one step over
// (#11882). It is a REVIEW RECORD, not runtime code: the audited disposition
// of every route this package mounts on the host Hono app, read only by
// `console-route-ledger.conformance.test.ts` — which is itself already
// excluded by the test globs above. Nothing in the shipped CLI imports it, so
// without this line `tsc` emitted ~10KB of permanently dead module into the
// published tarball. This package compiles its whole `include` program rather
// than an entry graph, which is why its two sibling ledgers
// (`cloud-connection`, `metadata`) needed no such line: `tsup` bundles from
// `src/index.ts` and never reached them. The exclusion makes this package's
// END STATE match theirs.
//
// Safe against a future import, and that is a measured property rather than a
// hope: `exclude` filters the `include` glob, it does NOT remove a file that
// an included file imports — TypeScript still pulls such a file in through
// the module graph and emits it. So if shipped code ever imports this ledger,
// it comes back into the build automatically; this line can under-exclude,
// never dangle.
"exclude": [
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/__tests__/**",
"src/utils/console-route-ledger.ts"
]
}