react-native/react-native-git-upgrade
Nicolas Cuillery 927b356245 Fix react-native-git-upgrade cache busting
Summary:
**Motivation**

This PR fixes #12420.

For the first time, the version 0.41.2 includes a change in the generator (see #12162). The [require cache busting](https://github.com/facebook/react-native/blob/master/react-native-git-upgrade/cliEntry.js#L157-L163) of `react-native-git-upgrade`, designed to face this situation , was ineffective.

The entry in `require.cache` is the file path including the `.js` extension. We have to delete this entry with the same key.

**Test plan**

- Publish `react-native-git-upgrade` to Sinopia,
- Follow the reproduction steps of #12420
- 👉 The name of the app shouldn't be changed
Closes https://github.com/facebook/react-native/pull/12422

Differential Revision: D4585549

Pulled By: mkonicek

fbshipit-source-id: 508ac925c17d02b7739d47f9351a5aa336589f2e
2017-02-18 16:45:50 -08:00
..
README.md Git upgrade: Tweak wording 2016-12-05 06:28:34 -08:00
checks.js Fix the parse error when specifying an unknown version. 2016-12-02 08:28:32 -08:00
cli.js New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
cliEntry.js Fix react-native-git-upgrade cache busting 2017-02-18 16:45:50 -08:00
index.js Use Yarn if available 2016-12-02 00:13:32 -08:00
package.json Fix react-native-git-upgrade cache busting 2017-02-18 16:45:50 -08:00
yarn.js Git upgrade: Tweak README, bump version, fix a bug 2016-12-05 05:58:29 -08:00

README.md

React Native Git Upgrade

This tool makes upgrading your apps to a new version of React Native easier than the stock react-native upgrade command.

It uses Git under the hood to automatically resolve merge conflicts in project templates (native iOS and Android files, .flowconfig etc.). These conflicts happen when a new React Native version introduces changes to those files and you have local changes in those files too, which is quite common.

Usage

See the Upgrading docs on the React Native website.

Basic usage:

$ npm install -g react-native-git-upgrade
$ cd MyReactNativeApp
$ react-native-git-upgrade