[internal] Switch resolutions to workspace overrides#22865
Conversation
|
Deploy preview: https://deploy-preview-22865--material-ui-x.netlify.app/ Bundle size report
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts how the monorepo enforces a dependency version constraint under pnpm by moving from package.json resolutions to workspace-level overrides, aligning with pnpm’s configuration model and aiming to address the install/runtime issue referenced in the linked PR comment.
Changes:
- Removed the
resolutions.ast-typespin from the rootpackage.json. - Added a workspace-level
overrides.ast-typesentry inpnpm-workspace.yaml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds a workspace overrides entry to force ast-types version resolution via pnpm. |
| package.json | Removes the root-level resolutions entry now superseded by workspace overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
While this fixes the issue for v8.x of MUI X, perhaps a better solution would be to only throw error on pnpm 11 in https://npmx.dev/package-code/@mui/internal-code-infra/v/0.0.4-canary.66/src/utils/pnpm.mjs#L415-L420
There was a problem hiding this comment.
It would mean we'd need to maintain a third codepath to also update resolutions if it exists, which isn't even a pnpm field. I think backporting would be the right solution in this case. I would have done this, but I didn't realize it would be breaking.
There was a problem hiding this comment.
We don't necessarily need to bump pnpm on v8.x though, this PR seams to be enough
Trying to fix #22860 (comment)