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

top-level-imports v5 changing color imports #45051

Open
CalebJamesStevens opened this issue Jan 17, 2025 · 2 comments
Open

top-level-imports v5 changing color imports #45051

CalebJamesStevens opened this issue Jan 17, 2025 · 2 comments
Labels
bug 🐛 Something doesn't work package: codemod Specific to @mui/codemod ready to take Help wanted. Guidance available. There is a high chance the change will be accepted v5.x waiting for 👍 Waiting for upvotes

Comments

@CalebJamesStevens
Copy link

CalebJamesStevens commented Jan 17, 2025

Steps to reproduce

Steps:

  1. Import grey from @mui/material/colors
    import { grey } from @mui/material/colors;
  2. npx @mui/codemod@latest v5.0.0/top-level-imports
  3. The import will change to import { grey } from '@mui/material';

Current behavior

Steps:

  1. Import grey from @mui/material/colors
    import { grey } from @mui/material/colors;
  2. npx @mui/codemod@latest v5.0.0/top-level-imports
  3. 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

@CalebJamesStevens CalebJamesStevens added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 17, 2025
@siriwatknp
Copy link
Member

Thank you for reporting the issue.

@siriwatknp siriwatknp added bug 🐛 Something doesn't work package: codemod Specific to @mui/codemod v5.x and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 20, 2025
@DiegoAndai DiegoAndai added waiting for 👍 Waiting for upvotes ready to take Help wanted. Guidance available. There is a high chance the change will be accepted labels Jan 23, 2025
@DiegoAndai
Copy link
Member

I added the ready to take label in case anyone wants to work on this before the team gets to it. Please reach out if you're interested, I'll gladly guide you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work package: codemod Specific to @mui/codemod ready to take Help wanted. Guidance available. There is a high chance the change will be accepted v5.x waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

3 participants