Skip to content

Conversation

brijeshb42
Copy link
Contributor

@brijeshb42 brijeshb42 commented Sep 8, 2025

All apps/packages now extend a common tsconfig.options.json and only add project specific changes in their own configs.

Removed tsconfig.build.json in code-infra since there is no build step there.

@brijeshb42 brijeshb42 requested review from a team and Copilot September 8, 2025 06:11
@brijeshb42 brijeshb42 added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Sep 8, 2025
@oliviertassinari oliviertassinari temporarily deployed to typescript-restructure - mui-tools-public PR #666 September 8, 2025 06:12 — with Render Destroyed
Copilot

This comment was marked as outdated.

@mui-bot
Copy link

mui-bot commented Sep 8, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR restructures the TypeScript configuration files to follow a hierarchical approach. A new base configuration file tsconfig.options.json is introduced that contains common TypeScript compiler options, which is then extended by other configuration files to avoid duplication.

  • Created a new base configuration file (tsconfig.options.json) with common TypeScript compiler options
  • Replaced duplicated configurations across packages and apps with extends patterns
  • Removed the redundant tsconfig.build.json file from the code-infra package

Reviewed Changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.options.json New base configuration file with common TypeScript compiler options
tsconfig.js.json New configuration extending base options for JavaScript-enabled projects
tsconfig.node.json Simplified to extend tsconfig.js.json and added babel.config.* to includes
packages/docs-infra/tsconfig.json Updated to extend tsconfig.options.json and removed redundant options
packages/code-infra/tsconfig.json Simplified to extend tsconfig.js.json and updated includes
packages/code-infra/tsconfig.build.json Removed as mentioned in PR description
packages/code-infra/src/cli/typescript.mjs Added --declarationMap false flag to TypeScript command
packages/bundle-size-checker/tsconfig.json Simplified to extend tsconfig.js.json
packages/babel-plugin-resolve-imports/tsconfig.json Simplified to extend tsconfig.js.json
packages/babel-plugin-minify-errors/tsconfig.json Simplified to extend tsconfig.js.json with updated includes
package.json Added @types/babel__core dependency
apps/code-infra-dashboard/tsconfig.json Simplified to extend tsconfig.options.json
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@oliviertassinari oliviertassinari temporarily deployed to typescript-restructure - mui-tools-public PR #666 September 12, 2025 18:56 — with Render Destroyed
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 15, 2025
@brijeshb42 brijeshb42 force-pushed the typescript-restructure branch from eda5add to 8c940ce Compare September 22, 2025 13:09
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 22, 2025
@brijeshb42
Copy link
Contributor Author

@Janpot Can I get a review on this ?

@Janpot
Copy link
Member

Janpot commented Sep 23, 2025

When it comes to modularizing tsconfig, I'm not 100% convinced a deep hierarchy is the best solution. See this comment as a reason for allowing arrays in extends. The idea being that you create multiple base configs, each describing an aspect of the environment which you then can freely compose in your app/package configurations. I don't know how that should look exactly, but I'm thinking like e.g. our build tool can export its tsconfig that sets module resolution rules. Maybe we can make a config for when the target is node, and one for when it is browsers. Such that e.g. our node tools extend from ['tsconfig.node.json'] as they're not compiled, but docs-infra from ['tsconfig.browser.json', 'tsconfig.build.json']. In essence aiming at avoiding extending a tsconfig that itselfs also extends.
See also https://github.com/tsconfig/bases

@oliviertassinari oliviertassinari temporarily deployed to typescript-restructure - mui-tools-public PR #666 September 26, 2025 12:24 — with Render Destroyed
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 30, 2025
@brijeshb42 brijeshb42 force-pushed the typescript-restructure branch from 8c940ce to a783068 Compare October 3, 2025 05:42
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 3, 2025
@brijeshb42
Copy link
Contributor Author

brijeshb42 commented Oct 3, 2025

I am not sure I get what you are saying. Is it that there is tsconfig.options.json and tsconfig.js.json is extending it and then tsconfig.node.json is extending tsconfig.js.json? Both tcconfig.js.json and tsconfig.node.json should be standalone ?

This is done in a way so that we could potentially remove/replace tsdown
in future with a new bundler (if required).
Also, this doesn't change our current `code-infra build` command with
flags.
All apps/packages now extend a common tsconfig.options.json and only add
project specific changes in their own configs.

Removed tsconfig.build.json in code-infra since there is no build step
tehre.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants