Skip to content

Conversation

@LukasTy
Copy link
Member

@LukasTy LukasTy commented Jun 9, 2025

Use https://pnpm.io/catalogs to manage dependencies, which are used in at least 2 places.

@LukasTy LukasTy self-assigned this Jun 9, 2025
@LukasTy LukasTy added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). labels Jun 9, 2025
@mui-bot
Copy link

mui-bot commented Jun 9, 2025

Deploy preview: https://deploy-preview-18302--material-ui-x.netlify.app/

Bundle size report

Total Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%)
Files: 120 total (0 added, 0 removed, 0 changed)

Details of bundle changes

Generated by 🚫 dangerJS against dd57d66

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 9, 2025
@github-actions
Copy link

github-actions bot commented Jun 9, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 9, 2025
@LukasTy LukasTy requested a review from a team June 9, 2025 13:07
'package.json needs to have a dependency on `@babel/runtime` when building with `@babel/plugin-transform-runtime`.',
);
} else if (babelRuntimeVersion === 'catalog:') {
const listedBabelRuntime = execSync('pnpm list "@babel/runtime" --json');
Copy link
Member Author

Choose a reason for hiding this comment

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

Babel was unhappy with the catalog: version. 🙈 😆

);
} else if (babelRuntimeVersion === 'catalog:') {
// resolve the version from the given package
const { stdout: listedBabelRuntime } = await exec('pnpm list "@babel/runtime" --json');
Copy link
Member Author

Choose a reason for hiding this comment

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

Same here.

@LukasTy LukasTy enabled auto-merge (squash) June 9, 2025 14:32
checkMaterialVersion({
packageJson,
materialPackageJson,
packageDirectory: 'packages/x-charts-pro',
Copy link
Member

Choose a reason for hiding this comment

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

Can't we use something like import.meta.url like we use in the vitest configs? Passing the current package path can be error prone, like if we use packages/x-data-grid on a charts package we will get the wrong results https://github.com/mui/mui-x/blob/master/vitest.config.mts#L5

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. 👍
Updated the solution.
Let me know what you think. 🙏

@LukasTy LukasTy requested a review from JCQuintas June 9, 2025 15:35
// take only relevant part of the file path
// e.g. file:///Users/dev/mui/mui-x/packages/x-charts-pro/src/tests/materialVersion.test.tsx
// becomes packages/x-charts-pro
const workingDirectory = testFilePath.substring(
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've gone with a basic solution to avoid issues on Vite/browser (it didn't like node API).

@LukasTy LukasTy merged commit c46df2e into mui:master Jun 9, 2025
20 checks passed
@LukasTy LukasTy deleted the use-pnpm-catalogs branch June 9, 2025 19:27
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). type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants