Open
Description
Steps to reproduce
Steps:
- Import grey from @mui/material/colors
import { grey } from @mui/material/colors;
- npx @mui/codemod@latest v5.0.0/top-level-imports
- The import will change to
import { grey } from '@mui/material';
Current behavior
Steps:
- Import grey from @mui/material/colors
import { grey } from @mui/material/colors;
- npx @mui/codemod@latest v5.0.0/top-level-imports
- The import will change to
import { grey } from '@mui/material';
Expected behavior
npx @mui/codemod@latest v5.0.0/top-level-imports <path>
should not change imports to those that are not valid
Context
No response
Your environment
npx @mui/envinfo
System:
OS: macOS 15.1.1
Binaries:
Node: 21.2.0 - ~/node_modules/.bin/node
npm: 10.7.0 - ~/.nvm/versions/node/v18.20.3/bin/npm
pnpm: Not Found
Browsers:
Chrome: 132.0.6834.83
Edge: 131.0.2903.147
Safari: 18.1.1
npmPackages:
@emotion/react: ^11.10.4 => 11.14.0
@emotion/styled: ^11.10.4 => 11.14.0
@mui/base: 5.0.0-beta.66
@mui/core-downloads-tracker: 5.16.11
@mui/icons-material: ^5.8.4 => 5.16.11
@mui/lab: ^5.0.0-alpha.95 => 5.0.0-alpha.174
@mui/material: ^5.10.1 => 5.16.11
@mui/material-nextjs: ^5.15.6 => 5.16.8
@mui/private-theming: 5.16.8
@mui/styled-engine: 5.16.8
@mui/styles: ^5.9.3 => 5.16.11
@mui/system: 5.16.8
@mui/types: 7.2.19
@mui/utils: 5.16.8
@mui/x-data-grid: 6.20.4
@mui/x-data-grid-pro: ^6.0.4 => 6.20.4
@mui/x-date-pickers: 6.20.2
@mui/x-date-pickers-pro: ^6.0.0 => 6.20.2
@mui/x-license-pro: 6.10.2
@types/react: ^18.0.28 => 18.3.16
react: ^18.2.0 => 18.3.1
react-dom: ^18.2.0 => 18.3.1
typescript: ^4.9.5 => 4.9.5
Search keywords: codemod, top-level-import, color imports