-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[utils] Move @material-ui/core/utils to @material-ui/utils #23203
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
Conversation
|
@material-ui/core: parsed: -0.21% 😍, gzip: -0.02% 😍 |
|
I really am sorry about the +190 files changed 😢 but most of them should be just imports changes, so hopefully it won't be too hard for reviewing... |
| import Avatar from '@material-ui/core/Avatar'; | ||
| import { withStyles } from '@material-ui/core/styles'; | ||
| import { capitalize } from '@material-ui/core/utils'; | ||
| import { capitalize } from '@material-ui/utils'; |
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.
What do you think about keeping the same imports as before but simply having core re-export utils? It would:
- remove the need for a codemod
- remove the need for developers to import from the utils package
- solve the release fail (true until we finish the migration of pickers in the lab)
- reduce the git diff
| import { capitalize } from '@material-ui/utils'; | |
| import { capitalize } from '@material-ui/core/utils'; |
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.
Yeah I think that is much safer option :) will probably open new PR with only these changes
|
Closing in favor of #23264 as proposed in #23203 (comment) |
This PR prepares unnecessary changes for introducing the
@material-ui/unstyledpackage. It moves the@material-ui/core/utilsutilities to@material-ui/utils, so that those can be reused in the new package.Exception from this rule is the
createSvgIconutility that was moved to'@material-ui/core/SvgIcon'because it depends on theSvgIconcomponent.As part of the PR there is a codemod prepared (heavily inspired by the optimal-imports codemod), that basically replaces the old imports from
@material-ui/core/utilsto@material-ui/utils.Example:
will be transformed to
The netlify build is failing because of the following:
I am open to ideas how to fix this.