Skip to content
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

[system][core] Standardize index pattern #41574

Merged
merged 5 commits into from
Mar 20, 2024

Conversation

DiegoAndai
Copy link
Member

@DiegoAndai DiegoAndai commented Mar 20, 2024

Part of #30671

Standardize index pattern in @mui/system package, in which all exports have the build structure

<export>
|- <export>.js
|- <export>.d.ts
|- index.js
|- index.d.ts

This eases the move into using the exports field. This pattern is followed in all other packages except @mui/icons-material, an exception as we'll move it to ESM only.

Breaking changes

Added here: https://deploy-preview-41574--material-ui.netlify.app/system/migration/migration-v5/

  • The @mui/system package no longer has CJS in its root, but ESM instead, which was previously inside the esm/ build. The CJS code is moved to the node/ build.
  • Renamed cssGrid's function GridProps type to CssGridProps, as GridProps was already being used for the Grid component.

@DiegoAndai DiegoAndai added package: system Specific to @mui/system core Infrastructure work going on behind the scenes labels Mar 20, 2024
@DiegoAndai DiegoAndai self-assigned this Mar 20, 2024
@DiegoAndai DiegoAndai changed the title [mui-system] Standardize system index pattern [mui-system] Standardize index pattern Mar 20, 2024
@DiegoAndai DiegoAndai changed the title [mui-system] Standardize index pattern [mui-system][core] Standardize index pattern Mar 20, 2024
@mui-bot
Copy link

mui-bot commented Mar 20, 2024

Netlify deploy preview

@material-ui/core: parsed: -3.46% 😍, gzip: -2.75% 😍
@material-ui/lab: parsed: -4.27% 😍, gzip: -3.36% 😍

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 95f2bc8

@DiegoAndai DiegoAndai force-pushed the standardize-system-index-pattern branch from e3787c0 to bbf1791 Compare March 20, 2024 13:36
@DiegoAndai DiegoAndai changed the title [mui-system][core] Standardize index pattern [system][core] Standardize index pattern Mar 20, 2024
@DiegoAndai DiegoAndai force-pushed the standardize-system-index-pattern branch from bbf1791 to e2de1a8 Compare March 20, 2024 14:32
@DiegoAndai
Copy link
Member Author

I'm not sure why the @material-ui/core and @material-ui/lab package sizes dropped. I did change some snapshot targets but only System ones.

@DiegoAndai DiegoAndai force-pushed the standardize-system-index-pattern branch from e2de1a8 to 95f2bc8 Compare March 20, 2024 15:15
@DiegoAndai DiegoAndai marked this pull request as ready for review March 20, 2024 15:28
@DiegoAndai DiegoAndai requested a review from brijeshb42 March 20, 2024 15:29
@DiegoAndai DiegoAndai assigned Janpot and unassigned Janpot Mar 20, 2024
@DiegoAndai DiegoAndai requested review from Janpot and siriwatknp March 20, 2024 15:29
Copy link
Contributor

@brijeshb42 brijeshb42 left a comment

Choose a reason for hiding this comment

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

LGTM

@DiegoAndai DiegoAndai removed the request for review from siriwatknp March 20, 2024 19:46
@DiegoAndai DiegoAndai merged commit 3322cbb into mui:next Mar 20, 2024
22 checks passed
@DiegoAndai DiegoAndai deleted the standardize-system-index-pattern branch March 20, 2024 19:47
Comment on lines +1 to +2
'use client'
export * from './colorManipulator'
Copy link
Member

Choose a reason for hiding this comment

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

We are missing semicolons in these files, how did the CI pass? 😕 I created #41636 to address this.

Copy link
Member

Choose a reason for hiding this comment

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

how did the CI pass?

https://app.circleci.com/pipelines/github/mui/material-ui/124681/workflows/7d30bb8c-f2b5-4b56-ad78-842cebb353d2/jobs/672302/parallel-runs/0/steps/0-105

> @mui/[email protected] prettier /tmp/material-ui
> pretty-quick --ignore-path .eslintignore "--check"

🔍  Finding changed files since git revision null.
🎯  Found 0 changed files.
✅  Everything is awesome!

I believe we're hitting prettier/pretty-quick#127
We should probably add the --branch flag to pretty-quick?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change core Infrastructure work going on behind the scenes package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants