Skip to content

Conversation

@amirabbas-gh
Copy link
Collaborator

📚 Description

Previously, the issue of TypeScript support was addressed in this PR: #9, which resolved problems related to detecting imports like * as React, adding support for TypeScript structures, and fixing MouseEvent handling.

In this PR, I added additional test cases specifically to test files that include the satisfies keyword. These tests aim to ensure that the update-react-imports codemod works as expected when handling TSX files containing satisfies. This ensures compatibility with more advanced TypeScript features and strengthens overall reliability.

🔗 Linked Issue

Fixes #324

🧪 Test Plan

  • Added the following test cases:
    • A TSX file using the satisfies keyword to validate that imports are updated correctly.
    • A TSX file with nested satisfies expressions to ensure the codemod handles complex scenarios.
  • Verified all existing tests pass without regressions.

Steps to manually test:

  1. Run the update-react-imports codemod on a sample TypeScript TSX file containing the satisfies keyword.
  2. Verify that the imports are updated correctly and that the syntax remains valid.

@alexbit-codemod alexbit-codemod merged commit 2bda70c into main Dec 18, 2024
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.

[update-react-imports] fails to transform files that contain the satisfies keyword

3 participants