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: Creating cache for scoped packages #2089

Merged

Conversation

TMisiukiewicz
Copy link
Collaborator

Summary:

If package.json had scoped package name, e.g. @react-native/tester, it was unable to create CLI cache since fs.writeFileSync could not create it in a path that does not exist. With this PR it will recursively create necessary folder for scoped packages before trying to save the cache file.

Test Plan:

  1. Follow the contributing guide
  2. run node ./path/to/cli init AppName
  3. Run yarn ios and make sure app runs correctly
  4. Change name in package.json to @react-native/tester
  5. Run yarn ios and make sure app runs correctly
  6. Open ~/Library/Caches/react-native-cli/@react-native folder and make sure tester file exists

Checklist

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

@thymikee thymikee merged commit 95f7587 into react-native-community:main Sep 27, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants