react-native/react-native-git-upgrade
Martin Konicek b20b20656a More accurate check for latest version
Summary:
When testing `react-native-git-upgrade` locally I noticed a warning:

    A more recent version of "react-native-git-upgrade" has been found:
    Current: 0.1.0
    Latest: 0.0.1

See https://www.npmjs.com/package/react-native-git-upgrade

This won't happen to a lot of people but better fix the warning. Also, if the check for updates fails, don't crash - the check for updates is not critical to the tool working.

Also, slightly updated one error message.

**Test plan (required)**

Installed `react-native-git-upgrade` locally, ran it inside an app folder (RN 0.29).

Didn't see the wrong "more recent version" warning anymore.

Tried making `checkForUpdates` fail by adding some dummy code: `semver.foo()`. Saw a warning but the process continued:

    git-upgrade WARN Check for latest version failed semver.foo is not a function

Saw a more descriptive error message:

    git-upgrade ERR! Error: react-native version in "package.json" (0.29.0) doesn't match the installed version in "node_mod
Closes https://github.com/facebook/react-native/pull/11188

Differential Revision: D4244002

Pulled By: bestander

fbshipit-source-id: 772044750a933663cb516201d09e2873462cca4a
2016-11-29 06:13:28 -08:00
..
checks.js More accurate check for latest version 2016-11-29 06:13:28 -08:00
cli.js New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
cliEntry.js More accurate check for latest version 2016-11-29 06:13:28 -08:00
index.js New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
package.json New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00