Skip to content

Move direct dep on rnc/cli-tools to dev/peer deps #1803

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

Closed
wants to merge 1 commit into from

Conversation

friederbluemle
Copy link

This decouples @react-native-vector-icons/common from a specific version (currently ^17.0.0) of @react-native-community/cli-tools.

The only function currently used is resolveNodeModuleDir, which in this form first appeared in cli-tools 9.0.0 (which is why the peer dependency was set to ">=9.0.0").

Different version of React Native use different versions of @react-native-community/cli-tools. There should be no reason to pull in duplicates.

Copy link
Collaborator

@vonovak vonovak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I'm afraid that this isn't quite right;
this package should work even in projects without @react-native-community/cli-tools installed (expo projects). common depends on resolveNodeModuleDir imported from @react-native-community/cli-tools, and so @react-native-community/cli-tools should remain as a dependency. In the future we can remove that dependency by shipping resolveNodeModuleDir with the package.

For now what I believe we can do is to relax the range to be "@react-native-community/cli-tools": ">=17 <21" because we know the function is present in those versions

@johnf
Copy link
Collaborator

johnf commented Jul 21, 2025

Closing in favour of #1812

@johnf johnf closed this Jul 21, 2025
@friederbluemle friederbluemle deleted the cli-tools-dep branch July 24, 2025 02:41
@friederbluemle
Copy link
Author

Thanks for taking a look and for your comment @vonovak 👍

And thanks @johnf for removing the dependency altogether. I agree that's definitely the best option!

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.

3 participants