From 54b1bf099cb24719cee7ad61b85e73654ed7c0cc Mon Sep 17 00:00:00 2001 From: Brian Love Date: Tue, 8 Sep 2026 11:19:04 -0700 Subject: [PATCH 1/2] fix(libs): run the type-tests targets on the workspace TypeScript The three `type-tests` targets invoked `npx tsc`, which does not resolve to the workspace compiler. `@dawn-ai/core` pulls in `@typescript/old` (npm:typescript@6.0.2), whose `tsc` bin wins the hoist at `node_modules/.bin/tsc`, so those targets type-checked the public API with TypeScript 6.0.2 while every other target compiles with the declared 5.9.3. That mismatch is what produced the TS5101 `baseUrl` deprecation error, which #1064 silenced with `ignoreDeprecations: "6.0"`. Invoke `node ./node_modules/typescript/bin/tsc` so the targets use the compiler the workspace declares, and drop the `ignoreDeprecations` holding action. The `rootDir` lines stay: they solve the unrelated problem of type-specs importing sibling libraries through path mappings. Co-Authored-By: Claude Opus 5 --- libs/ag-ui/project.json | 2 +- libs/ag-ui/tsconfig.type-tests.json | 3 --- libs/chat/project.json | 2 +- libs/chat/tsconfig.type-tests.json | 3 --- libs/langgraph/project.json | 2 +- libs/langgraph/tsconfig.type-tests.json | 3 --- 6 files changed, 3 insertions(+), 12 deletions(-) diff --git a/libs/ag-ui/project.json b/libs/ag-ui/project.json index 9d93dae89..b7ee02082 100644 --- a/libs/ag-ui/project.json +++ b/libs/ag-ui/project.json @@ -57,7 +57,7 @@ "type-tests": { "executor": "nx:run-commands", "options": { - "command": "npx tsc --noEmit -p libs/ag-ui/tsconfig.type-tests.json" + "command": "node ./node_modules/typescript/bin/tsc --noEmit -p libs/ag-ui/tsconfig.type-tests.json" } }, "prepare-install": { diff --git a/libs/ag-ui/tsconfig.type-tests.json b/libs/ag-ui/tsconfig.type-tests.json index 1bdf4776a..119d3d12d 100644 --- a/libs/ag-ui/tsconfig.type-tests.json +++ b/libs/ag-ui/tsconfig.type-tests.json @@ -2,9 +2,6 @@ "extends": "./tsconfig.lib.json", "compilerOptions": { "noEmit": true, - // This target runs the workspace `tsc` (newer than the build compilers), - // which errors on the inherited baseUrl unless deprecations are ignored. - "ignoreDeprecations": "6.0", // Type-specs import sibling libraries through tsconfig paths; with noEmit // the rootDir only has to be wide enough to contain them. "rootDir": "../..", diff --git a/libs/chat/project.json b/libs/chat/project.json index d1c2540f8..4ccad4514 100644 --- a/libs/chat/project.json +++ b/libs/chat/project.json @@ -57,7 +57,7 @@ "type-tests": { "executor": "nx:run-commands", "options": { - "command": "npx tsc --project libs/chat/tsconfig.type-tests.json --noEmit" + "command": "node ./node_modules/typescript/bin/tsc --project libs/chat/tsconfig.type-tests.json --noEmit" } }, "prepare-install": { diff --git a/libs/chat/tsconfig.type-tests.json b/libs/chat/tsconfig.type-tests.json index 49ad5fe1d..24175b726 100644 --- a/libs/chat/tsconfig.type-tests.json +++ b/libs/chat/tsconfig.type-tests.json @@ -3,9 +3,6 @@ "compilerOptions": { "outDir": "../../dist/out-tsc/type-tests", "noEmit": true, - // This target runs the workspace `tsc` (newer than the build compilers), - // which errors on the inherited baseUrl unless deprecations are ignored. - "ignoreDeprecations": "6.0", // Type-specs import sibling libraries through tsconfig paths; with noEmit // the rootDir only has to be wide enough to contain them. "rootDir": "../..", diff --git a/libs/langgraph/project.json b/libs/langgraph/project.json index 001a826b3..8f1b57655 100644 --- a/libs/langgraph/project.json +++ b/libs/langgraph/project.json @@ -57,7 +57,7 @@ "type-tests": { "executor": "nx:run-commands", "options": { - "command": "npx tsc --noEmit -p libs/langgraph/tsconfig.type-tests.json" + "command": "node ./node_modules/typescript/bin/tsc --noEmit -p libs/langgraph/tsconfig.type-tests.json" } }, "prepare-install": { diff --git a/libs/langgraph/tsconfig.type-tests.json b/libs/langgraph/tsconfig.type-tests.json index 1bdf4776a..119d3d12d 100644 --- a/libs/langgraph/tsconfig.type-tests.json +++ b/libs/langgraph/tsconfig.type-tests.json @@ -2,9 +2,6 @@ "extends": "./tsconfig.lib.json", "compilerOptions": { "noEmit": true, - // This target runs the workspace `tsc` (newer than the build compilers), - // which errors on the inherited baseUrl unless deprecations are ignored. - "ignoreDeprecations": "6.0", // Type-specs import sibling libraries through tsconfig paths; with noEmit // the rootDir only has to be wide enough to contain them. "rootDir": "../..", From 1b092e67ddbc4f5492a277784ce122817bed209c Mon Sep 17 00:00:00 2001 From: Brian Love Date: Tue, 8 Sep 2026 11:19:10 -0700 Subject: [PATCH 2/2] docs(workspace): record why tsconfig baseUrl cannot be dropped yet TypeScript 7 removes `baseUrl`, and since TypeScript 5.0 the `paths` map no longer needs it. Removing it from `tsconfig.base.json` nonetheless breaks every library that depends on another library: Nx's buildable-library executors write a generated tsconfig under `tmp//build/` whose `paths` re-declare dependency entries as workspace-root-relative dist outputs (`dist/libs/telemetry/browser`). Without a `baseUrl` those non-relative values raise TS5090 and TypeScript discards the whole `paths` map, so `render:build` and `cockpit-shell:build` fail to resolve `@threadplane/telemetry/browser` and `@threadplane/cockpit-registry`. Leave the option in place and record the blocker next to it so the next attempt starts from the Nx side rather than re-deriving this. Co-Authored-By: Claude Opus 5 --- tsconfig.base.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tsconfig.base.json b/tsconfig.base.json index 3a00a4735..bd1425983 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,6 +15,15 @@ "noImplicitOverride": true, "noImplicitReturns": true, "noUnusedLocals": true, + // TypeScript 7 drops `baseUrl`, and since TypeScript 5.0 the `paths` below + // no longer need it (they resolve against this file's directory). It cannot + // go yet: Nx's buildable-library executors (`@nx/angular:package`, + // `@nx/js:tsc`) write a generated tsconfig under `tmp//build/` + // that re-declares `paths` with workspace-root-relative dist outputs such as + // `dist/libs/telemetry/browser`. Those entries are non-relative, so without a + // `baseUrl` TypeScript reports TS5090 and discards the whole `paths` map, + // and every library that depends on another library fails to compile. + // Removing this needs an Nx fix (or the Nx TS-solution setup) first. "baseUrl": ".", "paths": { "@threadplane/design-tokens": ["libs/design-tokens/src/index.ts"],