Skip to content

Commit

Permalink
Upgrade to React Native v0.57.1.
Browse files Browse the repository at this point in the history
Holding back from v0.57.2 because of issues there.

Skipping v0.56 because `jest` fails with a Babel config issue (with
or without the Babel config change in this commit), and at this point
v0.56 is old enough it's not worth trying to sort that out.

Both upgrade tools (react-native-git-upgrade and `react-native
upgrade`) failed to run, so instead this was a manual but thorough
old-school upgrade.  Not a problem, since we did that already for all
but the last upgrade.

Most of the changes required for the upgrade have been merged in a
variety of commits over the past few weeks; see #2789.  This commit
 * upgrades `react-native` and closely related dependencies;
 * updates the Flow config file to match RN upstream's template; and
 * adjusts the Babel config to work now that most things use Babel 7:
   move the preset back to our specific babelrc, and re-enable babelrcs.

Fixes #2788.
  • Loading branch information
borisyankov authored and gnprice committed Oct 31, 2018
1 parent cc64ebe commit 5295073
Show file tree
Hide file tree
Showing 5 changed files with 446 additions and 422 deletions.
11 changes: 3 additions & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"presets": [
"react-native"
],
"env": {
"production": {
"plugins": ["transform-remove-console"]
}
}
"presets": [
"module:metro-react-native-babel-preset"
]
}
5 changes: 4 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ sketchy-null
[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

# The main warning is "Unused suppression comment".
# Temporarily disabled to facilitate RN version upgrade.
#include_warnings=true
Expand Down Expand Up @@ -96,4 +99,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.67.0
^0.78.0
6 changes: 0 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
// https://babeljs.io/docs/en/config-files

module.exports = {
// Ignore the .babelrc; ours is incompatible for now with Babel 7,
// because the old `react-native` preset is.
babelrc: false,

presets: ['module:metro-react-native-babel-preset'],

env: {
production: {
plugins: ['transform-remove-console'],
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"lodash.unescape": "^4.0.1",
"lodash.union": "^4.6.0",
"lodash.uniqby": "^4.4.0",
"react": "16.3.2",
"react": "16.5.0",
"react-intl": "^2.4.0",
"react-native": "^0.55.4",
"react-native": "0.57.1",
"react-native-device-info": "^0.21.5",
"rn-fetch-blob": "^0.10.13",
"react-native-image-picker": "^0.26.10",
Expand All @@ -69,7 +69,7 @@
"react-navigation": "^1.5.12",
"react-navigation-redux-helpers": "^1.1.1",
"react-redux": "^5.0.7",
"react-test-renderer": "16.3.2",
"react-test-renderer": "16.5.0",
"redux": "^4.0.0",
"redux-action-buffer": "^1.2.0",
"redux-batched-actions": "^0.3.0",
Expand Down Expand Up @@ -105,7 +105,7 @@
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-native": "^3.2.1",
"eslint-plugin-spellcheck": "0.0.6",
"flow-bin": "^0.67.0",
"flow-bin": "0.78",
"flow-coverage-report": "^0.6.0",
"flow-typed": "^2.4.0",
"jest": "^22.4.4",
Expand Down
Loading

0 comments on commit 5295073

Please sign in to comment.