Prevent double application of the transform #176
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There were problems described e.g. in #167 wrt. the possible double application stemming from a not-exactly-good configuration. I think we should warn when this may happen and consider this an anti-pattern.
Example of such configuration:
If there's a path
react-native-vector-icons/lib/create-icon-set
then first application of the plugin will transform it to@expo/vector-icons/lib/create-icon-set
, and another application will result inreact-native-vector-icons/lib/create-icon-set
. This is actually causing trouble for users in some cases.I feel the message could be greatly improved. Any suggestions?
Also this may deserve a section in the README describing the problem, which we could refer to in the message.