mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-02 22:41:18 +08:00
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