-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[code-infra] Create bundle size package #45911
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
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy previewhttps://deploy-preview-45911--material-ui.netlify.app/ Bundle size reportTotal Size Change: @mui/styles parsed: Show 182 more bundle changes@mui/material/SpeedDialAction parsed: |
commit 54328c9 Author: MUI bot <[email protected]> Date: Wed Apr 23 13:02:21 2025 +0200 Update renderMarkdownReport.js commit a7a84dd Author: MUI bot <[email protected]> Date: Wed Apr 23 12:52:14 2025 +0200 Update renderMarkdownReport.js commit d5a4f41 Author: MUI bot <[email protected]> Date: Wed Apr 23 12:50:09 2025 +0200 Update renderMarkdownReport.js commit 3add681 Author: MUI bot <[email protected]> Date: Wed Apr 23 12:48:56 2025 +0200 Update renderMarkdownReport.js commit 6d59d4d Author: MUI bot <[email protected]> Date: Wed Apr 23 12:33:44 2025 +0200 Update renderMarkdownReport.js commit 2760edc Author: MUI bot <[email protected]> Date: Wed Apr 23 11:44:44 2025 +0200 Update index.js commit c0feb51 Author: MUI bot <[email protected]> Date: Wed Apr 23 10:55:33 2025 +0200 Update renderMarkdownReport.js commit 33673c4 Author: MUI bot <[email protected]> Date: Wed Apr 23 10:53:31 2025 +0200 Update dangerFileContent.ts commit a48e2c5 Author: MUI bot <[email protected]> Date: Wed Apr 23 10:52:54 2025 +0200 hgf commit a66d7a5 Author: MUI bot <[email protected]> Date: Wed Apr 23 10:36:11 2025 +0200 Update renderMarkdownReport.js commit f86dac1 Author: MUI bot <[email protected]> Date: Wed Apr 23 10:35:25 2025 +0200 Update renderMarkdownReport.js commit 802da05 Author: MUI bot <[email protected]> Date: Wed Apr 23 10:23:04 2025 +0200 Update renderMarkdownReport.js commit 5d34f9e Author: MUI bot <[email protected]> Date: Wed Apr 23 10:01:17 2025 +0200 Update fetchSnapshot.js commit 32c6f0e Author: MUI bot <[email protected]> Date: Tue Apr 22 20:35:18 2025 +0200 refactor commit d181d0b Author: MUI bot <[email protected]> Date: Tue Apr 22 18:22:40 2025 +0200 Update dangerFileContent.ts commit 54faf15 Author: MUI bot <[email protected]> Date: Tue Apr 22 18:22:17 2025 +0200 Update dangerFileContent.ts commit fd28d71 Author: MUI bot <[email protected]> Date: Tue Apr 22 18:21:59 2025 +0200 circleciBuildNumber commit eb65bf0 Author: MUI bot <[email protected]> Date: Tue Apr 22 18:08:55 2025 +0200 Update dangerFileContent.ts commit 4de9e83 Author: MUI bot <[email protected]> Date: Tue Apr 22 18:07:37 2025 +0200 Update renderMarkdownReport.js commit 7d83034 Author: MUI bot <[email protected]> Date: Tue Apr 22 17:44:25 2025 +0200 frefer commit 3578d19 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:52:25 2025 +0200 Update renderMarkdownReport.js commit edf282d Author: MUI bot <[email protected]> Date: Tue Apr 22 16:41:09 2025 +0200 Update renderMarkdownReport.js commit 7e5637f Author: MUI bot <[email protected]> Date: Tue Apr 22 16:40:31 2025 +0200 Update renderMarkdownReport.js commit a2830e1 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:39:15 2025 +0200 Update renderMarkdownReport.js commit b3d918c Author: MUI bot <[email protected]> Date: Tue Apr 22 16:38:35 2025 +0200 add in front for less visual clutter commit 11af718 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:38:05 2025 +0200 reduce amount of triangles commit e15e249 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:28:49 2025 +0200 Update dangerFileContent.ts commit d67a4b3 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:28:25 2025 +0200 frwefre commit c4fa1c5 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:19:43 2025 +0200 Update renderMarkdownReport.js commit ce11999 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:17:47 2025 +0200 Update renderMarkdownReport.js commit ea00540 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:16:39 2025 +0200 Update renderMarkdownReport.js commit 10c680f Author: MUI bot <[email protected]> Date: Tue Apr 22 16:16:21 2025 +0200 Update renderMarkdownReport.js commit ff49d9b Author: MUI bot <[email protected]> Date: Tue Apr 22 16:15:49 2025 +0200 remove loadComparison commit 41daac9 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:15:08 2025 +0200 refactor commit 3ae5757 Author: MUI bot <[email protected]> Date: Tue Apr 22 16:01:43 2025 +0200 fix url commit a6d5b75 Author: MUI bot <[email protected]> Date: Tue Apr 22 15:48:56 2025 +0200 WIP
commit 0fd6675 Author: MUI bot <[email protected]> Date: Wed Apr 23 16:11:36 2025 +0200 Update config.yml commit 760ceed Author: MUI bot <[email protected]> Date: Wed Apr 23 15:50:18 2025 +0200 @aws-sdk/credential-providers commit 2a5fe14 Author: MUI bot <[email protected]> Date: Wed Apr 23 15:39:24 2025 +0200 Update README.md commit dc04212 Author: MUI bot <[email protected]> Date: Wed Apr 23 15:30:25 2025 +0200 fixes commit c9f5fb3 Author: MUI bot <[email protected]> Date: Wed Apr 23 15:03:31 2025 +0200 Update pnpm-lock.yaml commit 6a4d0f5 Author: MUI bot <[email protected]> Date: Wed Apr 23 14:49:32 2025 +0200 upload functionality
bundle-size/package.json
Outdated
@@ -0,0 +1,21 @@ | |||
{ | |||
"name": "@mui/bundle-size", |
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.
"name": "@mui/bundle-size", | |
"name": "@mui/internal-bundle-size", |
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.
This is not publishable, nor a dependency of other packages. it's only here to allow us to have it able to declare its own dependencies. I think the naming conventions shouldn't apply, or we should create a new category of naming. In testing there are more such packages, e.g. to be able have typescript tests run on build artifacts instead of aliases. We've been naming some of those with @mui/test-
, in apps folder they are named with @app/
. How do you feel about this?
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.
Ok, I'm just removing the name altogether, problem solved 🙂
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.
Ah right, ok, my bad, I agree, it's a different class. I propose this then:

For example, if we apply this in https://github.com/mui/mui-private/pull/867/files#diff-cdf978f995619066e7c5a60f61cb6d14debaa5f59943afdffe682a9ea53b091aR16

this would become @mui/private-chat-uikit
. cc @hasdfa.
I'm just removing the name altogether, problem solved
Oh yeah, if it has no dependents, even better 👍
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.
this would become
@mui/private-chat-uikit
.
If it's marked as private in package.json, why does it need another marker in the name? I don't see the benefit, the goal with internal is to signal something to people that want to install it, but private packages aren't published in the first place.
Even with internal packages, it's not like we can ignore semver, our own packages depend on them with a caret range, so they must remain backwards compatible for a whole major anyway. So the signal serves little purpose to end users other than "there won't be guaranteed continuity across majors".
Extract a package for bundle size checking.
As a baseline in this PR we do
bundle-size-checker.config.mjs
to define entry points@mui/styles
from bundle size report<org>/<repo>/<commit>
, don't add branch nameTo explain the new strategy for storing snapshots: it will allow us to craft a comparison table just by providing PR number. We will fetch the pr info via api. From that result we can get
head.sha
andbase.sha
. we use those to get the two S3 urls to compare. We have the AWS secrets available on PRs so we may as well use them. This method of retrieval will be much easier than the one using circleci artifacts (circleci doesn't set cors policy on their API, which forces us to build a proxy that does).we're changing the S3 urls as follows:
new bundle size app