Skip to content

Commit cb954f1

Browse files
claude[bot]os-steveclaude
authored
fix(devx): put the eight */scripts i18n-extract directories in a tsc program (#11786)
Each of the eight packages gains a sibling `tsconfig.scripts.json` named in its `typecheck` script, so `scripts/i18n-extract.config.ts` is compiled for real, and its `UNCHECKED_SOURCE_DEBT` entry is deleted in the same change -- the shrink the ledger's own RECONCILED direction forces. All eight measure 0 errors. The notes they carried recorded a TS2883 count that #10868 had already driven to zero by annotating the nine configs' `default` export; #10868 could not graduate them, because a directory in no tsc program does not graduate by itself. `rootDir` is deliberately not uniform: five packages inherit `rootDir: "src"` and widen it to `"."`; plugin-approvals, plugin-audit and plugin-security already widen it to `"../.."` to carry a `paths` redirect of a sibling package to source, so the inherited value already contains `scripts/` and overriding it would re-narrow the root below the redirected source. `packages/services/service-storage` is deliberately left out: it declares no `typecheck` script and is covered by a 51-error DEBT entry, so wiring one is a burn-down rather than a graduation. Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx Co-authored-by: os-steve <steve@objectstack.ai> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 3ead5f0 commit cb954f1

17 files changed

Lines changed: 361 additions & 21 deletions

File tree

packages/platform-objects/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"scripts": {
6666
"build": "tsup",
6767
"test": "vitest run --passWithNoTests",
68-
"typecheck": "tsc --noEmit"
68+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json"
6969
},
7070
"dependencies": {
7171
"@objectstack/metadata-core": "workspace:*",
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// The SCRIPTS-layer type-check program for this package (#11351).
2+
//
3+
// `scripts/i18n-extract.config.ts` is the input to this package's i18n
4+
// extraction: it composes the package's own objects and translation bundles
5+
// into an `ObjectStackDefinition`. It is real source, and until this file
6+
// existed no tsc program read a line of it -- `tsconfig.json` selects only
7+
// `src`, so the package passed `check:type-check-coverage` as COVERED with
8+
// the directory unread. It was carried as an UNCHECKED_SOURCE_DEBT entry
9+
// (#10756); that entry is deleted in the same change that adds this file,
10+
// which RECONCILED forces anyway.
11+
//
12+
// A SIBLING rather than a wider `include` on `tsconfig.json`, the
13+
// distinction #5475 drew for `packages/spec` and #10756 for
14+
// `packages/objectql/scripts`: that config emits, so widening it to reach
15+
// `scripts/` would put the directory in front of the emit. This program
16+
// emits nothing.
17+
//
18+
// STRICTNESS IS INHERITED and deliberately not relaxed: `strict`,
19+
// `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest
20+
// come from the root config through `tsconfig.json`. The directory
21+
// type-checks clean under them -- it enters with ZERO recorded debt, and
22+
// there is no ledger here to record any in. Module semantics are inherited
23+
// too (NodeNext): these configs spell their relative imports with `.js`
24+
// extensions already, so nothing here needs `packages/spec`'s bundler
25+
// resolution or `allowImportingTsExtensions`.
26+
//
27+
{
28+
"extends": "./tsconfig.json",
29+
"compilerOptions": {
30+
"noEmit": true,
31+
// `.` rather than the inherited `src`, because the file this program
32+
// checks is the one outside `src`. Safe precisely because nothing is
33+
// emitted from here -- see the header.
34+
"rootDir": "."
35+
},
36+
"include": ["scripts/**/*"]
37+
}

packages/plugins/plugin-approvals/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"scripts": {
1616
"build": "tsup --config ../../../tsup.config.ts",
17-
"typecheck": "tsc --noEmit",
17+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json",
1818
"test": "vitest run --passWithNoTests"
1919
},
2020
"dependencies": {
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// The SCRIPTS-layer type-check program for this package (#11351).
2+
//
3+
// `scripts/i18n-extract.config.ts` is the input to this package's i18n
4+
// extraction: it composes the package's own objects and translation bundles
5+
// into an `ObjectStackDefinition`. It is real source, and until this file
6+
// existed no tsc program read a line of it -- `tsconfig.json` selects only
7+
// `src`, so the package passed `check:type-check-coverage` as COVERED with
8+
// the directory unread. It was carried as an UNCHECKED_SOURCE_DEBT entry
9+
// (#10756); that entry is deleted in the same change that adds this file,
10+
// which RECONCILED forces anyway.
11+
//
12+
// A SIBLING rather than a wider `include` on `tsconfig.json`, the
13+
// distinction #5475 drew for `packages/spec` and #10756 for
14+
// `packages/objectql/scripts`: that config emits, so widening it to reach
15+
// `scripts/` would put the directory in front of the emit. This program
16+
// emits nothing.
17+
//
18+
// STRICTNESS IS INHERITED and deliberately not relaxed: `strict`,
19+
// `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest
20+
// come from the root config through `tsconfig.json`. The directory
21+
// type-checks clean under them -- it enters with ZERO recorded debt, and
22+
// there is no ledger here to record any in. Module semantics are inherited
23+
// too (NodeNext): these configs spell their relative imports with `.js`
24+
// extensions already, so nothing here needs `packages/spec`'s bundler
25+
// resolution or `allowImportingTsExtensions`.
26+
// `rootDir` IS NOT OVERRIDDEN HERE, and that is the package-specific half of
27+
// this file. `tsconfig.json` already widens it to `../..` (= `packages/`) to
28+
// carry the `paths` redirect of a sibling package to source, so the inherited
29+
// value ALREADY contains `scripts/` and this program needs no change. Setting
30+
// it to `.` also measures 0 today, and is still the wrong value: it would
31+
// re-narrow the root below the redirected source, so the first script here
32+
// that reaches that sibling would report TS6059 about the CHECK rather than
33+
// about the code.
34+
//
35+
{
36+
"extends": "./tsconfig.json",
37+
"compilerOptions": {
38+
"noEmit": true
39+
},
40+
"include": ["scripts/**/*"]
41+
}

packages/plugins/plugin-audit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"build": "tsup --config ../../../tsup.config.ts",
1717
"test": "vitest run --passWithNoTests",
18-
"typecheck": "tsc --noEmit"
18+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json"
1919
},
2020
"dependencies": {
2121
"@objectstack/core": "workspace:*",
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// The SCRIPTS-layer type-check program for this package (#11351).
2+
//
3+
// `scripts/i18n-extract.config.ts` is the input to this package's i18n
4+
// extraction: it composes the package's own objects and translation bundles
5+
// into an `ObjectStackDefinition`. It is real source, and until this file
6+
// existed no tsc program read a line of it -- `tsconfig.json` selects only
7+
// `src`, so the package passed `check:type-check-coverage` as COVERED with
8+
// the directory unread. It was carried as an UNCHECKED_SOURCE_DEBT entry
9+
// (#10756); that entry is deleted in the same change that adds this file,
10+
// which RECONCILED forces anyway.
11+
//
12+
// A SIBLING rather than a wider `include` on `tsconfig.json`, the
13+
// distinction #5475 drew for `packages/spec` and #10756 for
14+
// `packages/objectql/scripts`: that config emits, so widening it to reach
15+
// `scripts/` would put the directory in front of the emit. This program
16+
// emits nothing.
17+
//
18+
// STRICTNESS IS INHERITED and deliberately not relaxed: `strict`,
19+
// `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest
20+
// come from the root config through `tsconfig.json`. The directory
21+
// type-checks clean under them -- it enters with ZERO recorded debt, and
22+
// there is no ledger here to record any in. Module semantics are inherited
23+
// too (NodeNext): these configs spell their relative imports with `.js`
24+
// extensions already, so nothing here needs `packages/spec`'s bundler
25+
// resolution or `allowImportingTsExtensions`.
26+
// `rootDir` IS NOT OVERRIDDEN HERE, and that is the package-specific half of
27+
// this file. `tsconfig.json` already widens it to `../..` (= `packages/`) to
28+
// carry the `paths` redirect of a sibling package to source, so the inherited
29+
// value ALREADY contains `scripts/` and this program needs no change. Setting
30+
// it to `.` also measures 0 today, and is still the wrong value: it would
31+
// re-narrow the root below the redirected source, so the first script here
32+
// that reaches that sibling would report TS6059 about the CHECK rather than
33+
// about the code.
34+
//
35+
{
36+
"extends": "./tsconfig.json",
37+
"compilerOptions": {
38+
"noEmit": true
39+
},
40+
"include": ["scripts/**/*"]
41+
}

packages/plugins/plugin-security/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"build": "tsup --config ../../../tsup.config.ts",
1717
"test": "vitest run",
18-
"typecheck": "tsc --noEmit"
18+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json"
1919
},
2020
"dependencies": {
2121
"@objectstack/core": "workspace:*",
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// The SCRIPTS-layer type-check program for this package (#11351).
2+
//
3+
// `scripts/i18n-extract.config.ts` is the input to this package's i18n
4+
// extraction: it composes the package's own objects and translation bundles
5+
// into an `ObjectStackDefinition`. It is real source, and until this file
6+
// existed no tsc program read a line of it -- `tsconfig.json` selects only
7+
// `src`, so the package passed `check:type-check-coverage` as COVERED with
8+
// the directory unread. It was carried as an UNCHECKED_SOURCE_DEBT entry
9+
// (#10756); that entry is deleted in the same change that adds this file,
10+
// which RECONCILED forces anyway.
11+
//
12+
// A SIBLING rather than a wider `include` on `tsconfig.json`, the
13+
// distinction #5475 drew for `packages/spec` and #10756 for
14+
// `packages/objectql/scripts`: that config emits, so widening it to reach
15+
// `scripts/` would put the directory in front of the emit. This program
16+
// emits nothing.
17+
//
18+
// STRICTNESS IS INHERITED and deliberately not relaxed: `strict`,
19+
// `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest
20+
// come from the root config through `tsconfig.json`. The directory
21+
// type-checks clean under them -- it enters with ZERO recorded debt, and
22+
// there is no ledger here to record any in. Module semantics are inherited
23+
// too (NodeNext): these configs spell their relative imports with `.js`
24+
// extensions already, so nothing here needs `packages/spec`'s bundler
25+
// resolution or `allowImportingTsExtensions`.
26+
// `rootDir` IS NOT OVERRIDDEN HERE, and that is the package-specific half of
27+
// this file. `tsconfig.json` already widens it to `../..` (= `packages/`) to
28+
// carry the `paths` redirect of a sibling package to source, so the inherited
29+
// value ALREADY contains `scripts/` and this program needs no change. Setting
30+
// it to `.` also measures 0 today, and is still the wrong value: it would
31+
// re-narrow the root below the redirected source, so the first script here
32+
// that reaches that sibling would report TS6059 about the CHECK rather than
33+
// about the code.
34+
//
35+
{
36+
"extends": "./tsconfig.json",
37+
"compilerOptions": {
38+
"noEmit": true
39+
},
40+
"include": ["scripts/**/*"]
41+
}

packages/plugins/plugin-sharing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"build": "tsup --config ../../../tsup.config.ts",
1717
"test": "vitest run --passWithNoTests",
18-
"typecheck": "tsc --noEmit"
18+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json"
1919
},
2020
"dependencies": {
2121
"@objectstack/core": "workspace:*",
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// The SCRIPTS-layer type-check program for this package (#11351).
2+
//
3+
// `scripts/i18n-extract.config.ts` is the input to this package's i18n
4+
// extraction: it composes the package's own objects and translation bundles
5+
// into an `ObjectStackDefinition`. It is real source, and until this file
6+
// existed no tsc program read a line of it -- `tsconfig.json` selects only
7+
// `src`, so the package passed `check:type-check-coverage` as COVERED with
8+
// the directory unread. It was carried as an UNCHECKED_SOURCE_DEBT entry
9+
// (#10756); that entry is deleted in the same change that adds this file,
10+
// which RECONCILED forces anyway.
11+
//
12+
// A SIBLING rather than a wider `include` on `tsconfig.json`, the
13+
// distinction #5475 drew for `packages/spec` and #10756 for
14+
// `packages/objectql/scripts`: that config emits, so widening it to reach
15+
// `scripts/` would put the directory in front of the emit. This program
16+
// emits nothing.
17+
//
18+
// STRICTNESS IS INHERITED and deliberately not relaxed: `strict`,
19+
// `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` and the rest
20+
// come from the root config through `tsconfig.json`. The directory
21+
// type-checks clean under them -- it enters with ZERO recorded debt, and
22+
// there is no ledger here to record any in. Module semantics are inherited
23+
// too (NodeNext): these configs spell their relative imports with `.js`
24+
// extensions already, so nothing here needs `packages/spec`'s bundler
25+
// resolution or `allowImportingTsExtensions`.
26+
//
27+
{
28+
"extends": "./tsconfig.json",
29+
"compilerOptions": {
30+
"noEmit": true,
31+
// `.` rather than the inherited `src`, because the file this program
32+
// checks is the one outside `src`. Safe precisely because nothing is
33+
// emitted from here -- see the header.
34+
"rootDir": "."
35+
},
36+
"include": ["scripts/**/*"]
37+
}

0 commit comments

Comments
 (0)