Skip to content

chore: Fix TypeScript 6 deprecations#75

Open
ibgreen wants to merge 3 commits intomasterfrom
ib/typescript-7-ready
Open

chore: Fix TypeScript 6 deprecations#75
ibgreen wants to merge 3 commits intomasterfrom
ib/typescript-7-ready

Conversation

@ibgreen
Copy link
Copy Markdown
Contributor

@ibgreen ibgreen commented Apr 5, 2026

Summary

Removes deprecated TypeScript options that will stop working in TypeScript 7 and updates the repo config to support modern package resolution behavior, including future package.json exports usage.

Changes

  • removed deprecated baseUrl usage from the shared TypeScript config
  • removed deprecated legacy moduleResolution: "node" usage
  • added tsconfig.base.json for shared compiler settings
  • added tsconfig.build.json for package build-specific settings
  • updated module tsconfig.json files to extend the build config
  • switched repo-level config to module: "Node20" with moduleResolution: "node16"
  • updated paths entries to explicit relative targets so they work without baseUrl
  • added comments explaining why repo/test config uses Node semantics while package builds use bundler resolution

Why

TypeScript 6 reports the previous config as deprecated:

  • baseUrl
  • moduleResolution: "node" (legacy node10 behavior)

This change prepares the repo for TypeScript 7 by moving to non-deprecated settings while preserving existing build behavior and avoiding bundler-only resolution in Node-oriented test/tooling flows.

Validation

  • ran yarn build
  • build passed successfully

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1b7eb70461

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

tsconfig.json Outdated
// TypeScript does not currently expose a separate "node20" resolution mode.
// The Node-style resolver remains under the node16/nodenext family, and this
// is the stable choice for Node-oriented workflows in this repo.
"moduleResolution": "node16"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use bundler resolution for root TypeScript config

Setting moduleResolution to node16 in the repo-level tsconfig.json makes TypeScript enforce explicit file extensions for ESM relative imports, but this config still includes modules/*/src and modules/*/test, which contain many extensionless imports (for example import './common'). As a result, any tooling that type-checks against the root config (e.g. tsc -p tsconfig.json or editor diagnostics) now reports a large number of TS2835 errors, which is a regression from the previous config behavior.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant