diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1556d33ef90..1ddfc7d30c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -277,6 +277,8 @@ jobs: - 'package.json' - 'pnpm-lock.yaml' - 'tsconfig.json' + - 'tsconfig.base.json' + - 'tsconfig.test.base.json' - '.github/workflows/ci.yml' # BUILD INPUTS outside every package (#21202): turbo.json itself, # its `globalDependencies`, and each `$TURBO_ROOT$/…` input of a diff --git a/examples/embed-objectql/tsconfig.json b/examples/embed-objectql/tsconfig.json index f9a5e266241..c538db7c191 100644 --- a/examples/embed-objectql/tsconfig.json +++ b/examples/embed-objectql/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": ["src/**/*", "test/**/*"], "exclude": ["node_modules", "dist"], "compilerOptions": { diff --git a/packages/adapters/hono/tsconfig.json b/packages/adapters/hono/tsconfig.json index e8dfb8f584f..f6049dde538 100644 --- a/packages/adapters/hono/tsconfig.json +++ b/packages/adapters/hono/tsconfig.json @@ -1,10 +1,8 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", - "module": "NodeNext", - "moduleResolution": "NodeNext", "esModuleInterop": true, "skipLibCheck": true, "lib": [ diff --git a/packages/adapters/hono/tsconfig.test.json b/packages/adapters/hono/tsconfig.test.json index 4e9fca04706..4ac4aaf3c2d 100644 --- a/packages/adapters/hono/tsconfig.test.json +++ b/packages/adapters/hono/tsconfig.test.json @@ -63,11 +63,8 @@ // ledger to be added to -- the same call `metadata-fs` and // `trigger-record-change` recorded. { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", "lib": ["ES2022", "DOM", "DOM.Iterable"] }, "include": ["src/**/*"], diff --git a/packages/apps/account/tsconfig.json b/packages/apps/account/tsconfig.json index fc7524c1f0b..b93023e07c8 100644 --- a/packages/apps/account/tsconfig.json +++ b/packages/apps/account/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/apps/setup/tsconfig.json b/packages/apps/setup/tsconfig.json index fc7524c1f0b..b93023e07c8 100644 --- a/packages/apps/setup/tsconfig.json +++ b/packages/apps/setup/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/apps/studio/tsconfig.json b/packages/apps/studio/tsconfig.json index fc7524c1f0b..b93023e07c8 100644 --- a/packages/apps/studio/tsconfig.json +++ b/packages/apps/studio/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/cli/tsconfig.test.json b/packages/cli/tsconfig.test.json index 2af7c252eed..d76f3d27076 100644 --- a/packages/cli/tsconfig.test.json +++ b/packages/cli/tsconfig.test.json @@ -118,12 +118,9 @@ // than incidental: any error any one of them ever gains is red on arrival. That // is the half of this gate that starts working today. { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, "rootDir": "../..", - "module": "esnext", - "moduleResolution": "bundler", "lib": ["ES2022", "DOM", "DOM.Iterable"], "types": ["node"], // [#15004, #15229] FIVE bare-name rules, no star, for the five workspace diff --git a/packages/client-react/tsconfig.json b/packages/client-react/tsconfig.json index 1e9b83d2d9f..2dd6be10d28 100644 --- a/packages/client-react/tsconfig.json +++ b/packages/client-react/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/client/test-typecheck-debt.json b/packages/client/test-typecheck-debt.json deleted file mode 100644 index eefe4997777..00000000000 --- a/packages/client/test-typecheck-debt.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "_comment": "Per-file tsc error debt of the @objectstack/client TEST layer (#5286). `tsconfig.test.json` compiles `src/**/*.test.ts` — which `tsconfig.json` excludes and therefore no gate ever read — and every file below still carries errors from before that gate existed. THIS FIELD IS GENERATED: every regeneration rewrites it from scripts/check-test-typecheck.mts, and the EXACT ratchet below requires a regeneration on every repair — so an edit made here is gone by the next one. Anything true of THIS package goes in the sibling `_note` field, which is authored, is preserved verbatim, and is never written by the generator (#12624). This comment states NO cause for the errors, deliberately: the classes differ per package and per file, they move as the debt is paid down, and a cause written here is rewritten verbatim into every ledger by every regeneration — so it outlives its own repair and cannot be corrected in the file where it is read. Measure instead, before repairing anything: `tsc --noEmit --pretty false -p tsconfig.test.json` in the package prints the real classes with their TS codes. EXACT ratchet, judged by re-running tsc: a file that gains errors is red, a file that loses them is red until its number is re-recorded, a file that reaches zero is red until its entry is deleted, and a file NOT listed here may have no errors at all. Regenerate with: pnpm --filter @objectstack/client gen:test-typecheck-debt", - "_note": "ADR-0122 phase 2 (#6083) emptied this ledger: all three remaining files were an authored literal annotated with the schema's OUTPUT type (`z.infer`), and the flip made the bare name mean the INPUT type, so they compile with no edit. An empty `entries` is the goal state, not a disabled gate: a file that gains an error is red on arrival.", - "entries": {} -} diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index fed0288c47a..ed2dfa1097e 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/client/tsconfig.test.json b/packages/client/tsconfig.test.json index f9df0f8d54b..0ed0e7e1337 100644 --- a/packages/client/tsconfig.test.json +++ b/packages/client/tsconfig.test.json @@ -20,7 +20,7 @@ // bulk of this package's stale TEST_DEBT entry — a measurement of the // misconfigured check, not of the tests. // - STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, `noUnusedParameters`, -// `noImplicitReturns` and the rest are inherited from the root config. +// `noImplicitReturns` and the rest are inherited from the base config. // Nothing here may loosen a type rule; if a test does not compile, that is // the finding. // @@ -50,12 +50,9 @@ // `client.test.ts`, the pin file, first among them — must have no errors at // all. { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, "rootDir": "../..", - "module": "esnext", - "moduleResolution": "bundler", "lib": ["ES2022", "DOM", "DOM.Iterable"], "types": ["node"] }, diff --git a/packages/cloud-connection/tsconfig.json b/packages/cloud-connection/tsconfig.json index dad9eb869fb..e16ed0f574a 100644 --- a/packages/cloud-connection/tsconfig.json +++ b/packages/cloud-connection/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/cloud-connection/tsconfig.test.json b/packages/cloud-connection/tsconfig.test.json index 257ab6fe78a..da0d10d3f18 100644 --- a/packages/cloud-connection/tsconfig.test.json +++ b/packages/cloud-connection/tsconfig.test.json @@ -60,13 +60,7 @@ // ledger to be added to -- the same call `metadata-fs` and // `trigger-record-change` recorded. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/connectors/connector-imap/tsconfig.json b/packages/connectors/connector-imap/tsconfig.json index 354835d7ce3..0c7cb8520ee 100644 --- a/packages/connectors/connector-imap/tsconfig.json +++ b/packages/connectors/connector-imap/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/connectors/connector-mcp/tsconfig.json b/packages/connectors/connector-mcp/tsconfig.json index 385be7ea897..34d9b6d9d24 100644 --- a/packages/connectors/connector-mcp/tsconfig.json +++ b/packages/connectors/connector-mcp/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/connectors/connector-mcp/tsconfig.test.json b/packages/connectors/connector-mcp/tsconfig.test.json index 69eb3917763..d21cedad04a 100644 --- a/packages/connectors/connector-mcp/tsconfig.test.json +++ b/packages/connectors/connector-mcp/tsconfig.test.json @@ -36,7 +36,7 @@ // compiles `src` under the build config's NodeNext and is where that rule is // enforced. // - `lib: ["ES2022"]`, for the reason `packages/rest` and `packages/lint` -// state: the root config's `lib` is ES2020 while vitest runs these files on +// state: the base config's `lib` is ES2020 while vitest runs these files on // a Node with ES2022 builtins, so the gap is reported as TS2550 about the // CHECK rather than about the code. ⚠️ Measured effect today: **zero** — // this layer carries no TS2550 either way. Fidelity to the runtime, not @@ -48,7 +48,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `types: ["node"]` and `rootDir` are inherited from `tsconfig.json` and -// through it the root config, and none of them is re-declared here. +// through it the base config, and none of them is re-declared here. // `rootDir` (`./src`) needs no widening: every test file here lives under // `src` and none reaches outside the package, so the TS6059 pile // `packages/cli`'s sibling had to widen `rootDir` to clear does not arise — @@ -92,13 +92,7 @@ // — the same grep hits `packages/spec/src`), so no pin here was silently dead; // what the gap cost was the other half. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/connectors/connector-openapi/tsconfig.json b/packages/connectors/connector-openapi/tsconfig.json index 385be7ea897..34d9b6d9d24 100644 --- a/packages/connectors/connector-openapi/tsconfig.json +++ b/packages/connectors/connector-openapi/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/connectors/connector-openapi/tsconfig.test.json b/packages/connectors/connector-openapi/tsconfig.test.json index 3c57891f81f..3306f83b94c 100644 --- a/packages/connectors/connector-openapi/tsconfig.test.json +++ b/packages/connectors/connector-openapi/tsconfig.test.json @@ -36,7 +36,7 @@ // compiles `src` under the build config's NodeNext and is where that rule is // enforced. // - `lib: ["ES2022"]`, for the reason `packages/rest` and `packages/lint` -// state: the root config's `lib` is ES2020 while vitest runs these files on +// state: the base config's `lib` is ES2020 while vitest runs these files on // a Node with ES2022 builtins, so the gap is reported as TS2550 about the // CHECK rather than about the code. ⚠️ Measured effect today: **zero** — // this layer carries no TS2550 either way. Fidelity to the runtime, not @@ -48,7 +48,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `types: ["node"]` and `rootDir` are inherited from `tsconfig.json` and -// through it the root config, and none of them is re-declared here. +// through it the base config, and none of them is re-declared here. // `rootDir` (`./src`) needs no widening: every test file here lives under // `src` and none reaches outside the package, so the TS6059 pile // `packages/cli`'s sibling had to widen `rootDir` to clear does not arise — @@ -91,13 +91,7 @@ // — the same grep hits `packages/spec/src`), so no pin here was silently dead; // what the gap cost was the other half. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/connectors/connector-rest/tsconfig.json b/packages/connectors/connector-rest/tsconfig.json index 385be7ea897..34d9b6d9d24 100644 --- a/packages/connectors/connector-rest/tsconfig.json +++ b/packages/connectors/connector-rest/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/connectors/connector-rest/tsconfig.test.json b/packages/connectors/connector-rest/tsconfig.test.json index 10df97b88b5..3acdd08c844 100644 --- a/packages/connectors/connector-rest/tsconfig.test.json +++ b/packages/connectors/connector-rest/tsconfig.test.json @@ -36,7 +36,7 @@ // compiles `src` under the build config's NodeNext and is where that rule is // enforced. // - `lib: ["ES2022"]`, for the reason `packages/rest` and `packages/lint` -// state: the root config's `lib` is ES2020 while vitest runs these files on +// state: the base config's `lib` is ES2020 while vitest runs these files on // a Node with ES2022 builtins, so the gap is reported as TS2550 about the // CHECK rather than about the code. ⚠️ Measured effect today: **zero** — // this layer carries no TS2550 either way. Fidelity to the runtime, not @@ -48,7 +48,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `types: ["node"]` and `rootDir` are inherited from `tsconfig.json` and -// through it the root config, and none of them is re-declared here. +// through it the base config, and none of them is re-declared here. // `rootDir` (`./src`) needs no widening: every test file here lives under // `src` and none reaches outside the package, so the TS6059 pile // `packages/cli`'s sibling had to widen `rootDir` to clear does not arise — @@ -92,13 +92,7 @@ // — the same grep hits `packages/spec/src`), so no pin here was silently dead; // what the gap cost was the other half. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/connectors/connector-slack/tsconfig.json b/packages/connectors/connector-slack/tsconfig.json index 354835d7ce3..0c7cb8520ee 100644 --- a/packages/connectors/connector-slack/tsconfig.json +++ b/packages/connectors/connector-slack/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/core/tsconfig.examples.json b/packages/core/tsconfig.examples.json index 610e7b9abde..55b46fd56b0 100644 --- a/packages/core/tsconfig.examples.json +++ b/packages/core/tsconfig.examples.json @@ -50,7 +50,7 @@ // // 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 +// from the base 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. A published example that does not compile is the finding, not // a line to write down. diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 3418323fe79..4140804232e 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // [#11663 L2] Widened from `./src` as a CONSEQUENCE of the `paths` rule diff --git a/packages/core/tsconfig.test.json b/packages/core/tsconfig.test.json index d51f5f214b0..71dba5e03bc 100644 --- a/packages/core/tsconfig.test.json +++ b/packages/core/tsconfig.test.json @@ -34,7 +34,7 @@ // `lib`: nothing in this layer touches a browser global. // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch` -// are inherited from the root config and `types: ["node"]` from +// are inherited from the base config and `types: ["node"]` from // `tsconfig.json`. Nothing here may loosen a type rule; if a test does not // compile, that is the finding. // @@ -53,13 +53,7 @@ // retired on 2026-09-18 (#18373). This file declares no `paths` at all, so // the rule stands. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/drivers/driver-memory/tsconfig.json b/packages/drivers/driver-memory/tsconfig.json index 17d8bc29efc..ca4b231eb73 100644 --- a/packages/drivers/driver-memory/tsconfig.json +++ b/packages/drivers/driver-memory/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "target": "ES2020", + // module re-set from the base's NodeNext: no "type": "module" here, so NodeNext would compile src as CommonJS and refuse its `import.meta` (TS1470, measured). "module": "ES2020", "moduleResolution": "bundler", "declaration": true, diff --git a/packages/drivers/driver-memory/tsconfig.typecheck.json b/packages/drivers/driver-memory/tsconfig.typecheck.json index 88035b35954..30d81989fdb 100644 --- a/packages/drivers/driver-memory/tsconfig.typecheck.json +++ b/packages/drivers/driver-memory/tsconfig.typecheck.json @@ -25,7 +25,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `esModuleInterop`, `forceConsistentCasingInFileNames` and the rest come from -// the root config through `tsconfig.json`. The manifest type-checks clean +// the base config through `tsconfig.json`. The manifest type-checks clean // under them -- it enters with ZERO recorded debt, and there is no ledger here // to record any in. { diff --git a/packages/drivers/driver-mongodb/tsconfig.json b/packages/drivers/driver-mongodb/tsconfig.json index 1e6eb4ed14c..1baeece7464 100644 --- a/packages/drivers/driver-mongodb/tsconfig.json +++ b/packages/drivers/driver-mongodb/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/drivers/driver-mongodb/tsconfig.test.json b/packages/drivers/driver-mongodb/tsconfig.test.json index aebae485958..dc7e378c649 100644 --- a/packages/drivers/driver-mongodb/tsconfig.test.json +++ b/packages/drivers/driver-mongodb/tsconfig.test.json @@ -42,7 +42,7 @@ // `lib`: nothing in this layer touches a browser global. // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch` -// are inherited from the root config, and `types: ["node"]` restates +// are inherited from the base config, and `types: ["node"]` restates // `tsconfig.json`'s — load-bearing for the same reason its comment gives, // since the `.test.ts` files call the `setTimeout` / `console` users in // `src/test-mongod.ts` and use those globals themselves. Nothing here may @@ -78,12 +78,8 @@ // cleanest possible confirmation that the ledger was measuring the CHECK's // misconfiguration and never a defect in the tests. { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"], "types": ["node"] }, "include": ["src/**/*"], diff --git a/packages/drivers/driver-sql/tsconfig.json b/packages/drivers/driver-sql/tsconfig.json index ef99aec075d..fe6e7f3abce 100644 --- a/packages/drivers/driver-sql/tsconfig.json +++ b/packages/drivers/driver-sql/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "target": "ES2020", + // module re-set from the base's NodeNext: no "type": "module" here, so NodeNext would compile src as CommonJS and refuse its `import.meta` (TS1470, measured). "module": "ES2020", "moduleResolution": "bundler", "declaration": true, diff --git a/packages/drivers/driver-sqlite-wasm/tsconfig.json b/packages/drivers/driver-sqlite-wasm/tsconfig.json index f15f0457f68..c58cf3e4be6 100644 --- a/packages/drivers/driver-sqlite-wasm/tsconfig.json +++ b/packages/drivers/driver-sqlite-wasm/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "target": "ES2020", + // module re-set from the base's NodeNext: no "type": "module" here, so NodeNext would compile src as CommonJS and refuse its `import.meta` (TS1470, measured). "module": "ES2020", "moduleResolution": "bundler", "declaration": true, diff --git a/packages/drivers/driver-turso/tsconfig.json b/packages/drivers/driver-turso/tsconfig.json index 5bb764a0d70..59234a0d760 100644 --- a/packages/drivers/driver-turso/tsconfig.json +++ b/packages/drivers/driver-turso/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "target": "ES2020", + // module re-set from the base's NodeNext: no "type": "module" here, so NodeNext would compile src as CommonJS and refuse its `import.meta` (TS1470, measured). "module": "ES2020", "moduleResolution": "bundler", "declaration": true, diff --git a/packages/formula/tsconfig.json b/packages/formula/tsconfig.json index 84f5d95f7e0..ea68d3d9f27 100644 --- a/packages/formula/tsconfig.json +++ b/packages/formula/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": ["src/**/*"], "exclude": ["node_modules", "dist", "**/*.test.ts"], "compilerOptions": { diff --git a/packages/formula/tsconfig.test.json b/packages/formula/tsconfig.test.json index e06caaf7a4e..319f081212d 100644 --- a/packages/formula/tsconfig.test.json +++ b/packages/formula/tsconfig.test.json @@ -32,7 +32,7 @@ // leg 1 of `typecheck` still compiles `src` under the build config's // NodeNext and is where that rule is enforced. // - `lib: ["ES2022"]`, for the reason `packages/rest` and `packages/lint` -// state: the root config's `lib` is ES2020 while vitest runs on a Node with +// state: the base config's `lib` is ES2020 while vitest runs on a Node with // ES2022 builtins, so the gap is reported as TS2550 about the CHECK. // ⚠️ Measured effect on today's tree: **zero** — this layer carries no // TS2550 either way. Fidelity to the runtime, not error reduction, and it is @@ -118,12 +118,8 @@ // `packages/drivers/driver-mongodb` all use. { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"], "types": ["node"] }, "include": ["src/**/*"], diff --git a/packages/lint/tsconfig.json b/packages/lint/tsconfig.json index 1294309a21f..a18109da16a 100644 --- a/packages/lint/tsconfig.json +++ b/packages/lint/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/lint/tsconfig.test.json b/packages/lint/tsconfig.test.json index 9102f08836e..f31e577e738 100644 --- a/packages/lint/tsconfig.test.json +++ b/packages/lint/tsconfig.test.json @@ -25,14 +25,14 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, `noUnusedParameters`, // `noImplicitReturns`, `noFallthroughCasesInSwitch`, `rootDir`, `paths` and // `types` (this package's `types: ["node"]` included) are all INHERITED from -// `tsconfig.json` (and through it the root config), and none of them is +// `tsconfig.json` (and through it the base config), and none of them is // re-declared here. ⚠️ A child that declared its own `paths` would REPLACE the // parent map rather than merge into it, silently sending a source-resolved // specifier back to `dist/` — a BUILD ARTIFACT — so this file declares none. // Nothing here may loosen a type rule; if a test does not compile, that is the // finding. // - `lib: ["ES2022"]`, for the same reason `packages/rest` and `plugin-auth` -// state: the root config's `lib` is ES2020 and vitest runs on a Node that has +// state: the base config's `lib` is ES2020 and vitest runs on a Node that has // ES2022 builtins, so the gap is reported as TS2550 about the CHECK. No `DOM`: // nothing in this layer touches a browser global. // @@ -75,13 +75,7 @@ // ratchet able to see them; paydown follows the ratchet's own shrink-only // discipline, on its own cards. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/mcp/tsconfig.json b/packages/mcp/tsconfig.json index 39c4b5a1539..e7a14d9eee9 100644 --- a/packages/mcp/tsconfig.json +++ b/packages/mcp/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/mcp/tsconfig.test.json b/packages/mcp/tsconfig.test.json index 71bd9bc4a8b..de6cdd2f87d 100644 --- a/packages/mcp/tsconfig.test.json +++ b/packages/mcp/tsconfig.test.json @@ -50,7 +50,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch` // and `types: ["node"]` are inherited from `tsconfig.json` and through it -// the root config, and none is re-declared here. ⚠️ A child declaring its +// the base config, and none is re-declared here. ⚠️ A child declaring its // own `paths` would REPLACE the parent map rather than merge into it, so // this file declares none. Nothing here may loosen a type rule; if a test // does not compile, that is the finding. diff --git a/packages/metadata-core/tsconfig.json b/packages/metadata-core/tsconfig.json index 20f06375b80..b8a86d4a38c 100644 --- a/packages/metadata-core/tsconfig.json +++ b/packages/metadata-core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": [ "src/**/*" ], diff --git a/packages/metadata-core/tsconfig.test.json b/packages/metadata-core/tsconfig.test.json index eeaaecbd534..38b890c5c54 100644 --- a/packages/metadata-core/tsconfig.test.json +++ b/packages/metadata-core/tsconfig.test.json @@ -37,7 +37,7 @@ // compile here and fail at runtime under Node). Nothing to fix, so nothing // is changed. // - STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, `noUnusedParameters`, -// `noImplicitReturns` and the rest are inherited from the root config. +// `noImplicitReturns` and the rest are inherited from the base config. // Nothing here may loosen a type rule; if a test does not compile, that is // the finding. // diff --git a/packages/metadata-fs/tsconfig.json b/packages/metadata-fs/tsconfig.json index 20f06375b80..b8a86d4a38c 100644 --- a/packages/metadata-fs/tsconfig.json +++ b/packages/metadata-fs/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": [ "src/**/*" ], diff --git a/packages/metadata-fs/tsconfig.test.json b/packages/metadata-fs/tsconfig.test.json index d2c530fb09b..7f035088b9a 100644 --- a/packages/metadata-fs/tsconfig.test.json +++ b/packages/metadata-fs/tsconfig.test.json @@ -29,7 +29,7 @@ // `.js` import extensions this package must ship. Nothing to fix, so nothing // is changed. // - STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, `noUnusedParameters`, -// `noImplicitReturns` and the rest are inherited from the root config. +// `noImplicitReturns` and the rest are inherited from the base config. // Nothing here may loosen a type rule; if a test does not compile, that is // the finding. The five TS6133 this package's TEST_DEBT entry recorded were // `noUnusedLocals` findings and were fixed in the tests, not silenced here. diff --git a/packages/metadata-protocol/tsconfig.json b/packages/metadata-protocol/tsconfig.json index 20f06375b80..b8a86d4a38c 100644 --- a/packages/metadata-protocol/tsconfig.json +++ b/packages/metadata-protocol/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": [ "src/**/*" ], diff --git a/packages/metadata/tsconfig.json b/packages/metadata/tsconfig.json index 21bcec5409d..0ca5728cb89 100644 --- a/packages/metadata/tsconfig.json +++ b/packages/metadata/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": [ "src/**/*" ], diff --git a/packages/objectql/tsconfig.json b/packages/objectql/tsconfig.json index 55be92cd36e..135e264c36e 100644 --- a/packages/objectql/tsconfig.json +++ b/packages/objectql/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": ["src/**/*"], "exclude": ["node_modules", "dist", "**/*.test.ts"], "compilerOptions": { diff --git a/packages/objectql/tsconfig.test.json b/packages/objectql/tsconfig.test.json index fc58972f840..d12b2ec7a27 100644 --- a/packages/objectql/tsconfig.test.json +++ b/packages/objectql/tsconfig.test.json @@ -48,7 +48,7 @@ // #21853, so no `src` file imports from outside `src` today.) // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch` -// are inherited from the root config, and `types: ["node"]` restates +// are inherited from the base config, and `types: ["node"]` restates // `tsconfig.json`'s. Nothing here may loosen a type rule; if a test does // not compile, that is the finding. ⛔ Not one `any` and not one // `@ts-expect-error` was added to any test file to open this gate — that @@ -89,13 +89,9 @@ // not the fix; the repair is tracked separately (see the PR that added this // file) and ⛔ must not be smuggled in by loosening anything here. { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, "rootDir": ".", - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"], "types": ["node"] }, "include": ["src/**/*"], diff --git a/packages/observability/tsconfig.json b/packages/observability/tsconfig.json index dad9eb869fb..e16ed0f574a 100644 --- a/packages/observability/tsconfig.json +++ b/packages/observability/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/observability/tsconfig.test.json b/packages/observability/tsconfig.test.json index d7361d8b9ed..5090a3a4212 100644 --- a/packages/observability/tsconfig.test.json +++ b/packages/observability/tsconfig.test.json @@ -54,13 +54,7 @@ // ledger to be added to -- the same call `metadata-fs` and // `trigger-record-change` recorded. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/platform-objects/tsconfig.json b/packages/platform-objects/tsconfig.json index 43c7d072580..60568556a25 100644 --- a/packages/platform-objects/tsconfig.json +++ b/packages/platform-objects/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/platform-objects/tsconfig.scripts.json b/packages/platform-objects/tsconfig.scripts.json index 288105dc3e6..0c5859690d1 100644 --- a/packages/platform-objects/tsconfig.scripts.json +++ b/packages/platform-objects/tsconfig.scripts.json @@ -17,7 +17,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/platform-objects/tsconfig.test.json b/packages/platform-objects/tsconfig.test.json index e00499f9b70..b18a5a7fef7 100644 --- a/packages/platform-objects/tsconfig.test.json +++ b/packages/platform-objects/tsconfig.test.json @@ -35,7 +35,7 @@ // stops requiring `.js` on this package's own `src` relative imports in this // program; nothing is lost, because leg 1 still compiles `src` under // NodeNext and is where that rule is enforced. -// - `lib: ["ES2022"]`: the root config's `lib` is ES2020 while vitest runs on +// - `lib: ["ES2022"]`: the base config's `lib` is ES2020 while vitest runs on // a Node with ES2022 builtins, so the gap reports as TS2550 about the CHECK. // Measured effect today: **zero**. Fidelity, not error reduction. // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, @@ -85,13 +85,7 @@ // on 2026-09-18 (#18373). That file's #12511 doc-block, which had the numbers, // is readable at `03b7b8187^`. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/embedder-openai/tsconfig.json b/packages/plugins/embedder-openai/tsconfig.json index 5bb764a0d70..db389588d2f 100644 --- a/packages/plugins/embedder-openai/tsconfig.json +++ b/packages/plugins/embedder-openai/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "target": "ES2020", + // module re-set from the base's NodeNext: tsup bundles this package and it declares no "type": "module", so tsc resolves the way the bundler does. "module": "ES2020", "moduleResolution": "bundler", "declaration": true, diff --git a/packages/plugins/embedder-openai/tsconfig.test.json b/packages/plugins/embedder-openai/tsconfig.test.json index 8267b21d6cc..24a28bc0f78 100644 --- a/packages/plugins/embedder-openai/tsconfig.test.json +++ b/packages/plugins/embedder-openai/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -58,13 +58,7 @@ // `gen:test-typecheck-debt` script are owed — and adding one is maintainer-only // (#5286), exactly as the gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/knowledge-memory/tsconfig.json b/packages/plugins/knowledge-memory/tsconfig.json index 5bb764a0d70..db389588d2f 100644 --- a/packages/plugins/knowledge-memory/tsconfig.json +++ b/packages/plugins/knowledge-memory/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "target": "ES2020", + // module re-set from the base's NodeNext: tsup bundles this package and it declares no "type": "module", so tsc resolves the way the bundler does. "module": "ES2020", "moduleResolution": "bundler", "declaration": true, diff --git a/packages/plugins/knowledge-memory/tsconfig.test.json b/packages/plugins/knowledge-memory/tsconfig.test.json index 0a39b916f29..ce6c0d7ffb8 100644 --- a/packages/plugins/knowledge-memory/tsconfig.test.json +++ b/packages/plugins/knowledge-memory/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -58,13 +58,7 @@ // `gen:test-typecheck-debt` script are owed — and adding one is maintainer-only // (#5286), exactly as the gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/knowledge-ragflow/test-typecheck-debt.json b/packages/plugins/knowledge-ragflow/test-typecheck-debt.json deleted file mode 100644 index ded95b59bbb..00000000000 --- a/packages/plugins/knowledge-ragflow/test-typecheck-debt.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "_comment": "Per-file tsc error debt of the @objectstack/knowledge-ragflow TEST layer (#5286). `tsconfig.test.json` compiles `src/**/*.test.ts` — which `tsconfig.json` excludes and therefore no gate ever read — and every file below still carries errors from before that gate existed. THIS FIELD IS GENERATED: every regeneration rewrites it from scripts/check-test-typecheck.mts, and the EXACT ratchet below requires a regeneration on every repair — so an edit made here is gone by the next one. Anything true of THIS package goes in the sibling `_note` field, which is authored, is preserved verbatim, and is never written by the generator (#12624). This comment states NO cause for the errors, deliberately: the classes differ per package and per file, they move as the debt is paid down, and a cause written here is rewritten verbatim into every ledger by every regeneration — so it outlives its own repair and cannot be corrected in the file where it is read. Measure instead, before repairing anything: `tsc --noEmit --pretty false -p tsconfig.test.json` in the package prints the real classes with their TS codes. Each entry maps a file to its per-SIGNATURE error counts, never to a bare total, because a total can hold while the errors underneath it are replaced wholesale: a signature is the TS code plus the diagnostic message with structural type blobs collapsed, and it carries NO line or column — so the pin survives edits that move code around, and only stops matching when the error itself becomes a different error. EXACT ratchet, judged by re-running tsc: a file that gains errors is red, a file that loses them is red until its number is re-recorded, a file that reaches zero is red until its entry is deleted, a signature that ARRIVES or VANISHES is red even when the file total is unchanged, and a file NOT listed here may have no errors at all. Regenerate with: pnpm --filter @objectstack/knowledge-ragflow gen:test-typecheck-debt", - "_note": "STARTING LEDGER, opened by #14062 under the director ruling of 2026-09-01 (maintainer verbatim: 「同意」), which carries the #5286 maintainer authority for it. 3 errors in 1 file, all PRE-EXISTING — and this package was silent for a DIFFERENT reason than its siblings: its `tsconfig.json` never excluded tests, so a tsc program would have read them, but the package declared NO `typecheck` script at all, and `turbo run typecheck` cannot run a script that does not exist. #14062 added one naming this gate. ⛔ That is not the repo-wide 'packages missing a `typecheck` script' carry-over, which the same ruling holds separate (item 5): this is the one invocation path #14062's own instrument needs in order to run here at all. GRADUATED — the ledger is now empty. All 3 errors were one defect: the test wrote `options` on a `KnowledgeSource` literal, a key `KnowledgeSourceSchema` does not declare, because the adapter read that spelling. The adapter now reads the declared `adapterConfig` (ruled: batch #160 item 2, letter A) and the literals moved with it, so tsc reports none. ⛔ This file is kept, not deleted: it is the per-file ledger `check:test-typecheck` reads for this package, and an empty `entries` is the pin that the test layer owes nothing.", - "entries": {} -} diff --git a/packages/plugins/knowledge-ragflow/tsconfig.json b/packages/plugins/knowledge-ragflow/tsconfig.json index 4fde07cb0e4..48ae4a99d46 100644 --- a/packages/plugins/knowledge-ragflow/tsconfig.json +++ b/packages/plugins/knowledge-ragflow/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "target": "ES2020", + // module re-set from the base's NodeNext: tsup bundles this package and it declares no "type": "module", so tsc resolves the way the bundler does. "module": "ES2020", "moduleResolution": "bundler", "declaration": true, diff --git a/packages/plugins/knowledge-ragflow/tsconfig.test.json b/packages/plugins/knowledge-ragflow/tsconfig.test.json index 52d24d99d77..c57c01c564a 100644 --- a/packages/plugins/knowledge-ragflow/tsconfig.test.json +++ b/packages/plugins/knowledge-ragflow/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -44,7 +44,7 @@ // errors under THIS config 3 // // The difference is exactly the config tier — 1 x TS2550 -// (`Array.prototype.at` against the root config's `lib: ES2020`) — and not +// (`Array.prototype.at` against the base config's `lib: ES2020`) — and not // one line of test code. Fixing the CHECK first and reading the residue // afterwards is the #4311 discipline this repo already writes down. // @@ -63,13 +63,7 @@ // does not REPAIR them — it makes the ratchet able to see them; paydown follows the // ratchet's own shrink-only discipline, on its own cards. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/organizations/tsconfig.json b/packages/plugins/organizations/tsconfig.json index 63b12d88350..efec93f0e5b 100644 --- a/packages/plugins/organizations/tsconfig.json +++ b/packages/plugins/organizations/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // Widened from `./src` as a CONSEQUENCE of the `paths` rules below — the same diff --git a/packages/plugins/organizations/tsconfig.test.json b/packages/plugins/organizations/tsconfig.test.json index caccbb6cb38..41be148561f 100644 --- a/packages/plugins/organizations/tsconfig.test.json +++ b/packages/plugins/organizations/tsconfig.test.json @@ -27,13 +27,7 @@ // that loses an error is red until re-recorded, and a file NOT listed there may // have no errors at all. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-approvals/tsconfig.json b/packages/plugins/plugin-approvals/tsconfig.json index 4818ddf6207..ba4ba1c23b4 100644 --- a/packages/plugins/plugin-approvals/tsconfig.json +++ b/packages/plugins/plugin-approvals/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // [#10101] Widened from `./src` as a CONSEQUENCE of the `paths` rule diff --git a/packages/plugins/plugin-approvals/tsconfig.scripts.json b/packages/plugins/plugin-approvals/tsconfig.scripts.json index c8574c1d0a1..e76ea7448da 100644 --- a/packages/plugins/plugin-approvals/tsconfig.scripts.json +++ b/packages/plugins/plugin-approvals/tsconfig.scripts.json @@ -17,7 +17,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/plugins/plugin-approvals/tsconfig.test.json b/packages/plugins/plugin-approvals/tsconfig.test.json index e8743981c62..ed093bbe0c2 100644 --- a/packages/plugins/plugin-approvals/tsconfig.test.json +++ b/packages/plugins/plugin-approvals/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -64,13 +64,7 @@ // does not REPAIR them — it makes the ratchet able to see them; paydown follows the // ratchet's own shrink-only discipline, on its own cards. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-audit/tsconfig.json b/packages/plugins/plugin-audit/tsconfig.json index e863278848f..4649c5f5012 100644 --- a/packages/plugins/plugin-audit/tsconfig.json +++ b/packages/plugins/plugin-audit/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // [#10101] Widened from `./src` as a CONSEQUENCE of the `paths` rule @@ -65,7 +65,7 @@ // 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 + // THIS program that source is compiled under the base 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 diff --git a/packages/plugins/plugin-audit/tsconfig.scripts.json b/packages/plugins/plugin-audit/tsconfig.scripts.json index c8574c1d0a1..e76ea7448da 100644 --- a/packages/plugins/plugin-audit/tsconfig.scripts.json +++ b/packages/plugins/plugin-audit/tsconfig.scripts.json @@ -17,7 +17,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/plugins/plugin-audit/tsconfig.test.json b/packages/plugins/plugin-audit/tsconfig.test.json index e71268bfd66..568afbe5206 100644 --- a/packages/plugins/plugin-audit/tsconfig.test.json +++ b/packages/plugins/plugin-audit/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -58,13 +58,7 @@ // `gen:test-typecheck-debt` script are owed — and adding one is maintainer-only // (#5286), exactly as the gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-auth/tsconfig.examples.json b/packages/plugins/plugin-auth/tsconfig.examples.json index 721d94167c4..1e210c110a1 100644 --- a/packages/plugins/plugin-auth/tsconfig.examples.json +++ b/packages/plugins/plugin-auth/tsconfig.examples.json @@ -34,7 +34,7 @@ // // 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 +// from the base 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. A published example that does not compile is the finding, // not a line to write down. diff --git a/packages/plugins/plugin-auth/tsconfig.json b/packages/plugins/plugin-auth/tsconfig.json index 8125658d031..c467b795b44 100644 --- a/packages/plugins/plugin-auth/tsconfig.json +++ b/packages/plugins/plugin-auth/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // [#14762] Widened from `./src` as a CONSEQUENCE of the `paths` rule below, diff --git a/packages/plugins/plugin-auth/tsconfig.test.json b/packages/plugins/plugin-auth/tsconfig.test.json index 0754b7bce08..99193a776fd 100644 --- a/packages/plugins/plugin-auth/tsconfig.test.json +++ b/packages/plugins/plugin-auth/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -59,13 +59,7 @@ // does not REPAIR them — it makes the ratchet able to see them; paydown follows the // ratchet's own shrink-only discipline, on its own cards. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-dev/tsconfig.json b/packages/plugins/plugin-dev/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/plugins/plugin-dev/tsconfig.json +++ b/packages/plugins/plugin-dev/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/plugins/plugin-dev/tsconfig.test.json b/packages/plugins/plugin-dev/tsconfig.test.json index f9440efe687..a6efb950059 100644 --- a/packages/plugins/plugin-dev/tsconfig.test.json +++ b/packages/plugins/plugin-dev/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -58,13 +58,7 @@ // `gen:test-typecheck-debt` script are owed — and adding one is maintainer-only // (#5286), exactly as the gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-email/tsconfig.json b/packages/plugins/plugin-email/tsconfig.json index 354835d7ce3..0c7cb8520ee 100644 --- a/packages/plugins/plugin-email/tsconfig.json +++ b/packages/plugins/plugin-email/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/plugins/plugin-email/tsconfig.test.json b/packages/plugins/plugin-email/tsconfig.test.json index 5023e4b19e5..5ceefd1dc37 100644 --- a/packages/plugins/plugin-email/tsconfig.test.json +++ b/packages/plugins/plugin-email/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -60,13 +60,7 @@ // `gen:test-typecheck-debt` script are owed — and adding one is maintainer-only // (#5286), exactly as the gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-hono-server/tsconfig.test.json b/packages/plugins/plugin-hono-server/tsconfig.test.json index af206288de7..4d31c603f64 100644 --- a/packages/plugins/plugin-hono-server/tsconfig.test.json +++ b/packages/plugins/plugin-hono-server/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -32,7 +32,7 @@ // // - ⛔ NO `lib` OVERRIDE HERE, unlike the sibling configs in this family, and // that is measured rather than stylistic: this package's `tsconfig.json` -// does NOT extend the root config and declares no `lib`, so tsc supplies +// does NOT extend the base config and declares no `lib`, so tsc supplies // the default for `target: ES2022` — which INCLUDES `DOM`. Pinning // `lib: ["ES2022"]` the way the siblings do STRIPS it, and this program // then reports 34 errors that do not exist: 26 of them inside diff --git a/packages/plugins/plugin-pinyin-search/tsconfig.json b/packages/plugins/plugin-pinyin-search/tsconfig.json index 354835d7ce3..0c7cb8520ee 100644 --- a/packages/plugins/plugin-pinyin-search/tsconfig.json +++ b/packages/plugins/plugin-pinyin-search/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/plugins/plugin-pinyin-search/tsconfig.test.json b/packages/plugins/plugin-pinyin-search/tsconfig.test.json index 1db36dd97c5..3f23daa7094 100644 --- a/packages/plugins/plugin-pinyin-search/tsconfig.test.json +++ b/packages/plugins/plugin-pinyin-search/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -58,13 +58,7 @@ // `gen:test-typecheck-debt` script are owed — and adding one is maintainer-only // (#5286), exactly as the gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-security/tsconfig.json b/packages/plugins/plugin-security/tsconfig.json index 41f119cf60a..884b3fdc62b 100644 --- a/packages/plugins/plugin-security/tsconfig.json +++ b/packages/plugins/plugin-security/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // [#11184] Widened from `./src` as a CONSEQUENCE of the `paths` rule diff --git a/packages/plugins/plugin-security/tsconfig.scripts.json b/packages/plugins/plugin-security/tsconfig.scripts.json index 9e730f898d3..11b3d9b9a51 100644 --- a/packages/plugins/plugin-security/tsconfig.scripts.json +++ b/packages/plugins/plugin-security/tsconfig.scripts.json @@ -32,7 +32,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/plugins/plugin-security/tsconfig.test.json b/packages/plugins/plugin-security/tsconfig.test.json index af17e381139..5de320b15b6 100644 --- a/packages/plugins/plugin-security/tsconfig.test.json +++ b/packages/plugins/plugin-security/tsconfig.test.json @@ -41,7 +41,7 @@ // NodeNext and keeps demanding the `.js` extensions this package ships. // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch` -// are inherited from the root config, and `types: ["node"]` from +// are inherited from the base config, and `types: ["node"]` from // `tsconfig.json`. Nothing here may loosen a type rule; if a test does not // compile, that is the finding. // @@ -97,13 +97,7 @@ // zero residue it would only ever write an empty ledger, and adding a real one // is maintainer-only (#5286), exactly as the gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-sharing/tsconfig.json b/packages/plugins/plugin-sharing/tsconfig.json index 385be7ea897..34d9b6d9d24 100644 --- a/packages/plugins/plugin-sharing/tsconfig.json +++ b/packages/plugins/plugin-sharing/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/plugins/plugin-sharing/tsconfig.scripts.json b/packages/plugins/plugin-sharing/tsconfig.scripts.json index 474c1c78c63..3ac65d91259 100644 --- a/packages/plugins/plugin-sharing/tsconfig.scripts.json +++ b/packages/plugins/plugin-sharing/tsconfig.scripts.json @@ -17,7 +17,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/plugins/plugin-sharing/tsconfig.test.json b/packages/plugins/plugin-sharing/tsconfig.test.json index 0f7c7502c42..d92f9aa7e08 100644 --- a/packages/plugins/plugin-sharing/tsconfig.test.json +++ b/packages/plugins/plugin-sharing/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -62,13 +62,7 @@ // does not REPAIR them — it makes the ratchet able to see them; paydown follows the // ratchet's own shrink-only discipline, on its own cards. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/plugins/plugin-webhooks/tsconfig.json b/packages/plugins/plugin-webhooks/tsconfig.json index b25dd285cfd..b314e24d71f 100644 --- a/packages/plugins/plugin-webhooks/tsconfig.json +++ b/packages/plugins/plugin-webhooks/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/plugins/plugin-webhooks/tsconfig.scripts.json b/packages/plugins/plugin-webhooks/tsconfig.scripts.json index 474c1c78c63..3ac65d91259 100644 --- a/packages/plugins/plugin-webhooks/tsconfig.scripts.json +++ b/packages/plugins/plugin-webhooks/tsconfig.scripts.json @@ -17,7 +17,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/plugins/plugin-webhooks/tsconfig.test.json b/packages/plugins/plugin-webhooks/tsconfig.test.json index 1a65321de4e..ffe1ce8ff5f 100644 --- a/packages/plugins/plugin-webhooks/tsconfig.test.json +++ b/packages/plugins/plugin-webhooks/tsconfig.test.json @@ -23,7 +23,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -58,13 +58,7 @@ // `gen:test-typecheck-debt` script are owed — and adding one is maintainer-only // (#5286), exactly as the gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/qa/http-conformance/tsconfig.json b/packages/qa/http-conformance/tsconfig.json index 61c464bc8ed..cb1bbdd36b8 100644 --- a/packages/qa/http-conformance/tsconfig.json +++ b/packages/qa/http-conformance/tsconfig.json @@ -1,9 +1,7 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "target": "ES2022", - "module": "NodeNext", - "moduleResolution": "NodeNext", "ignoreDeprecations": "6.0", "strict": true, "esModuleInterop": true, diff --git a/packages/qa/http-conformance/tsconfig.test.json b/packages/qa/http-conformance/tsconfig.test.json index 9f758e7d17b..dc72de6be2b 100644 --- a/packages/qa/http-conformance/tsconfig.test.json +++ b/packages/qa/http-conformance/tsconfig.test.json @@ -49,7 +49,7 @@ // - `lib: ["ES2022"]` IS declared, and here it is the one departure that // MOVES A NUMBER — the only sibling in the family for which it does, so // ⛔ do not read the family's "measured effect: zero" line onto this file. -// Against the INHERITED value it is still zero: the root config declares +// Against the INHERITED value it is still zero: the base config declares // `lib: ["ES2020"]` and this program reports the same 27 either way. The // movement is against what this package had BEFORE it inherited anything — // `target: ES2022` with no `lib` at all, i.e. the `lib.es2022.full` default, @@ -70,7 +70,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch` // and `types: ["node"]` are inherited from `tsconfig.json` and through it -// the root config, and none is re-declared here. ⚠️ A child declaring its +// the base config, and none is re-declared here. ⚠️ A child declaring its // own `paths` would REPLACE the parent map rather than merge into it, // silently sending a source-resolved specifier back to `dist/`, so this // file declares none. Nothing here may loosen a type rule; if a test does @@ -86,7 +86,7 @@ // the full attribution, which has no remainder in either direction: // recorded 2, raw 2 (TS2307 x1, TS2304 x1, both inside `node_modules` `.d.ts`), // -2 dissolved by the inherited `skipLibCheck`, +25 exposed by the declared -// `lib` above, +2 exposed by the root config's `noUnusedParameters` +// `lib` above, +2 exposed by the base config's `noUnusedParameters` // (TS6133 x2), ledger 27. // // Every one of the 27 is PRE-EXISTING in the sense this family means: this diff --git a/packages/qa/refd-timer-testkit/tsconfig.json b/packages/qa/refd-timer-testkit/tsconfig.json index 4edce1722ae..ecf41e27879 100644 --- a/packages/qa/refd-timer-testkit/tsconfig.json +++ b/packages/qa/refd-timer-testkit/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/qa/vitest-filter-preflight/tsconfig.json b/packages/qa/vitest-filter-preflight/tsconfig.json index a5bcc360a2d..d919c216a57 100644 --- a/packages/qa/vitest-filter-preflight/tsconfig.json +++ b/packages/qa/vitest-filter-preflight/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "noEmit": true, "rootDir": "../../..", diff --git a/packages/rest/test-typecheck-debt.json b/packages/rest/test-typecheck-debt.json deleted file mode 100644 index 4e9b780fd76..00000000000 --- a/packages/rest/test-typecheck-debt.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "_comment": "Per-file tsc error debt of the @objectstack/rest TEST layer (#5286). `tsconfig.test.json` compiles `src/**/*.test.ts` — which `tsconfig.json` excludes and therefore no gate ever read — and every file below still carries errors from before that gate existed. THIS FIELD IS GENERATED: every regeneration rewrites it from scripts/check-test-typecheck.mts, and the EXACT ratchet below requires a regeneration on every repair — so an edit made here is gone by the next one. Anything true of THIS package goes in the sibling `_note` field, which is authored, is preserved verbatim, and is never written by the generator (#12624). This comment states NO cause for the errors, deliberately: the classes differ per package and per file, they move as the debt is paid down, and a cause written here is rewritten verbatim into every ledger by every regeneration — so it outlives its own repair and cannot be corrected in the file where it is read. Measure instead, before repairing anything: `tsc --noEmit --pretty false -p tsconfig.test.json` in the package prints the real classes with their TS codes. Each entry maps a file to its per-SIGNATURE error counts, never to a bare total, because a total can hold while the errors underneath it are replaced wholesale: a signature is the TS code plus the diagnostic message with structural type blobs collapsed, and it carries NO line or column — so the pin survives edits that move code around, and only stops matching when the error itself becomes a different error. EXACT ratchet, judged by re-running tsc: a file that gains errors is red, a file that loses them is red until its number is re-recorded, a file that reaches zero is red until its entry is deleted, a signature that ARRIVES or VANISHES is red even when the file total is unchanged, and a file NOT listed here may have no errors at all. Regenerate with: pnpm --filter @objectstack/rest gen:test-typecheck-debt", - "_note": "This package's test layer is at ZERO: `entries` is empty, and that is the end state the EXACT ratchet was built for rather than a gap in it. Nothing in this layer is exempt any more, so an error arriving in any src/**/*.test.ts of this package is red on the PR that introduces it, with no entry to widen and nothing to re-record. #13454 closed the last one. The history below is kept because the mechanism is not rest-specific and has not gone away. tsc reports at most ONE argument-assignability error per call expression, so a repair can uncover a different error at the very same site, and a per-file COUNT can hold while the errors underneath it are replaced wholesale: this file was recorded at 2 before #13377 and measured 2 after, and neither of the two was the same error - the request literals that card removed had been masking the response literals beside them. That blindness is closed (commit 57827b617): an entry is a map of normalized error SIGNATURE to count, so such a substitution reds with the signature that ARRIVED and the one that VANISHED both named. The count was never the pin; the signature keys were. None of the three classes recorded here was paid down by an annotation, and each ended as one statement a reader can find: the five members IHttpRequest requires are stated in src/http-request-test-builder.ts (#13377), where a request takes its method and its path from the route under test so the two cannot disagree; the four members IHttpResponse requires are stated in src/http-response-test-builder.ts (#13454), whose required-member set is computed from the contract so a new required member fails there rather than in a fixture; and exceljs's module-local Buffer, which shadows Node's inside every exceljs signature, is asserted around once in src/xlsx-test-loader.ts (#13378). What an empty ledger here does NOT say: that every fixture in this package is well-typed. Most `.handler(` call sites still cast their arguments `as any`, and 76 of this package's 187 test files build their response through a local `any`-typed fixture and assert on a mirrored res.statusCode/res.body. That number replaces a hand-list of three names, which sat here and in src/http-response-test-builder.ts until #15584 and was wrong in both directions: short by 73, and stating a property (`a local makeRes()`) that one of its own three names did not satisfy, since analytics-dataset-dimension-gate spells its fixture mockRes. The cause of both errors is that the population was enumerated by HELPER NAME, which is the one thing about this shape that varies - only 30 of the 76 spell it makeRes. Re-derive it rather than re-listing it: grep -lE 'expect\\([A-Za-z_$][A-Za-z0-9_$]*\\.(statusCode|body)\\b' packages/rest/src/*.test.ts | xargs grep -l 'statusCode = '. Those are green because nothing is checked there, not because they conform. This ledger can only ever speak for the CHECKED layer.", - "entries": {} -} diff --git a/packages/rest/tsconfig.json b/packages/rest/tsconfig.json index 69461f308ed..73778f474ec 100644 --- a/packages/rest/tsconfig.json +++ b/packages/rest/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // [#9960] Widened from `./src` as a CONSEQUENCE of the `paths` rule below, @@ -44,7 +44,7 @@ // repo's other `paths` block, for the measured version of that trap. // // No `lib` / `types` mirroring was needed, unlike that block: both packages - // extend the same root config and both already declare `types: ["node"]`, + // extend the same base config and both already declare `types: ["node"]`, // so the producer's source compiles under this package's environment with // zero errors (measured: `tsc --noEmit` exit 0 over the merged program). "paths": { diff --git a/packages/rest/tsconfig.test.json b/packages/rest/tsconfig.test.json index 2a7c235e137..7ad16e38e33 100644 --- a/packages/rest/tsconfig.test.json +++ b/packages/rest/tsconfig.test.json @@ -23,14 +23,14 @@ // explicit `.js` extensions on relative imports, which vitest does not. // That one mismatch was 72 x TS2835 and, above each of them, the 49 x // TS7006 they caused: an import that does not resolve makes every symbol it -// names `any`. `lib` inherits as ES2020 from the root config, which was 16 x +// names `any`. `lib` inherits as ES2020 from the base config, which was 16 x // TS2550 — all sixteen the same `Array.prototype.at` message. Those 137 // diagnostics were about the CHECK, never about the code. Matching vitest is // fidelity, not laxity. No `DOM` in `lib`, unlike `packages/client`: nothing // in this layer touches a browser global. // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch` -// are inherited from the root config, and `types: ["node"]` from +// are inherited from the base config, and `types: ["node"]` from // `tsconfig.json`. Nothing here may loosen a type rule; if a test does not // compile, that is the finding. // @@ -65,13 +65,7 @@ // next run. Both are the pin working, and both land on the change that caused // them — but only if the next reader knows the coupling is there. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/runtime/tsconfig.json b/packages/runtime/tsconfig.json index 1294309a21f..a18109da16a 100644 --- a/packages/runtime/tsconfig.json +++ b/packages/runtime/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/runtime/tsconfig.test.json b/packages/runtime/tsconfig.test.json index 808e3a73cdb..b962c867656 100644 --- a/packages/runtime/tsconfig.test.json +++ b/packages/runtime/tsconfig.test.json @@ -48,7 +48,7 @@ // remainder. // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch` -// are inherited from the root config, and `types: ["node"]` restates +// are inherited from the base config, and `types: ["node"]` restates // `tsconfig.json`'s. Nothing here may loosen a type rule; if a test does not // compile, that is the finding. ⛔ Not one `any` and not one // `@ts-expect-error` was added to any test file to open this gate — that @@ -96,12 +96,8 @@ // than incidental: any error any one of them ever gains is red on arrival. That // is the half of this gate that starts working today. { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"], "types": ["node"] }, "include": ["src/**/*"], diff --git a/packages/sdui-parser/tsconfig.json b/packages/sdui-parser/tsconfig.json index 9338828f6de..40132a389bd 100644 --- a/packages/sdui-parser/tsconfig.json +++ b/packages/sdui-parser/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": ["src/**/*"], "exclude": ["node_modules", "dist"], "compilerOptions": { diff --git a/packages/services/service-analytics/tsconfig.json b/packages/services/service-analytics/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-analytics/tsconfig.json +++ b/packages/services/service-analytics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-automation/tsconfig.json b/packages/services/service-automation/tsconfig.json index 357da2d4c2d..aeaa63935ef 100644 --- a/packages/services/service-automation/tsconfig.json +++ b/packages/services/service-automation/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", // [#20919] Widened from `src` to `packages/` as a CONSEQUENCE, the way diff --git a/packages/services/service-automation/tsconfig.test.json b/packages/services/service-automation/tsconfig.test.json index 151ada1a669..f9f4cc81961 100644 --- a/packages/services/service-automation/tsconfig.test.json +++ b/packages/services/service-automation/tsconfig.test.json @@ -28,7 +28,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -76,13 +76,7 @@ // script are owed — and adding one is maintainer-only (#5286), exactly as the // gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/services/service-cache/tsconfig.json b/packages/services/service-cache/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-cache/tsconfig.json +++ b/packages/services/service-cache/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-cluster-redis/tsconfig.json b/packages/services/service-cluster-redis/tsconfig.json index b25dd285cfd..b314e24d71f 100644 --- a/packages/services/service-cluster-redis/tsconfig.json +++ b/packages/services/service-cluster-redis/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-cluster/tsconfig.json b/packages/services/service-cluster/tsconfig.json index b25dd285cfd..b314e24d71f 100644 --- a/packages/services/service-cluster/tsconfig.json +++ b/packages/services/service-cluster/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-cluster/tsconfig.test.json b/packages/services/service-cluster/tsconfig.test.json index fd901ccbd4d..7e0805f0e63 100644 --- a/packages/services/service-cluster/tsconfig.test.json +++ b/packages/services/service-cluster/tsconfig.test.json @@ -25,7 +25,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -66,13 +66,7 @@ // script are owed — and adding one is maintainer-only (#5286), exactly as the // gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/services/service-datasource/tsconfig.json b/packages/services/service-datasource/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-datasource/tsconfig.json +++ b/packages/services/service-datasource/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-i18n/tsconfig.json b/packages/services/service-i18n/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-i18n/tsconfig.json +++ b/packages/services/service-i18n/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-i18n/tsconfig.typecheck.json b/packages/services/service-i18n/tsconfig.typecheck.json index 82487d6972c..916424cdd85 100644 --- a/packages/services/service-i18n/tsconfig.typecheck.json +++ b/packages/services/service-i18n/tsconfig.typecheck.json @@ -32,7 +32,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `esModuleInterop`, `forceConsistentCasingInFileNames` and the rest come from -// the root config through `tsconfig.json`. The manifest type-checks clean +// the base config through `tsconfig.json`. The manifest type-checks clean // under them -- it enters with ZERO recorded debt, and there is no ledger here // to record any in. { diff --git a/packages/services/service-job/tsconfig.json b/packages/services/service-job/tsconfig.json index b25dd285cfd..b314e24d71f 100644 --- a/packages/services/service-job/tsconfig.json +++ b/packages/services/service-job/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-knowledge/tsconfig.json b/packages/services/service-knowledge/tsconfig.json index b25dd285cfd..b314e24d71f 100644 --- a/packages/services/service-knowledge/tsconfig.json +++ b/packages/services/service-knowledge/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-knowledge/tsconfig.test.json b/packages/services/service-knowledge/tsconfig.test.json index d809613322e..296925303cd 100644 --- a/packages/services/service-knowledge/tsconfig.test.json +++ b/packages/services/service-knowledge/tsconfig.test.json @@ -25,7 +25,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -86,13 +86,7 @@ // script are owed — and adding one is maintainer-only (#5286), exactly as the // gate says when it refuses. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/services/service-mailbox/tsconfig.json b/packages/services/service-mailbox/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-mailbox/tsconfig.json +++ b/packages/services/service-mailbox/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-mailbox/tsconfig.scripts.json b/packages/services/service-mailbox/tsconfig.scripts.json index 474c1c78c63..3ac65d91259 100644 --- a/packages/services/service-mailbox/tsconfig.scripts.json +++ b/packages/services/service-mailbox/tsconfig.scripts.json @@ -17,7 +17,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/services/service-messaging/tsconfig.json b/packages/services/service-messaging/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-messaging/tsconfig.json +++ b/packages/services/service-messaging/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-messaging/tsconfig.scripts.json b/packages/services/service-messaging/tsconfig.scripts.json index 474c1c78c63..3ac65d91259 100644 --- a/packages/services/service-messaging/tsconfig.scripts.json +++ b/packages/services/service-messaging/tsconfig.scripts.json @@ -17,7 +17,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/services/service-package/tsconfig.json b/packages/services/service-package/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-package/tsconfig.json +++ b/packages/services/service-package/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-print/tsconfig.json b/packages/services/service-print/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-print/tsconfig.json +++ b/packages/services/service-print/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-queue/tsconfig.json b/packages/services/service-queue/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-queue/tsconfig.json +++ b/packages/services/service-queue/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-realtime/tsconfig.json b/packages/services/service-realtime/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-realtime/tsconfig.json +++ b/packages/services/service-realtime/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-realtime/tsconfig.scripts.json b/packages/services/service-realtime/tsconfig.scripts.json index 474c1c78c63..3ac65d91259 100644 --- a/packages/services/service-realtime/tsconfig.scripts.json +++ b/packages/services/service-realtime/tsconfig.scripts.json @@ -17,7 +17,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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` diff --git a/packages/services/service-settings/tsconfig.json b/packages/services/service-settings/tsconfig.json index b25dd285cfd..b314e24d71f 100644 --- a/packages/services/service-settings/tsconfig.json +++ b/packages/services/service-settings/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-sms/tsconfig.json b/packages/services/service-sms/tsconfig.json index 385be7ea897..34d9b6d9d24 100644 --- a/packages/services/service-sms/tsconfig.json +++ b/packages/services/service-sms/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/services/service-sms/tsconfig.test.json b/packages/services/service-sms/tsconfig.test.json index ad86c013854..e96b7fad2f9 100644 --- a/packages/services/service-sms/tsconfig.test.json +++ b/packages/services/service-sms/tsconfig.test.json @@ -36,7 +36,7 @@ // compiles `src` under the build config's NodeNext and is where that rule is // enforced. // - `lib: ["ES2022"]`, for the reason `packages/rest` and `packages/lint` -// state: the root config's `lib` is ES2020 while vitest runs these files on +// state: the base config's `lib` is ES2020 while vitest runs these files on // a Node with ES2022 builtins, so the gap is reported as TS2550 about the // CHECK rather than about the code. ⚠️ Measured effect today: **zero** — // this layer carries no TS2550 either way. Fidelity to the runtime, not @@ -48,7 +48,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `types: ["node"]` and `rootDir` are inherited from `tsconfig.json` and -// through it the root config, and none of them is re-declared here. +// through it the base config, and none of them is re-declared here. // `rootDir` (`./src`) needs no widening: every test file here lives under // `src` and none reaches outside the package, so the TS6059 pile // `packages/cli`'s sibling had to widen `rootDir` to clear does not arise — @@ -91,13 +91,7 @@ // — the same grep hits `packages/spec/src`), so no pin here was silently dead; // what the gap cost was the other half. { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/services/service-storage/tsconfig.json b/packages/services/service-storage/tsconfig.json index 0b8b99d8820..5c03d935aaa 100644 --- a/packages/services/service-storage/tsconfig.json +++ b/packages/services/service-storage/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/packages/services/service-storage/tsconfig.scripts.json b/packages/services/service-storage/tsconfig.scripts.json index bc3095edded..f250c606feb 100644 --- a/packages/services/service-storage/tsconfig.scripts.json +++ b/packages/services/service-storage/tsconfig.scripts.json @@ -23,7 +23,7 @@ // // STRICTNESS IS INHERITED and deliberately not relaxed: `strict`, // `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest -// come from the root config through `tsconfig.json`. The directory +// come from the base 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): this config already spells its relative imports with `.js` diff --git a/packages/services/service-storage/tsconfig.test.json b/packages/services/service-storage/tsconfig.test.json index 8804177ce2e..34cc3a90501 100644 --- a/packages/services/service-storage/tsconfig.test.json +++ b/packages/services/service-storage/tsconfig.test.json @@ -25,7 +25,7 @@ // - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, // `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, // `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` -// (and through it the root config), and none of them is re-declared here. +// (and through it the base config), and none of them is re-declared here. // ⚠️ A child that declared its own `paths` would REPLACE the parent map // rather than merge into it, silently sending a source-resolved specifier // back to `dist/` — a BUILD ARTIFACT — so this file declares none. @@ -71,13 +71,7 @@ // PR body for the full per-file breakdown. No `test-typecheck-debt.json`: // residue is 0, so none is owed (#5286 route, maintainer-only to open one). { - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"] - }, + "extends": ["./tsconfig.json", "../../../tsconfig.test.base.json"], "include": ["src/**/*"], "exclude": ["node_modules", "dist"] } diff --git a/packages/spec/tsconfig.json b/packages/spec/tsconfig.json index e327ef860d0..44efc54b04d 100644 --- a/packages/spec/tsconfig.json +++ b/packages/spec/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/spec/tsconfig.scripts.json b/packages/spec/tsconfig.scripts.json index 22bb5ce780b..e3d84f036ed 100644 --- a/packages/spec/tsconfig.scripts.json +++ b/packages/spec/tsconfig.scripts.json @@ -36,7 +36,7 @@ // // STRICTNESS IS UNTOUCHED, the same commitment `tsconfig.test.json` makes and // for the same reason: `strict`, `noUnusedLocals`, `noUnusedParameters`, -// `noImplicitReturns` and the rest are inherited from the root config. Only +// `noImplicitReturns` and the rest are inherited from the base config. Only // module semantics and the program's root move. If a script does not compile, // that is the finding — it is how this change learned that ~100 lines of // `build-schemas.ts` were being checked as `never` (see that file's diff --git a/packages/spec/tsconfig.test.json b/packages/spec/tsconfig.test.json index a752cbd610c..7210bd90a89 100644 --- a/packages/spec/tsconfig.test.json +++ b/packages/spec/tsconfig.test.json @@ -12,7 +12,7 @@ // the CHECK rather than the code (TS2835 dynamic-import extensions, TS1470 // `import.meta`, TS2307, TS2550). Matching vitest is fidelity. // - STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, `noImplicitReturns` -// and the rest are inherited from the root config. Nothing about this file +// and the rest are inherited from the base config. Nothing about this file // may loosen a type rule; if a test does not compile, that is the finding. // - `rootDir` widens to the PACKAGE, from the build config's `./src` (#4796). // Under `noEmit` that setting carries no output meaning; all it does is @@ -33,12 +33,9 @@ // still rejects; and it carries no ledger entries at all, so plain `tsc` is a // stricter gate for it than this file's shrink-only debt list. { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, "rootDir": ".", - "module": "esnext", - "moduleResolution": "bundler", "lib": ["ES2022", "DOM", "DOM.Iterable"], "types": ["node"] }, diff --git a/packages/triggers/trigger-api/tsconfig.json b/packages/triggers/trigger-api/tsconfig.json index caff4761a5c..bf68f66fcd5 100644 --- a/packages/triggers/trigger-api/tsconfig.json +++ b/packages/triggers/trigger-api/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/triggers/trigger-record-change/tsconfig.json b/packages/triggers/trigger-record-change/tsconfig.json index f6a1e8bad58..6427cc0cb0c 100644 --- a/packages/triggers/trigger-record-change/tsconfig.json +++ b/packages/triggers/trigger-record-change/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/packages/triggers/trigger-record-change/tsconfig.test.json b/packages/triggers/trigger-record-change/tsconfig.test.json index c4f7c34ce3d..f81ed59ce91 100644 --- a/packages/triggers/trigger-record-change/tsconfig.test.json +++ b/packages/triggers/trigger-record-change/tsconfig.test.json @@ -67,7 +67,7 @@ // alone), `include` still names `src/**/*` so no new file may ENTER the // program on its own, and STRICTNESS below is untouched. // - STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, `noUnusedParameters`, -// `noImplicitReturns` and the rest are inherited from the root config. +// `noImplicitReturns` and the rest are inherited from the base config. // Nothing here may loosen a type rule; if a test does not compile, that is // the finding. // diff --git a/packages/triggers/trigger-schedule/tsconfig.json b/packages/triggers/trigger-schedule/tsconfig.json index 198ccc70236..94606afd6c3 100644 --- a/packages/triggers/trigger-schedule/tsconfig.json +++ b/packages/triggers/trigger-schedule/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // [#18378] Widened from `./src` as a CONSEQUENCE of the `paths` rule diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 260259c521a..c56f6e7b58f 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": ["src/**/*"], "exclude": ["node_modules", "dist"], "compilerOptions": { diff --git a/packages/verify/tsconfig.json b/packages/verify/tsconfig.json index 17332c0c0a0..b0e983cda47 100644 --- a/packages/verify/tsconfig.json +++ b/packages/verify/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", // [#15229] Widened from `./src` as a CONSEQUENCE of the `paths` rule below, diff --git a/packages/verify/tsconfig.test.json b/packages/verify/tsconfig.test.json index ba7ecdea768..5aa1d6fdc50 100644 --- a/packages/verify/tsconfig.test.json +++ b/packages/verify/tsconfig.test.json @@ -68,12 +68,8 @@ // given their `.js` the gate re-measured the entry at 0 ("TEST_DEBT records 3, // and tsc now reports 0 -- graduation candidate"). { - "extends": "./tsconfig.json", + "extends": ["./tsconfig.json", "../../tsconfig.test.base.json"], "compilerOptions": { - "noEmit": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["ES2022"], "types": ["node"] }, "include": ["src/**/*"], diff --git a/scripts/check-type-check-coverage.mjs b/scripts/check-type-check-coverage.mjs index 7c43f1a40ec..5771361b471 100644 --- a/scripts/check-type-check-coverage.mjs +++ b/scripts/check-type-check-coverage.mjs @@ -665,8 +665,8 @@ const GENERATED_INCLUDE_ISSUE = 'https://github.com/objectstack-ai/objectstack/i // A path in the root program whose edits move the `@objectstack/spec-monorepo` // count below, declared as a bare, whole-literal path so the dispatch -// derivation can read it. It accounts for 29 of that entry's 80 -- the largest -// single contributor, and the one an ordinary card actually edits. The note on +// derivation can read it. It accounted for 29 of that entry's 80, and is 1 of +// the 26 standing now -- still the root script an ordinary card edits. The note on // that entry carries the accounting and references this constant instead of // spelling the path inside its sentence. // @@ -835,18 +835,17 @@ const ROOT_PROGRAM_COUPLED_SCRIPT = 'scripts/check-test-typecheck.mts'; const DEBT = { '@objectstack/spec-monorepo': { errors: 26, - compositionAt: 80, - note: 'the workspace root itself: code-tier 4 (TS2304 x2, TS2339 x2); config-tier 68 ' - + '(TS2591 x28 / TS2584 x22 -- the root tsconfig still has no `types:["node"]` -- plus TS2307 x17 ' - + 'and TS2550); noise 8 (TS7006 x7, TS6133). Re-measured 80 at 5ab08428, up from 50. This entry ' - + 'drifts differently from a package: the root program is `scripts/` and the top-level configs ' - + '(everything outside packages/apps/examples), so it grows whenever the repo gains a script -- ' - + ROOT_PROGRAM_COUPLED_SCRIPT + ' alone accounts for 29 of the 80, and the analytics-reconcile ' - + 'tree for 32. Almost all of it is one missing `types:["node"]`, not 80 defects. One wrinkle to ' - + 'know before reading this number as "the root scripts": `exclude` only drops files from the ' - + 'initial walk, so example sources IMPORTED by a script are still pulled into the program -- 4 of ' - + 'the 80 are reported in examples/app-showcase/src, and this entry therefore moves with the ' - + 'showcase as well as with scripts/.', + note: 'the workspace root itself: config-tier 18 (TS2307 x17, TS2550 x1); noise 8 (TS7006 x7, ' + + 'TS6133 x1). The root `tsconfig.json` is the program for `scripts/` and the top-level configs and ' + + 'declares `types:["node"]`; packages extend `tsconfig.base.json` instead. Declaring the Node types ' + + 'moved this count by zero -- the TS2591 / TS2584 pile an older note blamed on their absence was ' + + 'already gone. What stands: the analytics-reconcile tree imports `@objectstack/*` and example ' + + 'sources the root program cannot resolve (the root package declares no workspace dependency), ' + + 'which is all 17 TS2307 and the 7 TS7006 they cascade into; ' + ROOT_PROGRAM_COUPLED_SCRIPT + + ' calls `Object.hasOwn` under lib ES2020 (TS2550); and `exclude` only drops files from the ' + + 'initial walk, so an example source a script imports is still compiled here -- the TS6133 is in ' + + 'examples/app-showcase/src, and this entry moves with the showcase as well as with scripts/. ' + + 'Graduating also needs a `typecheck:root` script and its step in .github/workflows/lint.yml.', }, }; @@ -1131,227 +1130,13 @@ const EXEMPT = { // Onboard by WIRING, not by widening the build config -- which is now the only // route the graduation message prescribes at all (#18953), so this record is // history and ⛔ not a second option anybody still has to weigh. -const TEST_DEBT = { -// ── #14710: `@objectstack/cli` GRADUATED, and it was not paid down ───────── -// -// `cli` (144) left this ledger on 2026-09-03, under the same shape as the five -// above and for the same reason: it now has a `tsconfig.test.json` its -// `typecheck` script NAMES, so `hidesTests` is false for it and this gate's -// per-PACKAGE approximation has nothing left to approximate. ⛔ Read that first -// — a deleted TEST_DEBT entry normally means the errors are gone, and here it -// does not. Not one of the 144 was repaired: this change edits no test file. -// -// ⚠️ This package reached the hidden state by the OTHER SPELLING, which is the -// reading worth carrying forward: its `tsconfig.json` has no `exclude` at all. -// It declares `include: ["src"]`, and its 115 test files live in a sibling -// `test/` tree that the glob simply never reaches. The exclude-shaped detector -// this ledger's own note describes could not see it; only `hiddenTests` (which -// walks the whole package rather than the include roots) could. -// -// The identical population is now held one level finer, per FILE and per -// SIGNATURE, in `packages/cli/test-typecheck-debt.json`: **28 errors across 3 -// of the package's 115 test files**, measured at 5a5336b399 with the closure -// built. The 144 -> 28 step is the config-tier subtraction this ledger's top -// note describes, attributed in both directions with no remainder: -120 that -// dissolve under the test program's vitest-matching module semantics (TS2835 -// x56 extension-less relative imports, the TS7006 x59 cascading above them, -// TS2307 x3, TS18046 x2) and +4 that collapsing the cascade EXPOSED (TS18048 -// x4 in test/i18n-extract-action-description.test.ts, previously masked by an -// `any` from two unresolved imports). The 24 TS2339 survive the move -// unchanged, file for file and count for count. The 144 recorded here was -// exact and stayed exact to the end — re-measured on the way out at -// 5a5336b399, the raw program reports 144 class for class. -// -// ⚠️ Unlike the four packages above, this one's 115 hidden files sat OUTSIDE -// the build config's `rootDir` (`src`), so the honest program needed -// `rootDir` widened the way `packages/client`'s test config already does. -// Measured: with `rootDir` inherited, the same program reports 116 additional -// TS6059 — a config-tier pile that says nothing about any test. - -// ── #14917: `@objectstack/driver-mongodb` GRADUATED — and this one really is -// at ZERO, which the six above are not ──────────────────────────────────────── -// -// `driver-mongodb` (10) left this ledger on 2026-09-04, by the same route as -// `runtime`, `cli`, `lint` and the three plugins: it now has a -// `tsconfig.test.json` its `typecheck` script NAMES, so `hidesTests` is false -// for it and this gate's per-PACKAGE approximation has nothing left to -// approximate. ⛔ This change repairs no test file and edits none. -// -// ⭐ WHAT IS DIFFERENT HERE, and it is the whole reading: those six graduated -// into a per-file `test-typecheck-debt.json` holding a residue. This one -// graduates into NO LEDGER AT ALL. Measured at 6ed4b811af with the dependency -// closure built, `tsc --noEmit -p tsconfig.test.json` reports **0 errors across -// all 30 test files**. The recorded 10 was config-tier IN FULL — the same -// dissolution measured for `lint`'s 16, but complete rather than partial. -// -// The attribution has no remainder in either direction. RECORDED here was -// `TS1309 x7, TS2550 x3`; re-measured on the way out at 6ed4b811af by dropping -// only the test glob (this gate's own `remeasureProject` shape), the raw -// program reports those same 10, class for class and file for file. All 7 -// TS1309 are "cannot use `await` at the top level" — this package has no -// `"type": "module"`, so NodeNext compiles as CJS the suites that await -// `startMongod()` at module scope, which vitest executes as ESM. All 3 TS2550 -// are the same `Array.prototype.at` message in `mongodb-findone-options.test.ts` -// against a `lib` older than es2022. Both classes are the CHECK being -// misconfigured; neither is a defect in a test. Under vitest-matching module -// semantics both dissolve and NOTHING is exposed behind them — there is no -// `+n` term here, because there was no unresolved-import cascade to collapse. -// -// ⚠️ So the shrink-only guarantee did not merely move to a finer instrument -// here, it STRENGTHENED twice over. All 30 files are unledgered, so any error -// any one of them gains is red on arrival. And what the package's own -// `typecheck` script reports about its test layer is now a PASS rather than a -// NUMBER — which was this card's actual finding, once its false headline (that -// the `Equals` / `IsAny` pins here were phantoms) had been corrected on the -// thread. The pins were always real; they were read by THIS ratchet, and a -// ratchet fails when a number moves, not when a type is wrong. -// -// ⚠️ PINS_CHECKED reported nothing for this package in either direction and -// still does not: measured on the way out, its test layer holds ZERO -// `@ts-expect-error` directives, so that half had no subject here either. - -// ── #12511: SEVEN packages GRADUATED at once, and not one of them was paid down -// -// `mcp` (53), `formula` (17), `platform-objects` (3), `connector-mcp` (5), -// `connector-openapi` (5), `connector-rest` (1) and `service-sms` (1) left this -// ledger on 2026-09-06, by the same route as `runtime`, `cli`, `lint`, -// `driver-mongodb`, `verify` and the three plugins: each now has a -// `tsconfig.test.json` its own `typecheck` script NAMES, so `hidesTests` is -// false for it and this gate's per-PACKAGE approximation has nothing left to -// approximate. ⛔ Read that first — a deleted TEST_DEBT entry normally means the -// errors are gone, and here it does not. This change repairs no test file and -// edits none. -// -// ⚠️ SEVEN IN ONE CHANGE IS NOT A BLANKET EDIT, and that distinction is the -// whole reason the card ordering this refused one. Each sibling config was -// written against its OWN measured hole and states its own reading in its own -// header; the judgement genuinely diverged on both axes that matter here: -// -// - MODULE SEMANTICS. `mcp` is `"type": "module"`, so NodeNext already reads -// its tests as ESM and is the STRICTER of the two readings — its sibling -// therefore changes module semantics NOT AT ALL, which is -// `packages/metadata-core`'s precedent rather than `packages/rest`'s. The -// other six are not `"type": "module"`, so NodeNext compiles as CJS what -// vitest executes as ESM, and their siblings carry `module: esnext` / -// `moduleResolution: bundler` for fidelity to the runtime. -// - THE MEASURED SUBTRACTION, which is ZERO for six of the seven. The -// remedy that "obviously" dissolves a config-tier pile dissolved one only -// where the pile was actually there, and 8 mechanical copies of any one of -// these configs would have been 8 configs nobody measured. -// -// The attribution has no remainder in either direction. RAW is re-measured on -// the way out through this gate's own `remeasureProject` shape (extends the -// package's `tsconfig.json`, drops ONLY the test glob) at 6a1e38244 with the -// dependency closure built; LEDGER is what `tsconfig.test.json` reports at -// 52a5a14e7 on that same closure. An error count taken against an unbuilt -// closure is not a reading — unresolved-import cascades inflate it. -// -// package RECORDED RAW dissolve exposed LEDGER -// mcp 53 53 0 0 53 -// formula 17 17 -2 0 15 -// platform-objects 3 3 0 0 3 -// connector-mcp 5 5 0 0 5 -// connector-openapi 5 5 0 0 5 -// connector-rest 1 1 0 0 1 -// service-sms 1 1 0 0 1 -// -// RECORDED equalled RAW for all seven, class for class and file for file, so -// every number this ledger held was exact and stayed exact to the end. The -// identical populations are now held one level finer, per FILE and per -// SIGNATURE, in each package's own `test-typecheck-debt.json`. -// -// The single dissolution is `formula`'s TS1470 x2 ("`import.meta` is not -// allowed in files which will build into CommonJS output", -// `src/rls-predicate.test.ts` and `src/skill-catalog-sync.test.ts`), which goes -// away under `module: esnext` because it was the CHECK being misconfigured and -// never the tests. NOTHING was exposed behind it: there was no unresolved-import -// cascade to collapse in any of the seven, so there is no `+n` term anywhere in -// the table. -// -// ⚠️ ONE COMPOSITION CORRECTION, recorded because the next reader would -// otherwise go looking for the wrong thing: `formula`'s deleted note attributed -// its TS2591 x6 to «`process`». Measured here, all six are the bare module -// specifiers of node builtins — `node:fs` x2, `node:path` x2, `node:url` x2, in -// those same two files — and the TS2339 x2 beside them are `Property 'url' does -// not exist on type 'ImportMeta'`. Both classes SURVIVE the move and are -// ledgered: this package declares no `@types/node` and its tsconfig names no -// `types`, so the node typings never reach its program. That is real debt with a -// real repair, and ⛔ it is deliberately NOT repaired here — seeding the ledger -// is the deliverable, and turning an onboarding into a cleanup is how it stops -// landing at all. -// -// ⚠️ PINS_CHECKED reported nothing for any of the seven in either direction and -// still does not: their test layers hold ZERO `@ts-expect-error` directives -// (grepped with a positive control — the same grep hits `packages/spec/src`), so -// that half had no subject here. What the gap cost was the other half: 83 -// diagnostics that no gate this repo runs had ever reported. -// -// ── #12511: `@objectstack/http-conformance` GRADUATED, and THIS LEDGER IS NOW -// EMPTY ────────────────────────────────────────────────────────────────────── -// -// The eighth and last of the card, on 2026-09-17, by the same route as the -// seven above and the six before them: it now has a `tsconfig.test.json` its -// own `typecheck` script NAMES, so `hidesTests` is false for it and this gate's -// per-PACKAGE approximation has nothing left to approximate. ⛔ Read that first -// — a deleted TEST_DEBT entry normally means the errors are gone, and here it -// does not. This change repairs no test file and edits none. -// -// ⭐ WHAT THIS ONE NEEDED THAT THE SEVEN DID NOT, because the deleted note said -// the sibling route was unavailable and that reading was correct at the time: -// `packages/qa/http-conformance/tsconfig.json` was one of the six package -// configs that do NOT extend the repo root config, and the only one of those -// that also declared no `skipLibCheck` — the sole reason its two third-party -// declarations were checked at all. The note left the choice to the card -// because it is a judgement about this repo's CONFIG POLICY and not about this -// package. The director ruling of 2026-09-07 (decision batch #66, maintainer -// verbatim: 「同意」) made it: the build config takes one `extends` line onto the -// repo root, the way 73 of 79 packages already do, and the sibling then follows -// unchanged. ⛔ No -// per-package dialect, ⛔ no ratchet keyed on `.pnpm` content-hash paths that -// move on an unrelated dependency bump, ⛔ no residual entry here. -// -// ⚠️ THE ATTRIBUTION HAS NO REMAINDER, and it does not run the way the other -// thirteen graduations did — this is the first entry whose LEDGER is LARGER -// than what it graduated with, so read the terms rather than the totals. -// Measured on objectstack-ai/objectstack at f6c2eb7c865065943a474d1e49833d6184d76e32 -// with the dependency closure built (an error count taken against an unbuilt -// closure is not a reading — unresolved-import cascades inflate it), each term -// isolated by its own single-option probe rather than inferred from the ends: -// -// RECORDED here 2 -// RAW — this gate's own `remeasureProject` shape against the -// UNCHANGED config (extends nothing, drops only the test glob): -// TS2307 x1, TS2304 x1, class for class and file for file 2 -// dissolve — `skipLibCheck`, inherited from the root config. Both -// are inside `node_modules` `.d.ts` (@better-auth/core's -// `bun:sqlite` import, @better-fetch/fetch's `Timer`) -2 -// exposed — the root config DECLARES `lib`, which REPLACES the -// `lib.es2022.full` default that `target: ES2022` had been -// supplying, so `Response.json()` is read from @types/node's -// undici (`Promise`) instead of from DOM -// (`Promise`): TS18046 x14, TS2571 x6, TS2339 x5 +25 -// exposed — the root config's `noUnusedParameters`: TS6133 x2 +2 -// LEDGER, per file and per signature 27 -// -// The `+25` is one idiom — `await res.json()` bound without a narrowing — -// across three suites, which is `packages/mcp`'s population above almost -// exactly (51 of its 53). It is NOT a config-tier artefact to be tuned away: -// vitest runs this package with `environment: 'node'`, so the undici reading is -// the one that matches the runtime and the DOM one was the fiction. The sibling -// therefore declares `lib: ["ES2022"]` like all 31 of its siblings and ⛔ does -// not re-add `DOM` to shrink its own ledger. Measured, not reasoned: with -// `lib: ["ES2022", "DOM", "DOM.Iterable"]` the same program reports 2. -// -// ⚠️ PINS_CHECKED reported nothing for this package in either direction and -// still does not: its test layer holds ZERO `@ts-expect-error` directives -// (grepped with a positive control — the same grep hits 49 files under -// `packages/spec/src`), so that half had no subject here either. // // ⛔ AN EMPTY LEDGER IS NOT A LICENCE TO REOPEN IT. TEST_DEBT is closed to new // entries exactly as it was while it held rows: a package whose tests sit // outside every tsc program onboards by WIRING a sibling config, never by -// adding a row back here. -}; +// adding a row back here. The per-graduation records that used to sit inside +// this object are in git history: `git log -S GRADUATED -- scripts/check-type-check-coverage.mjs`. +const TEST_DEBT = {}; // Repo-relative path -> why this test file's `@ts-expect-error` directives are // still phantom. PINS_CHECKED's escape hatch, and the narrowest of the three diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 00000000000..bf14202a560 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,29 @@ +// The compiler options every package, app and example in this workspace +// shares. Packages extend THIS file, never the root `tsconfig.json`: the root +// is the type-check program for `scripts/` and the top-level configs, and its +// environment (`types: ["node"]`, the `exclude` list) belongs to that program +// alone. +// +// ⛔ Strictness lives here and is never loosened by an extending config. A +// package may re-set module semantics (`module` / `moduleResolution`) only with +// a one-line comment beside them saying why. +{ + "compilerOptions": { + "target": "ES2020", + "module": "NodeNext", + "lib": ["ES2020"], + "ignoreDeprecations": "6.0", + "declaration": true, + "declarationMap": true, + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "NodeNext", + "resolveJsonModule": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + } +} diff --git a/tsconfig.json b/tsconfig.json index 91b0abd27a4..e1595808911 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,11 @@ +// The workspace ROOT's own type-check program: `scripts/` and the top-level +// configs, everything outside packages/apps/examples/ui. It is NOT the shared +// base — packages extend `tsconfig.base.json` — so the Node environment below +// reaches this program and nothing else. { + "extends": "./tsconfig.base.json", "compilerOptions": { - "target": "ES2020", - "module": "NodeNext", - "lib": ["ES2020"], - "ignoreDeprecations": "6.0", - "declaration": true, - "declarationMap": true, - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "NodeNext", - "resolveJsonModule": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "types": ["node"] }, "exclude": [ "node_modules", diff --git a/tsconfig.test.base.json b/tsconfig.test.base.json new file mode 100644 index 00000000000..927af28fdb0 --- /dev/null +++ b/tsconfig.test.base.json @@ -0,0 +1,22 @@ +// The module semantics a package's test-layer program (`tsconfig.test.json`) +// shares. A test config extends its package's own build config FIRST and this +// file SECOND — `"extends": ["./tsconfig.json", "../../tsconfig.test.base.json"]` +// — so it inherits everything the build config decides (strictness, `types`, +// `paths`, `rootDir`) and this file overrides module semantics only. +// +// Why these values: vitest runs the tests as ESM through esbuild/vite, which +// does not require the explicit `.js` extensions NodeNext demands on relative +// imports. Matching vitest's resolver is fidelity, not laxity. `lib` is ES2022 +// for the same reason (`Array.prototype.at` and friends). A test config that +// also needs `DOM` or `types` re-declares that one key itself. +// +// ⛔ No strictness option belongs here. If a test does not compile, that is +// the finding. +{ + "compilerOptions": { + "noEmit": true, + "module": "esnext", + "moduleResolution": "bundler", + "lib": ["ES2022"] + } +} diff --git a/turbo.json b/turbo.json index 2f127913b70..ad87228534c 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,6 @@ { "$schema": "https://turbo.build/schema.json", - "globalDependencies": ["tsconfig.json", "tsup.config.ts"], + "globalDependencies": ["tsconfig.json", "tsconfig.base.json", "tsconfig.test.base.json", "tsup.config.ts"], "globalEnv": ["OS_SKIP_DTS"], "globalPassThroughEnv": ["VITEST_MAX_WORKERS"], "agentGuidance": false,