magicismight / react-native-root-siblings

A sibling elements manager.
MIT License
706 stars 134 forks source link

fix: add missing peer dependency stanza #68

Closed SimenB closed 3 years ago

SimenB commented 3 years ago

To match your dependency: https://github.com/magicismight/static-container/blob/adadb9eb232ba2c01ba68bd93eb9a710a54c8b03/package.json#L16-L18

sunnylqm commented 3 years ago

Correct me if I am wrong, shouldn't peerDependency be added to package.json of your main project?

SimenB commented 3 years ago

My project is not the one depending on prop-types, it's this project's dependent. So it should either provide it via dependencies or add it to peerDependencies to have consumers (which is my project) add the dependency

sunnylqm commented 3 years ago

I do see a warning like this:

warning "react-native-root-siblings > static-container@1.5.1" has unmet peer dependency "prop-types@^15.5.10".

Which would prompt the user to add to their dependencies right? And it seems totally fine to just ignore that warning. What is the expected output for this PR? Is there any other issues other than this warning?

I was actually considering inline this static-container and remove prop-types since it's just a few lines of code

SimenB commented 3 years ago

Yes, but it's not the consumer that doesn't fulfil the peer dep, it's react-native-root-siblings. Merging this PR would make your assumption correct - it's up to the user to supply it.

sunnylqm commented 3 years ago

Thanks!