-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[codemod] Prepare the import path breaking change #11249
[codemod] Prepare the import path breaking change #11249
Conversation
275b40f
to
f4ed944
Compare
f4ed944
to
0c7b82e
Compare
import GridListTile from 'material-ui/GridListTile'; | ||
import GridList from 'material-ui/GridList'; | ||
import CircularProgress from 'material-ui/CircularProgress'; | ||
import MuiLinearProgress from 'material-ui/LinearProgress'; |
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.
Small glitch?
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.
It's a stress test. Why?
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.
None of the other imports are prefixed, so...
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.
People might be aliasing the modules:
import foo from 'bar'
or import { foo as bar} from 'baz'
.
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.
I still don't get why MuiLinearProgress
rather than just LinearProgress
, but whatever.
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.
It tests that the following transformation is done:
input
import { LinearProgress as MuiLinearProgress } from 'material-ui/Progress';
output
import MuiLinearProgress from 'material-ui/LinearProgress';
@tomscholz What's your concern here? |
The reaction was more of a "no-brainer", that's is also why I removed it. My concern was that, like you motioned, this way it's more verbose. After completely reading your initial comment, I now agree with the changes :) Sorry for the confusion 😅 -Tom |
Prepare the import path flattening breaking change, stuff like:
People should be able to upgrade without any pain with this codemod. This is definitely more verbose. Things to take into account:
For #9673