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

fix(codemods/react/19/replace-create-factory): resolve issues in replace-create-factory codemod #43

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

amirabbas-gh
Copy link
Collaborator

📚 Description

This PR addresses and resolves the following issues in the replace-create-factory codemod located in react/19:

  1. Fix test fixtures: Updated the test fixtures to align with the expected behavior of the replace-create-factory codemod.

  2. Handle possible null in findPatterns: Fixed a bug where findPatterns could return null, causing runtime errors during execution.


🧪 Test Plan

  1. Run tests for the replace-create-factory codemod:
    npm test
  2. Verify that all test fixtures match the updated codemod output.
  3. Confirm no runtime errors occur when findPatterns encounters null scenarios.

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.

2 participants