chore(ts): drop deprecated baseUrl from tsconfig.base.json #101

Merged
julien merged 1 commits from chore/typescript-drop-deprecated-baseurl into main 2026-05-12 02:06:24 +02:00
Owner

Summary

Remove the deprecated baseUrl: "." from tsconfig.base.json. TypeScript 5.x flags it as deprecated; it stops functioning in TS 7.0. Since TS 5.0, paths keys are resolved relative to the tsconfig file where they are declared when baseUrl is absent — and the repo root is exactly what baseUrl: "." was pointing at.

Why this is a no-op

Our paths entries already start with ./libs/shared/.../src/index.ts (relative to the repo root, which is tsconfig.base.json's directory). With or without baseUrl: ".", the resolver lands on the same files. No other tsconfig in the workspace declares baseUrl (only tsconfig.base.json did), and the only path imports across the codebase are the workspace aliases (shared-ui, shared-state, shared-tokens, shared-util, feature-auth).

rootDir: "." stays — it is independent of the deprecation and removing it would change dist/ layout semantics across the workspace. Revisit only if a future TS version flags it.

Verification

pnpm exec nx run-many -t lint test build --projects=portal-shell,portal-admin,shared-ui,shared-state,shared-tokens,shared-util — green across 6 projects.

The IDE deprecation warning is gone.

## Summary Remove the deprecated `baseUrl: "."` from [`tsconfig.base.json`](tsconfig.base.json). TypeScript 5.x flags it as deprecated; it stops functioning in TS 7.0. Since TS 5.0, `paths` keys are resolved relative to the tsconfig file where they are declared when `baseUrl` is absent — and the repo root is exactly what `baseUrl: "."` was pointing at. ## Why this is a no-op Our `paths` entries already start with `./libs/shared/.../src/index.ts` (relative to the repo root, which is `tsconfig.base.json`'s directory). With or without `baseUrl: "."`, the resolver lands on the same files. No other tsconfig in the workspace declares `baseUrl` (only `tsconfig.base.json` did), and the only path imports across the codebase are the workspace aliases (`shared-ui`, `shared-state`, `shared-tokens`, `shared-util`, `feature-auth`). `rootDir: "."` stays — it is independent of the deprecation and removing it would change `dist/` layout semantics across the workspace. Revisit only if a future TS version flags it. ## Verification `pnpm exec nx run-many -t lint test build --projects=portal-shell,portal-admin,shared-ui,shared-state,shared-tokens,shared-util` — green across 6 projects. The IDE deprecation warning is gone.
julien added 1 commit 2026-05-12 02:06:14 +02:00
chore(ts): drop deprecated baseUrl from tsconfig.base.json
CI / scan (pull_request) Successful in 3m2s
CI / commits (pull_request) Successful in 3m2s
CI / check (pull_request) Successful in 4m34s
CI / a11y (pull_request) Successful in 1m49s
CI / perf (pull_request) Successful in 5m47s
6fd2f8b3a7
TypeScript 5.x flags `baseUrl` as deprecated; it stops functioning
in TypeScript 7.0. Since TS 5.0, `paths` keys without a `baseUrl`
are resolved relative to the tsconfig file where they are declared
— in our case, the repo root, which is exactly what `baseUrl: "."`
was buying us. Removing it is a no-op for module resolution.

Our paths (`./libs/shared/tokens/src/index.ts`, …) already point at
files relative to the repo root, so this is a pure cleanup: no other
tsconfig in the workspace declares `baseUrl`, and the only path
imports across the codebase are the workspace aliases
(`shared-ui`, `shared-state`, `shared-tokens`, `shared-util`,
`feature-auth`) which keep resolving correctly.

`rootDir: "."` stays for now — it is independent of the
deprecation and removing it would change `dist/` layout semantics
across the workspace; revisit only if a future TS version flags it.

Verified across portal-shell, portal-admin, shared-{ui,state,
tokens,util} with lint + test + build — green.
julien merged commit cb69a692e7 into main 2026-05-12 02:06:24 +02:00
julien deleted branch chore/typescript-drop-deprecated-baseurl 2026-05-12 02:06:27 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: julien/apf_portal#101