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: import name reliance across various codemods #64

Merged

Conversation

MeLlamoPablo
Copy link
Contributor

This PR fixes reliance on hardcoded import names across various codemods. Developers may choose to import packages with non-standard names like var banana = require("array-includes"); in which our codemod would break the code by removing the import without replacing the usages.

This PR also updates tests to ensure the "non-standard import name" case is tested. I figured I'd update the existing tests in-place, since adding new cases feels like too much overhead/boilerplate but I'm happy to make the change if you'd rather have them as separate cases.

@MeLlamoPablo MeLlamoPablo force-pushed the fix/import-name-on-some-mods branch from d556b85 to 6deeb9d Compare July 23, 2024 17:12
@thepassle
Copy link
Collaborator

This is great man, I had this on my list, thanks for the PR!

@thepassle thepassle merged commit 2be948c into es-tooling:main Jul 23, 2024
3 checks passed
@MeLlamoPablo MeLlamoPablo deleted the fix/import-name-on-some-mods branch July 23, 2024 17:21
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