Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
86 lines (86 loc) · 4.86 KB
/
Copy pathtsconfig.json
File metadata and controls
86 lines (86 loc) · 4.86 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
83
84
85
86
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
// [#10101] Widened from `./src` as a CONSEQUENCE of the `paths` rule
// below, exactly as `packages/rest` records for #9960: redirecting
// `@objectstack/metadata-core` to source puts `packages/metadata-core/
// src/**` into this program, and `rootDir` is enforced over every
// program file even under `--noEmit` (TS6059). `../..` is the directory
// that genuinely contains every file in the program. Emit is unaffected:
// this package builds with tsup, and `typecheck` passes `--noEmit`.
"rootDir": "../..",
"types": [
"node"
],
// [#10101] Resolve the shared platform-row resolver to SOURCE for
// `tsc --noEmit`, so this package's typecheck is a verdict about the
// checkout rather than about `metadata-core/dist` build state (asked for
// by `check:type-source-resolution`, retired on 2026-09-18 — #18373 — and
// the same fix `packages/rest` records for `@objectstack/metadata-protocol`).
"paths": {
"@objectstack/metadata-core": ["../../metadata-core/src/index.ts"],
// [#12642] Resolve the i18n provenance seam to SOURCE. This package's
// translation barrel passes its committed
// `<locale>.source-hashes.generated.ts` companions through
// `withSourceFallback`, whose home is `@objectstack/platform-objects/apps`
// — a NEW type import here, so without this rule the typecheck would be a
// verdict about that package's `dist/` build state (reported by the
// since-retired `check:type-source-resolution`). Anchored on the SUBPATH: the
// bare key would match by prefix and resolve `/apps` through a file.
"@objectstack/platform-objects/apps": ["../../platform-objects/src/apps/index.ts"],
// [#16829] Resolve the real driver the record-view integration test boots
// to SOURCE. Without it that file's `SqliteWasmDriver` type comes from
// `driver-sqlite-wasm/dist`, making this package's typecheck a verdict
// about another package's build state (reported by the since-retired
// `check:type-source-resolution`).
// The `paths` precondition holds here: `rootDir` above is `../..` — the
// `packages/` directory — and the redirected source sits under it at
// `packages/drivers/driver-sqlite-wasm/src`, so no TS6059 is owed.
"@objectstack/driver-sqlite-wasm": ["../../drivers/driver-sqlite-wasm/src/index.ts"],
// [#15166] Resolve the shared driver-error predicate to SOURCE. The
// lost-audit-row report asks `isMissingTableError` whether a failure is
// the missing-table cause its datasource remedy was written for, so
// without this rule that predicate's type would come from
// `types/dist`, making this package's typecheck a verdict about
// another package's build state (reported by the since-retired
// `check:type-source-resolution`).
// Bare key, exactly as `plugin-security` spells the same entry: it is an
// exact match, so it cannot swallow a subpath, and this package imports
// none. The `paths` precondition holds — `rootDir` above is `../..`, the
// `packages/` directory, and the redirected source sits under it at
// `packages/types/src`, so no TS6059 is owed.
"@objectstack/types": ["../../types/src/index.ts"]
}
},
"include": [
"src/**/*"
],
// [#16829] Tests leave the BUILD program, exactly as `plugin-approvals`
// spells it. They are NOT losing coverage: `tsconfig.test.json` beside this
// file includes them and the `typecheck` script NAMES it (via
// `check:test-typecheck --project`), which is the pair
// `pnpm check:type-check-coverage` reads.
//
// The reason is the `@objectstack/driver-sqlite-wasm` `paths` rule above.
// That rule puts the driver's SOURCE into whichever program resolves the
// specifier, and the only importer is the record-view integration test. In
// THIS program that source is compiled under the root config's CommonJS-bound
// module setting, where `knex-wasm-dialect.ts` and `wasm-connection.ts` are 4
// × TS1470 ("`import.meta` is not allowed in files which will build into
// CommonJS output") — a verdict about the driver's module semantics billed to
// this package. `tsconfig.test.json` compiles the same files as ESM
// (`module: esnext`, `moduleResolution: bundler`), which is what vitest really
// runs them as, and there `import.meta` is legal.
//
// ⛔ The `paths` rule stays in THIS file rather than moving to the test
// config: a child that declared its own `paths` would REPLACE this map, not
// merge into it, silently sending `@objectstack/metadata-core` and
// `@objectstack/platform-objects/apps` back to `dist/`. That refusal is
// written into `tsconfig.test.json`'s own header.
"exclude": [
"dist",
"node_modules",
"**/*.test.ts"
]
}