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

feat(init): add --yarn-config-options option #2273

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

szymonrybczak
Copy link
Collaborator

Summary:

In React Native CI when initialising project all packages are downloaded from local server, recently we introduced Yarn v3, to make Yarn v3 working with local packages we need to pass the server destination inside Yarn config file .yarnrc.yml. In this PR I created an option that accepts key=value format value, which is then passed via yarn config set when installing template packages in /tmp/ directory.

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js init --yarn-config-options npmRegistryServer="http://localhost:4873" --verbose
  1. You should see in console log from Yarn:
success Set "npmRegistryServer" to "http://localhost:4873".

Checklist

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

@thymikee
Copy link
Member

Let's document this

@github-actions github-actions bot added the docs Documentation change label Jan 23, 2024
@thymikee thymikee merged commit af8c021 into main Jan 23, 2024
10 checks passed
@thymikee thymikee deleted the feat/init/add-yarn-config-options branch January 23, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation change feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants