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] Rename packages #28049

Merged
merged 37 commits into from
Sep 1, 2021
Merged

[core] Rename packages #28049

merged 37 commits into from
Sep 1, 2021

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Aug 30, 2021

BREAKING CHANGE

The packages were renamed. Here is the mapping between the old and new names:

@material-ui/core -> @mui/material
@material-ui/system -> @mui/system
@material-ui/unstyled -> @mui/core
@material-ui/styles -> @mui/styles
@material-ui/icons -> @mui/icons-material
@material-ui/lab -> @mui/lab
@material-ui/types -> @mui/types
@material-ui/styled-engine -> @mui/styled-engine
@material-ui/styled-engine-sc ->@mui/styled-engine-sc
@material-ui/private-theming -> @mui/private-theming
@material-ui/codemod -> @mui/codemod
@material-ui/docs -> @mui/docs
@material-ui/envinfo -> @mui/envinfo

Step 2 of #27666

  • the PR does not do any changes in the folder structures
  • in the packages/material-ui-codemod for now I didn't do any replacements expect changing the name of the package from @material-ui/codemod to @mui/codemod. (it will be handled in a follow up PR by @siriwatknp)
  • there aren't any changes in the CHANGELOG files
  • there aren't any changes done regarding renaming of the data-grid packages

Things we need to resolve.

  • Is it ok that we renamed the @material-ui/styles -> @mui/styles package? ✅
  • Should the @material-ui/lab be renamed to @mui/lab or @mui/lab-material?
  • else?

@mnajdova mnajdova changed the title Feat/rename packages [core] Rename packages Aug 30, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Aug 30, 2021

Details of bundle changes (experimental)

Generated by 🚫 dangerJS against 32d729a

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 30, 2021
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 30, 2021
@michaldudak
Copy link
Member

🎉 Over 3600 changed files, you're going for the record :)

the PR does not do any changes in the folder structures

Do you intend to do a follow-up PR to rename the directories?

@mnajdova
Copy link
Member Author

Do you intend to do a follow-up PR to rename the directories?

Yes, I think it will make sense, I just don't want to do any changes that are not necessary with his PR :D

@mnajdova
Copy link
Member Author

Each rebase with the next will be fatal 😭

@mnajdova
Copy link
Member Author

@mnajdova just realized about the lab. I think it is now @mui/lab but should it be @mui/material-lab because it is material design implementation?

Good question. I don't know, to be honest I think it's enough to have one lab package to test out new things, rather than creating a new one for each design system (but it may be problematic with the dependencies). I don't have strong preference, but maybe I would lean towards agreeing with you and renaming it to @mui/lab-material (I've added the material as a suffix to follow @mui/icons-material)

@mnajdova mnajdova marked this pull request as ready for review August 30, 2021 15:35
@mnajdova
Copy link
Member Author

I can't believe I have a green build 😄 @mui-org/core please have a look. Also, we need to decide on the two open questions from the PR description. I would recommend reviewing per commit (probably it's the only way possible)

@mnajdova mnajdova requested a review from a team August 30, 2021 15:36
@eps1lon
Copy link
Member

eps1lon commented Aug 31, 2021

Would like to wait for #28060 and see how #28060 fares against our own code base.

This would help reviewability. And I want to make sure the bundle tracking works across package rename. So holding this until #28060 is merged.

@eps1lon eps1lon added the on hold There is a blocker, we need to wait label Aug 31, 2021
@mnajdova
Copy link
Member Author

mnajdova commented Aug 31, 2021

Would like to wait for #28060 and see how #28060 fares against our own code base.

This would help reviewability. And I want to make sure the bundle tracking works across package rename. So holding this until #28060 is merged.

@eps1lon I just approved #28060, looks like all comments were resolved. Should I merge it and rebase this one?

How should we handle the bundle size?

@eps1lon
Copy link
Member

eps1lon commented Aug 31, 2021

