Skip to content

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Sep 17, 2025

Extracted from #715
I'm currently messing with the exports code, to reduce the chance of regressions, adding extra types for package.json. Also removed lodash, it's a bit unnecessary, set breaks all type safety.

I'm adding a few errors for patterns our exports translation doesn't support. Better to explicitly error to warn maintainers early. it also makes type checking work.

Docs infra package seems unaffected

@Janpot Janpot added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Sep 17, 2025
@mui-bot
Copy link

mui-bot commented Sep 17, 2025

Bundle size report

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

Details of bundle changes

const importPath = originalExports[key];
if (!importPath) {
set(newExports, [key], null);
return;
Copy link
Member Author

Choose a reason for hiding this comment

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

I believe this should've been continue?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

@oliviertassinari oliviertassinari temporarily deployed to refactor - mui-tools-public PR #716 September 17, 2025 09:52 — with Render Destroyed
* @param {string} param0.outExtension
* @param {boolean} param0.addTypes
* @returns {Promise<{path: string[], importPath: string | Record<string, string | undefined>}>}
* @returns {Promise<void>}
Copy link
Member Author

@Janpot Janpot Sep 17, 2025

Choose a reason for hiding this comment

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

Some of the props were applied inside the function, some outside, and some both. Let's just update newExports inside of the function to simplify the flow?

@Janpot Janpot marked this pull request as ready for review September 17, 2025 10:15
@Janpot Janpot requested a review from brijeshb42 September 17, 2025 10:15
Copy link
Contributor

@brijeshb42 brijeshb42 left a comment

Choose a reason for hiding this comment

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

Thanks for adding the error messages. More robust now.

@Janpot Janpot merged commit b4c5644 into master Sep 17, 2025
9 checks passed
@Janpot Janpot deleted the refactor branch September 17, 2025 14:38
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