-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtsconfig.scripts.json
More file actions
57 lines (57 loc) · 3.18 KB
/
Copy pathtsconfig.scripts.json
File metadata and controls
57 lines (57 loc) · 3.18 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
// The SCRIPTS-layer type-check program for this package (#11351), WIDENED
// (#14386) to also carry this package's manifest authoring site.
//
// `scripts/i18n-extract.config.ts` is the input to this package's i18n
// extraction: it composes the package's own objects and translation bundles
// into an `ObjectStackDefinition`. It is real source, and until this file
// existed no tsc program read a line of it -- `tsconfig.json` selects only
// `src`, so the package passed `check:type-check-coverage` as COVERED with
// the directory unread. It was carried as an UNCHECKED_SOURCE_DEBT entry
// (#10756); that entry is deleted in the same change that adds this file,
// which RECONCILED forces anyway.
//
// A SIBLING rather than a wider `include` on `tsconfig.json`, the
// distinction #5475 drew for `packages/spec` and #10756 for
// `packages/objectql/scripts`: that config emits, so widening it to reach
// `scripts/` would put the directory in front of the emit. This program
// emits nothing.
//
// #14386 ADDED `objectstack.config.ts` (the package-ROOT manifest,
// `defineStack` composing `./src/manifest`) to `include` below, joining
// `scripts/**/*` in this same sibling rather than opening a second one: it is
// a package-root file for the identical reason `scripts/` is -- `tsconfig
// .json`'s `include` is `src/**/*`, which cannot match a root-level file
// either. Before this change no tsc program read the manifest:
// `check:type-check-coverage`'s `isUncheckedSourceCandidate` skips
// `depth === 0` by construction (the package-root line), so `pnpm --filter
// @objectstack/plugin-security typecheck` exiting 0 carried no information
// about it, of the same shape #13284 found and fixed in `packages/drivers/
// driver-memory` and `packages/plugins/plugin-hono-server`. See
// `scripts/check-type-check-coverage.mjs`'s `ROOT_SOURCE_FILES` for the
// declared allowlist this repairs against.
//
// STRICTNESS IS INHERITED and deliberately not relaxed: `strict`,
// `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest
// come from the root config through `tsconfig.json`. The directory
// type-checks clean under them -- it enters with ZERO recorded debt, and
// there is no ledger here to record any in. Module semantics are inherited
// too (NodeNext): these configs spell their relative imports with `.js`
// extensions already, so nothing here needs `packages/spec`'s bundler
// resolution or `allowImportingTsExtensions`.
// `rootDir` IS NOT OVERRIDDEN HERE, and that is the package-specific half of
// this file. `tsconfig.json` already widens it to `../..` (= `packages/`) to
// carry the `paths` redirect of a sibling package to source, so the inherited
// value ALREADY contains `scripts/` -- and, for the same reason, the
// package-root `objectstack.config.ts` added above -- and this program needs
// no change. Setting it to `.` also measures 0 today, and is still the wrong
// value: it would re-narrow the root below the redirected source, so the
// first script here that reaches that sibling would report TS6059 about the
// CHECK rather than about the code.
//
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"include": ["scripts/**/*", "objectstack.config.ts"]
}