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(cli-config): include peer dependencies when finding dependencies #2423

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tido64
Copy link
Contributor

@tido64 tido64 commented Jun 21, 2024

Summary:

config currently ignores peerDependencies and instead reads devDependencies, leading to missing dependencies.

Resolves #2419.

Test Plan:

In any project, run the following:

yarn add @react-native-webapis/[email protected]
cd node_modules/@react-native-webapis/web-storage
yarn react-native config

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@tido64
Copy link
Contributor Author

tido64 commented Jun 21, 2024

cc @szymonrybczak @thymikee

Copy link
Collaborator

@szymonrybczak szymonrybczak left a comment

Choose a reason for hiding this comment

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

Thank you! Maybe let's add some tests? :)

@TMisiukiewicz
Copy link
Collaborator

I was trying to test it, but couldn't see any change in the config output until I installed any of peer dependencies as a dev dependency, am I missing something? Since peer dependencies are not installed by default, might it be the case where a dependency cannot be found in node_modules?

@tido64
Copy link
Contributor Author

tido64 commented Jul 4, 2024

I was trying to test it, but couldn't see any change in the config output until I installed any of peer dependencies as a dev dependency, am I missing something? Since peer dependencies are not installed by default, might it be the case where a dependency cannot be found in node_modules?

The repro steps include running config under the node_modules folder, so it's definitely not a case of missing dependencies. Alternative repro steps can be found in this PR: microsoft/rnx-kit#3200

@tido64
Copy link
Contributor Author

tido64 commented Sep 19, 2024

@TMisiukiewicz: Anything I can help with to move this forward?

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.

config ignores peerDependencies and instead reads devDependencies
4 participants