[code-infra] Fix and update bundling fixtures#43709
Merged
Janpot merged 56 commits intomui:masterfrom Sep 30, 2024
Merged
Conversation
Netlify deploy previewhttps://deploy-preview-43709--material-ui.netlify.app/ Bundle size report |
LukasTy
approved these changes
Sep 30, 2024
Member
LukasTy
left a comment
There was a problem hiding this comment.
Good job updating these. 👍
LGTM. 👌
michaldudak
reviewed
Sep 30, 2024
scripts/releasePack.mts
Outdated
| } | ||
|
|
||
| async function run({ packages, outDir, concurrency }: RunOptions) { | ||
| const allWorkspaces: WorkspaceDefinition[] = await $`pnpm m ls --depth -1 --json`.then((result) => |
Member
Author
There was a problem hiding this comment.
🤔 From pnpm m --help
Concurrently performs some actions in all subdirectories with a
package.json(excluding node_modules). Apnpm-workspace.yamlfile may be used to control what directories are searched for packages.
Looks like it's the same as -r, will update
Member
There was a problem hiding this comment.
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.
This was referenced Oct 25, 2024
This was referenced Oct 29, 2024
This was referenced Oct 31, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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