Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to React Native 0.56 & 0.57 #2789

Merged
merged 7 commits into from Nov 1, 2018
Merged

Upgrade to React Native 0.56 & 0.57 #2789

merged 7 commits into from Nov 1, 2018

Commits on Oct 31, 2018

  1. style: Use RN upstream's narrower version of an over-broad style type.

    It's less over-broad than ours in one very nice way: for every
    legitimate style prop, it specifies the right type for its values
    (right down to the allowed set of values for things like
    `flexDirection`), and will cause the type-checker to complain on an
    ill-typed value.
    gnprice committed Oct 31, 2018
    Configuration menu
    Copy the full SHA
    1712f10 View commit details
    Browse the repository at this point in the history
  2. style: Add fixmes for a few issues the RN/Flow upgrade turns up.

    Without this change, after the upcoming upgrades Flow gives error
    messages here.  If I understand the error messages correctly (though
    I'm not confident I do), the point is that these particular components
    insist on their props being read-only -- and while ViewStyleProp and
    friends make that guarantee, DangerouslyImpreciseStyleProp doesn't.
    
    These will be resolved properly when we eventually go about and narrow
    down uses of DangerouslyImpreciseStyleProp to the more specific types.
    Until then, just leave these fixmes.
    gnprice committed Oct 31, 2018
    Configuration menu
    Copy the full SHA
    cc64ebe View commit details
    Browse the repository at this point in the history
  3. Upgrade to React Native v0.57.1.

    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 zulip#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 zulip#2788.
    borisyankov authored and gnprice committed Oct 31, 2018
    Configuration menu
    Copy the full SHA
    5295073 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2018

  1. flow-typed: Update following RN v0.57.1 upgrade.

    Typically we'd do this in tandem with the dependency upgrade, but
    there's a lot of noise here and there are several substantive changes
    in the parent commit; and, happily, the type-checker already passes at
    the parent without this update.
    gnprice committed Nov 1, 2018
    Configuration menu
    Copy the full SHA
    c6ae675 View commit details
    Browse the repository at this point in the history
  2. flow: Remove a couple of error suppression comments

    Remove the $FlowFixMe comments as Flow no longer rises:
    `Props has no `narrow` property`
    borisyankov authored and gnprice committed Nov 1, 2018
    Configuration menu
    Copy the full SHA
    9eaaae1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e19b299 View commit details
    Browse the repository at this point in the history
  4. ZulipSwitch: Update Switch usage away from deprecated props.

    The props we use to set the colors of the Switch component,
    `onTintColor` and `tintColor`, are now deprecated.
    
    Update to their replacement, the new `trackColor` property, setting
    the exact same values to preserve the actual style unchanged.
    borisyankov authored and gnprice committed Nov 1, 2018
    Configuration menu
    Copy the full SHA
    95f41fc View commit details
    Browse the repository at this point in the history