Skip to content

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
@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.

3 participants