-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[code-infra] Fix and update bundling fixtures #43709
Conversation
Netlify deploy previewhttps://deploy-preview-43709--material-ui.netlify.app/ Bundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job updating these. 👍
LGTM. 👌
scripts/releasePack.mts
Outdated
} | ||
|
||
async function run({ packages, outDir, concurrency }: RunOptions) { | ||
const allWorkspaces: WorkspaceDefinition[] = await $`pnpm m ls --depth -1 --json`.then((result) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does pnpm m
do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 From pnpm m --help
Concurrently performs some actions in all subdirectories with a
package.json
(excluding node_modules). Apnpm-workspace.yaml
file may be used to control what directories are searched for packages.
Looks like it's the same as -r
, will update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find it in their docs, didn't think of running --help
.
Anyway, I'd recommend using longhand switches and parameters in our scripts so they are more self-explanatory. Shorthands are good when interacting with the CLI manually to save a few keystrokes.
Bundling tests were broken since we moved to
pnpm
. Bundling tests will be instrumental in verifying new package layouts. That PR should fix the currently failing node ESM test.Initially I tried a new setup based on
workspace:*
dependencies and rely on pnpm linking to build against build output. Looks like this interferes too much with the Next.js build process at the moment.For now I settled on packing the MUI packages with
npm pack
(to remove theworkspace:*
links) and installing them with pnpm overrides.I also added a commonjs bundling test. It's quick and dirty converting the ESM fixture imports to require calls.
Updated the README with new instructions
All tests are passing now (except the ESM test, as expected):
Solved a few problems with our playwright installation along the way