Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit b2bb813

Browse files
baozhoutaoclaude
andauthored
fix(devx): pin tsBuildInfoFile outside the published dist in every composite package (#9328)
`composite` implies `incremental`, so every composite project writes a `*.tsbuildinfo`. Where it lands is DERIVED, not declared: with an `outDir` and no `rootDir`, TypeScript puts the record at `outDir/<configname>.tsbuildinfo` — inside `dist`, which `files: ["dist", …]` publishes whole. `check:published-dist` refuses a record there (objectui#7003), so its verdict came to depend on WHEN it ran: green before anything invoked `tsc`, red after, on a byte-identical tree. Measured at c64975e with TypeScript's own `getTsBuildInfoEmitOutputFilePath`: 18 of this repository's 32 incremental projects derived their record into `dist`, not the 2 the report named. The discriminator is `rootDir`, not the build tool — the 12 correct ones carry `rootDir: "src"`, which rebases the derived path back out of `outDir`, and `packages/components/tsconfig.json` records in its own comment that `rootDir` was removed there for an unrelated reason. Every composite package now pins the record to its own package root, so the location is a decision rather than a side effect of an unrelated option. A shared setting in the base config was measured and rejected: TypeScript resolves a relative `tsBuildInfoFile` against the config that DECLARES it, so one line in `tsconfig.json` collapses all 30 packages onto a single repo-root record. `clean` in `data-objectstack` and `plugin-designer` now removes the relocated record too, matching the five packages that already spell it that way — without it, `rm -rf dist` would leave a record describing files that no longer exist (objectui#6703). Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2b1d0de commit b2bb813

34 files changed

Lines changed: 346 additions & 3 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
---
3+
4+
Internal only — no package release.
5+
6+
Every composite project now pins `tsBuildInfoFile` to its own package root, so the
7+
incremental build record is never derived into `dist`. Nothing under any package's
8+
`files` list changes, and no published source or publish-contract field moves:
9+
the diff is 30 `tsconfig.json` files, two `clean` scripts and one pin test
10+
(objectui#9189).

‎packages/app-shell/tsconfig.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
"types": ["node", "vite/client"],
99
"noEmit": false,
1010
"declaration": true,
11+
// The incremental build RECORD, pinned OUTSIDE the published build output.
12+
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
13+
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
14+
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
15+
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
16+
// package so the location is a decision, not a side effect of an unrelated option.
17+
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
1118
"composite": true,
1219

1320
// See `packages/react/tsconfig.json` for the full argument: under

‎packages/auth/tsconfig.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
"moduleResolution": "nodenext",
3030
"noEmit": false,
3131
"declaration": true,
32+
// The incremental build RECORD, pinned OUTSIDE the published build output.
33+
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
34+
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
35+
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
36+
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
37+
// package so the location is a decision, not a side effect of an unrelated option.
38+
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
3239
"composite": true,
3340
"declarationMap": true,
3441
"skipLibCheck": true

‎packages/collaboration/tsconfig.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
"moduleResolution": "nodenext",
3030
"noEmit": false,
3131
"declaration": true,
32+
// The incremental build RECORD, pinned OUTSIDE the published build output.
33+
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
34+
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
35+
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
36+
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
37+
// package so the location is a decision, not a side effect of an unrelated option.
38+
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
3239
"composite": true,
3340
"declarationMap": true,
3441
"skipLibCheck": true

‎packages/components/tsconfig.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
// Removed rootDir to prevent file not under rootDir errors when importing from ..
1111
"noEmit": false,
1212
"declaration": true,
13+
// The incremental build RECORD, pinned OUTSIDE the published build output.
14+
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
15+
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
16+
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
17+
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
18+
// package so the location is a decision, not a side effect of an unrelated option.
19+
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
1320
"composite": true,
1421
"skipLibCheck": true
1522
},

‎packages/core/tsconfig.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
"rootDir": "src",
66
"noEmit": false,
77
"declaration": true,
8+
// The incremental build RECORD, pinned OUTSIDE the published build output.
9+
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
10+
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
11+
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
12+
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
13+
// package so the location is a decision, not a side effect of an unrelated option.
14+
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
815
"composite": true
916
},
1017
"include": ["src"],

‎packages/data-objectstack/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"build": "tsup",
2525
"dev": "tsup --watch",
26-
"clean": "rm -rf dist",
26+
"clean": "rm -rf dist tsconfig.tsbuildinfo",
2727
"type-check": "tsc --noEmit",
2828
"test": "vitest run --root ../.. packages/data-objectstack/",
2929
"lint": "eslint ."

‎packages/data-objectstack/tsconfig.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "dist",
5+
// The incremental build RECORD, pinned OUTSIDE the published build output.
6+
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
7+
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
8+
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
9+
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
10+
// package so the location is a decision, not a side effect of an unrelated option.
11+
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
512
"composite": true,
613
"declaration": true,
714
"noEmit": false,

‎packages/i18n/tsconfig.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
"rootDir": "src",
66
"noEmit": false,
77
"declaration": true,
8+
// The incremental build RECORD, pinned OUTSIDE the published build output.
9+
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
10+
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
11+
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
12+
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
13+
// package so the location is a decision, not a side effect of an unrelated option.
14+
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
815
"composite": true,
916
"jsx": "react-jsx",
1017
"lib": ["ES2020", "DOM"]

‎packages/mobile/tsconfig.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
"moduleResolution": "nodenext",
3030
"noEmit": false,
3131
"declaration": true,
32+
// The incremental build RECORD, pinned OUTSIDE the published build output.
33+
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
34+
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
35+
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
36+
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
37+
// package so the location is a decision, not a side effect of an unrelated option.
38+
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
3239
"composite": true,
3340
"declarationMap": true,
3441
"skipLibCheck": true

0 commit comments

Comments
 (0)