-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtsconfig.json
More file actions
71 lines (71 loc) · 3.72 KB
/
Copy pathtsconfig.json
File metadata and controls
71 lines (71 loc) · 3.72 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
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
// `outDir` / `rootDir` were removed and `noEmit` set as a CONSEQUENCE of
// the `paths` block below — the same correction examples/app-crm and
// `packages/qa/downstream-contract` made for the same reason. tsc emits
// nothing for this app either way (`typecheck` is `tsc --noEmit`; the app
// is BUILT by the ObjectStack CLI, not by tsc), but an emit-shaped config
// still enforces the output-tree rules: `rootDir` is inferred from the
// `include` roots, so formula's source — pulled in by an import, never a
// root — produced a wall of `TS6059: File '.../packages/formula/src/...'
// is not under 'rootDir'` that would drown any real error this typecheck
// exists to print.
"noEmit": true,
//
// #8990: `test/action-predicate-sparse-face.test.ts` imports the CEL engine
// to evaluate this app's authored predicates. Without this rule the import
// resolves through the workspace link to `packages/formula/dist/*.d.ts` — a
// BUILD ARTIFACT — so `tsc --noEmit` would be checking against whatever was
// last built rather than against the source in this checkout, and a stale
// `dist` typechecks green over an engine contract that has since moved.
// `pnpm check:type-source-resolution` is the gate; it wants the `paths`
// rule, not a registry entry.
//
// Same rule, same reason, for the email plugin: `test/email-template-locale.test.ts`
// resolves this app's declared email templates through plugin-email's real
// `sys_email_template` loader and its real column mapping. Unaliased, its TYPES
// come from `packages/plugins/plugin-email/dist/*.d.ts`, so `tsc --noEmit` would
// grade those declarations against whatever was last built rather than against the
// locale ladder in this checkout. Bare key, no `*`: a tsconfig `paths` key without
// a star is an EXACT match, and the `@objectstack/plugin-email*` spelling would
// fold every subpath onto this one target and type-check green against the wrong
// module.
"paths": {
"@objectstack/formula": ["../../packages/formula/src/index.ts"],
"@objectstack/plugin-email": ["../../packages/plugins/plugin-email/src/index.ts"]
}
},
// This package took the widened-`include` route rather than a sibling
// `tsconfig.test.json` because its `rootDir` is already the package root, so
// nothing here needs neutralising — the same repair #7312 applied to
// app-crm / app-todo.
//
// `e2e/**/*` is deliberately wholesale, not `e2e/**/*.spec.ts` (#8062): the
// spec-scoped form left `e2e/global-setup.ts` — the fixture that authenticates
// the whole smoke run — read by no tsc program at all, and the coverage gate
// counts test files, so nothing else had an opinion on it either. The 6 errors
// the narrow glob was avoiding are fixed at their source rather than excluded
// (file-local `declare const process`, plus the `node:fs`/`node:path` members
// in types/node-shim.d.ts), so the wholesale form now costs nothing.
//
// `playwright.config.ts` is named for the same reason: it configures that same
// smoke lane and was dark in exactly the same way. `vitest.config.ts` is NOT
// named — its `vitest/config` import transitively drags in the whole of
// `@types/node`, which is precisely the type surface this package is
// deliberately without (see types/node-shim.d.ts).
"include": [
"src/**/*",
"objectstack.config.ts",
"playwright.config.ts",
"types/**/*",
"test/**/*",
"e2e/**/*"
]
}