Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support PNPM and workspace setups with pod install (#36485)
Summary: With Metro symlink support coming soon, users will expect isolated `node_modules` resolution and hoisted `react-native` to work. Currently, we make some fragile assumptions in Ruby scripts about the location of `node_modules` packages - in particular `react-native` and `react-native-community/cli-platform-ios`. This change invokes `node` to resolve those paths, which should allow these scripts to work in any Node JS-compliant setup. There's a small (sub-second) performance penalty involved in invoking node, but two of these in the context of `pod install` seems reasonable. Also, these scripts [already invoke `node`](https://github.com/react-native-community/cli/blob/fb78fe8ea2fabe8e6d43f5042ecbb92e8e484e12/packages/cli-platform-ios/native_modules.rb#L26), so this isn't an additional dependency or point of failure. *This is probably the first Ruby I've written in >10 years, review suggestions welcome!* Changelog: [iOS][Added] - Support workspace and isolated setups with `pod install` Pull Request resolved: #36485 Test Plan: `pod install` succeeds on a PNPM workspace setup where `react-native-community/cli` was not at the path previously expected by this script. Reviewed By: cipolleschi Differential Revision: D44097440 Pulled By: robhogan fbshipit-source-id: 8300144888d8da019451b3f792b30eabc3a568cf
- Loading branch information