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

[core] Update browser support versions #41568

Merged
merged 18 commits into from Mar 22, 2024

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Mar 20, 2024

See #40958

  • I started to work on this because of [material-ui][Button] Convert to support CSS extraction #41378
  • Run npx browserslist --mobile-to-desktop "> 0.2%, last 2 versions, Firefox ESR, not dead"
  • Remove legacy since we no longer support IE move to the next PR
  • Update node version from npx browserslist "maintained node versions"

@mui-bot
Copy link

mui-bot commented Mar 20, 2024

Netlify deploy preview

@material-ui/core: parsed: -1.08% 😍, gzip: -1.35% 😍
@material-ui/lab: parsed: -0.90% 😍, gzip: -1.14% 😍
@material-ui/system: parsed: -0.90% 😍, gzip: -0.90% 😍
@material-ui/unstyled: parsed: -2.88% 😍, gzip: -2.47% 😍
@mui/joy: parsed: -2.60% 😍, gzip: -2.98% 😍

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against c73c022

@Janpot
Copy link
Member

Janpot commented Mar 20, 2024

There is also a "legacy" env in the babel config

const useESModules = api.env(['regressions', 'legacy', 'modern', 'stable', 'rollup']);

@siriwatknp
Copy link
Member Author

Checking it again, I found several places related to IE11 to remove and I am afraid that this PR might be too big to review, so I will bring the legacy back and split the PR.

.browserslistrc Outdated
opera 76
safari 14
samsung 13.0
op_mob 73 # The op_mob 80 is unknown, so downgrading to 73
Copy link
Member

Choose a reason for hiding this comment

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

It does work in Base UI: https://github.com/mui/base-ui/blob/master/.browserslistrc
Have you tried updating caniuse-lite to the latest version?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me try

Copy link
Member Author

Choose a reason for hiding this comment

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

@michaldudak It really because of caniuse-lite. However, I don't see any usage of "caniuse-lite" in any of the package.json, so I make it work with pnpm up "caniuse-lite". Is it the correct way to upgrade implicit deps? cc @Janpot

Copy link
Member

Choose a reason for hiding this comment

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

Is it the correct way to upgrade implicit deps?

👍 Probably also want to run pnpm dedupe after. But I see no problem with this.

Copy link
Member

@Janpot Janpot Mar 20, 2024

Choose a reason for hiding this comment

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

@siriwatknp Actually, it seems to be

npx browserslist@latest --update-db

@danilo-leal danilo-leal changed the title Update browser support versions [core] Update browser support versions Mar 20, 2024
@danilo-leal danilo-leal added the core Infrastructure work going on behind the scenes label Mar 20, 2024
Comment on lines +84 to +86
safari 17.4
safari 17.3
safari 17.2
Copy link
Member

Choose a reason for hiding this comment

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

We agreed upon Safari 15.4 for v6 at #40958 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing that out. Will update it. cc @michaldudak Would you like to use the same list for Base UI?

Copy link
Member

Choose a reason for hiding this comment

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

We'll decide when it's closer to our release. Thanks for letting me know.

@Janpot
Copy link
Member

Janpot commented Mar 20, 2024

@siriwatknp Regarding node.js upgrade, have you seen the debates in mui/mui-x#10997 and #32546?

@siriwatknp
Copy link
Member Author

@siriwatknp Regarding node.js upgrade, have you seen the debates in mui/mui-x#10997 and #32546?

Thanks, I will remove nodejs update from this PR.

Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

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

Looks good. Last suggestion: If it makes sense, add a package.json script for updating the browserslist. And an instruction in the .browserslistrc file to run the script on major versions?

"update-browserslist": "browserslist@latest --update-db && browserslist@latest --mobile-to-desktop \"> 0.2%, last 2 versions, Firefox ESR, not dead\""

@LukasTy
Copy link
Member

LukasTy commented Mar 21, 2024

Looks good. Last suggestion: If it makes sense, add a package.json script for updating the browserslist. And an instruction in the .browserslistrc file to run the script on major versions?

@Janpot I'm not sure if this is better. 🤔
There is no easy way to leave comments in package.json and in this case, we have a custom decision for Safari support.
IMHO, the current solution is a bit more flexible.
Adding it to the major release instruction guide makes sense in any case, we can refer to the browserlisrc file and link a reference PR/issue. 👌

@Janpot
Copy link
Member

Janpot commented Mar 21, 2024

Fair enough. Some release instructions makes sense as well. Maybe it makes sense to mention the browserslist@latest --update-db command?

@LukasTy
Copy link
Member

LukasTy commented Mar 21, 2024

Fair enough. Some release instructions makes sense as well. Maybe it makes sense to mention the browserslist@latest --update-db command?

Oh yes, that makes sense. I've done it manually by removing the lock entry and rerunning the install. 🙈 😆
BTW, your example probably misses the npx at the start, because we do not list browserslist as a direct dependency. 🤔

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Small fix on the documentation. Otherwise LGTM 👍🏼

@siriwatknp
Copy link
Member Author

Fair enough. Some release instructions makes sense as well. Maybe it makes sense to mention the browserslist@latest --update-db command?

Added a note to run npx update-browserslist-db@latest after updating the browser versions. browserslist@latest --update-db is deprecated.

@siriwatknp siriwatknp enabled auto-merge (squash) March 22, 2024 04:02
@siriwatknp siriwatknp merged commit aff8f32 into mui:next Mar 22, 2024
21 checks passed
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 v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants