Skip to content

Commit

Permalink
deps: Upgrade to React Native v0.63.
Browse files Browse the repository at this point in the history
In this commit:

- Update "react-native", "react", and "flow-bin" in package.json.
  Run `pod update Folly --no-repo-update` to move past an error on
  the `pod install` step of the `postinstall` script [1]. After this
  step, the Podfile.lock file is much changed, as expected. There is
  also a change in the project.pbxproj file.

- Update .flowconfig with the new Flow version, and address one new
  warning by removing a `$FlowFixMe` that we shouldn't have needed
  in the first place. (Usually this part is much more complicated!)

- Update "jest-expo" in package.json, to oblige a peer-dependency
  constraint on "react".

- TODO: Do something about react-native-cameraroll.

- Make a change to the Podfile, according to
  facebook/react-native@a35efb940.

  - Instead of spelling out all the Pods from RN (all the
    non-Flipper-related Pods, that is -- we'll handle the Flipper
    ones in a later commit), call a function defined by React
    Native, `use_react_native!`, newly exposed in RN v0.63.

  - Since we're still using React-RCTPushNotification (pending the
    resolution of zulip#4163), take care to keep
    React-RCTPushNotification. It apparently hasn't yet been removed
    from React Native, but it understandably isn't handled by
    `use_react_native!`.

See the PR thread for the list of RN commits affecting the template
app and how we've chosen to propagate the template-app changes into
our project.

See also the RN v0.62 -> v0.63 upgrade guide [2], which gives a
visual representation of the changes to the template app. It mostly
matches the changes we've made; important deviations should have
been explained in the commit list in the PR thread [3].

[1] TODO: Link to explanation on PR.

[2] https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.4

[3] As always, the guide does show some changes that don't appear in
    the template app. I think this noise is an effect of how the
    guide is generated (with react-native-community/rn-diff-purge)
    and can safely be ignored. It's a diff between a fresh app
    created with `react-native init --version=$CURRENT` and a fresh
    app created with `react-native init --version=$NEXT`, for the
    selected values of `$CURRENT` and `$NEXT`. In particular:

    - I believe that some dependency version range changes in
      package.json, including for @babel/core and @babel/runtime,
      might be caused by different versions for those dependencies
      being available when the `react-native init` commands are run.

    - Some changes in ordering and unique ID values always seem to
      show up in the project.pbxproj file.

Fixes: zulip#4245
  • Loading branch information
chrisbobbe committed Jan 20, 2021
1 parent 00a87d7 commit 5e00b32
Show file tree
Hide file tree
Showing 7 changed files with 447 additions and 336 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
suppress_comment=\\(.\\|\n\\)*\\$FlowMigrationFudge

[version]
^0.113.0
^0.122.0
30 changes: 2 additions & 28 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# (project > ZulipMobile > Info in Xcode)
platform :ios, '11.0'

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'

Expand Down Expand Up @@ -51,38 +52,11 @@ end

target 'ZulipMobile' do
# Pods from React Native
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
use_react_native!

pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
# This is deprecated upstream; removing it is #4115. See
# https://reactnative.dev/docs/pushnotificationios.
pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

# "Autolinking": automatically link pods that depend on React
# Native, unless omitted in our own `react-native.config.js`.
Expand Down
Loading

0 comments on commit 5e00b32

Please sign in to comment.