The names in scripts/sizeSnapshot/webpack.config.js just need to stay the same. We can update the view later to avoid confusion.

@mnajdova
Copy link
Member Author

mnajdova commented Aug 31, 2021

The names in scripts/sizeSnapshot/webpack.config.js just need to stay the same. We can update the view later to avoid confusion.

Done with 390de56


@eps1lon looks like it fails now 😕 https://dev.azure.com/mui-org/Material-UI/_build/results?buildId=32546&view=logs&j=5ab4dc89-fdbd-5515-5007-71e9b3b221f6&t=865800ee-c958-58a0-9938-e205624d5850

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

bundling workflow failing is expected right now.
profile workflow is fine (same failures on next): https://app.circleci.com/pipelines/github/mui-org/material-ui/51561/workflows/ce073148-5f94-4651-9617-b73ff9b32131
benchmark workflow is green: https://dev.azure.com/mui-org/Material-UI/_build/results?buildId=32586&view=logs&jobId=9ef21fd1-5d60-5fa4-f8b2-6dc79e173863

Will revert the changes to translated markdown files (since they'll be invalidated anyway).

As a follow-up, I'll update the bundle size tracking view to display the new package names properly and follow up with some clearer documentation in size:snapshot.

eps1lon and others added 3 commits September 1, 2021 09:28
```bash
~/D/p/m/fork (feat/rename-packages|✔) $ git co next -- '*-de.md'
~/D/p/m/fork (feat/rename-packages|●68) $ git co next -- '*-es.md'
~/D/p/m/fork (feat/rename-packages|●136) $ git co next -- '*-fr.md'
~/D/p/m/fork (feat/rename-packages|●202) $ git co next -- '*-ja.md'
~/D/p/m/fork (feat/rename-packages|●270) $ git co next -- '*-pt.md'
~/D/p/m/fork (feat/rename-packages|●339) $ git co next -- '*-ru.md'
~/D/p/m/fork (feat/rename-packages|●406) $ git co next -- '*-zh.md'
```
```bash
~/D/p/m/fork (feat/rename-packages|✔) $ git co next -- '*-de.json'
~/D/p/m/fork (feat/rename-packages|●1) $ git co next -- '*-es.json'
~/D/p/m/fork (feat/rename-packages|●2) $ git co next -- '*-fr.json'
~/D/p/m/fork (feat/rename-packages|●3) $ git co next -- '*-ja.json'
~/D/p/m/fork (feat/rename-packages|●4) $ git co next -- '*-pt.json'
~/D/p/m/fork (feat/rename-packages|●5) $ git co next -- '*-ru.json'
~/D/p/m/fork (feat/rename-packages|●6) $ git co next -- '*-zh.json'
~/D/p/m/fork (feat/rename-packages|●7) $ git co next -- '*-zh.json'
```
@mnajdova mnajdova removed the on hold There is a blocker, we need to wait label Sep 1, 2021
@mnajdova mnajdova merged commit 0979e6a into mui:next Sep 1, 2021
@Jack-Works
Copy link
Contributor

Please add npm/yarn/pnpm alias as a possible migration way. I use the following command to defer the renaming work in our codebase.

$ pnpm add @material-ui/system@npm:@mui/system@5.0.0-rc.0 @material-ui/lab@npm:@mui/lab@5.0.0-alpha.45 @material-ui/core@npm:@mui/material@5.0.0-rc.0 @material-ui/icons@npm:@mui/icons-material@5.0.0-rc.0

@Jack-Works
Copy link
Contributor

It also works for notistack

image

@Jack-Works
Copy link
Contributor

In addition, I believe we will need to temporary disable the notistack example again, until it's updated to the new packages.

It did. iamhosseindhv/notistack#423 1.0.6-next.3

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 14, 2021

I have added the counterpart to these changes in the v4 migration guide with #27912. I believe it hasn't been done: https://next--material-ui.netlify.app/guides/migration-v4/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants