Skip to content

Conversation

@amirabbas-gh
Copy link
Collaborator

@amirabbas-gh amirabbas-gh commented Dec 9, 2024

📚 Description

This PR creates an evolution of update-react-imports.js transform file within the react-codemod repository by transforming it to TS and adding some tests and making it compatible with Codemod platform.

  • The codemod automates the migration of import paths in React code, making it easier to update to newer React versions or import structures.
  • This codemod is necessary to resolve issues related to React import updates that are not currently available in the Codemod Commons registry.

🔗 Linked Issue

Fixes #326

🧪 Test Plan

  • This codemod is not yet available in the Codemod registry.
  • To verify the changes, run the codemod on a React project with outdated import paths and check if the imports are correctly updated.
  • Ensure that the codemod works as expected by testing with various React versions.

📄 Documentation to Update

  • Move upload-react-imports transform into codemod structure and write some test cases
  • Added upload-react-imports codemod in the React directory.

@amirabbas-gh amirabbas-gh changed the title add: add upload-react-imports codemod into react directory feat: create upload-react-imports codemod into react directory Dec 9, 2024
Copy link
Member

Choose a reason for hiding this comment

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

Please remove these .DS_Store files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@alexbit-codemod
Copy link
Contributor

also get rid of the license file... @amirabbas-gh

@alexbit-codemod alexbit-codemod changed the title feat: create upload-react-imports codemod into react directory refactor: migrate upload-react-imports codemod from JS to TS and make it Codemod-compatible. Dec 9, 2024
@amirabbas-gh
Copy link
Collaborator Author

also get rid of the license file... @amirabbas-gh

@alexbit-codemod I did it.

@amirabbas-gh amirabbas-gh merged commit 3b33430 into main Dec 9, 2024
@amirabbas-gh amirabbas-gh changed the title refactor: migrate upload-react-imports codemod from JS to TS and make it Codemod-compatible. refactor: migrate update-react-imports codemod from JS to TS and make it Codemod-compatible. Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

react/update-react-imports could not be recognized when running

4 participants