Skip to content

[icons-material] Build lib/package.json with code-infra --no-expand#48689

Open
Janpot wants to merge 1 commit into
mui:masterfrom
Janpot:icons-material-drop-merge-package-json
Open

[icons-material] Build lib/package.json with code-infra --no-expand#48689
Janpot wants to merge 1 commit into
mui:masterfrom
Janpot:icons-material-drop-merge-package-json

Conversation

@Janpot

@Janpot Janpot commented Jun 18, 2026

Copy link
Copy Markdown
Member

code-infra build --no-expand keeps the exports globs as Node subpath patterns instead of enumerating them, so the committed lib/package.json becomes the small wildcard form (~16 lines) instead of ~10k explicit subpath entries that stall the TS language server (#48364).

merge-package-json.mjs (build:pkg-json) is kept — it still refreshes build/package.json from the current root package.json (notably version) at build time, since lib/package.json only changes on icon regeneration. The published output is unchanged.

Package diff

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-48689--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


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

@Janpot Janpot added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Jun 18, 2026
@Janpot Janpot requested a review from brijeshb42 June 18, 2026 07:05
@Janpot Janpot marked this pull request as ready for review June 18, 2026 07:24
Comment on lines -42 to -44
const mergedPackageJson = {
...rootPackageJson,
exports: wildcardExports,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This script was also responsible for updating the freshly built package.json inside the build folder as per latest value in the main package.json and merged just the exports field from lib/package.json since lib/package.json doesn't change with every build.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This fixed a previous issue where bumping the package version didn't actually publish/bumped the new version since it was still using lib/package.json

@Janpot Janpot force-pushed the icons-material-drop-merge-package-json branch from 67733c9 to 99d947a Compare June 18, 2026 08:19
@Janpot Janpot changed the title [icons-material] Replace merge-package-json with code-infra --no-expand [icons-material] Build lib/package.json with code-infra --no-expand Jun 18, 2026
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.

2 participants