Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix react-native-git-upgrade by get package.json instead of selective…
… field Summary: Explain the **motivation** for making this change. What existing problem does the pull request solve? To fixes facebook#11330 and fixes facebook#11334 Regarding to this command (using in `react-native-git-upgrade` - [cliEntry.js#L261](https://github.com/facebook/react-native/blob/master/react-native-git-upgrade/cliEntry.js#L261)) ```bash npm view react-native@latest peerDependencies.react version --json ``` The result from this command are not consistent across a different npm versions. We better get a whole `package.json` file by calling (remove field and subfield option) ``` npm view react-native@latest --json ``` **Test plan (required)** **Setup** - Publish `react-native-git-upgrade` to `sinopia` - `npm install -g react-native-git-upgrade` - Test against multiple npm versions (`2.15.8` or `3.7.5` or `3.10.10` or ` 4.0.3`) - `react-native init AwesomeApp --version 0.38.0 && cd AwesomeApp` - `react-native-git-upgrade` and `react-native-git-upgrade 0.39.0` should be working properly --- Closes facebook#11348 Differential Revision: D4305894 Pulled By: mkonicek fbshipit-source-id: 36ea7846926b424f4dd63c77b47db5cb69285027
- Loading branch information