react-native/react-native-git-upgrade
Yao Bin Then e53a8f7097 Colorize filenames with conflicts when upgrading
Summary:
Visually show files merged with conflicts when running `react-native-git-upgrade`.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

After running `react-native-git-upgrade`, files with conflicts are not immediately recognised visually. With this patch, files with conflicts are highlighted in red.

![image](https://user-images.githubusercontent.com/771989/36086385-fc183baa-1006-11e8-8862-0867b82b7ec1.png)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
[CLI] [ENHANCEMENT] [react-native-git-upgrade/cliEntry.js] - Print files with conflicts in red.
Closes https://github.com/facebook/react-native/pull/17947

Differential Revision: D6977042

Pulled By: hramos

fbshipit-source-id: 3c67561ea3acbee227a7a0cf42857af4fb75c75c
2018-02-13 09:19:11 -08:00
..
README.md Fix documentation links 2018-01-09 15:46:47 -08:00
checks.js Fix the parse error when specifying an unknown version. 2016-12-02 08:28:32 -08:00
cli.js Revert D5409825: [RN] Convert easy files to Prettier 2017-07-12 19:23:58 -07:00
cliEntry.js Colorize filenames with conflicts when upgrading 2018-02-13 09:19:11 -08:00
index.js Revert D5409825: [RN] Convert easy files to Prettier 2017-07-12 19:23:58 -07:00
package.json Fix react-native-git-upgrade cache busting 2017-02-18 16:45:50 -08:00
yarn.js Revert D5409825: [RN] Convert easy files to Prettier 2017-07-12 19:23:58 -07: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