es-tooling / module-replacements-codemods

MIT License
188 stars 26 forks source link

fix: consider import removal to be dirty #89

Closed 43081j closed 3 months ago

43081j commented 3 months ago

When using the transformArrayMethod helper, we currently only consider the change to be dirty if call expressions we mutated.

This means imports of these modules will not be removed unless there are also associated call expressions.

This fix simply considers removal of the import to be a dirty change.

Fixes #88