Skip to content

Commit

Permalink
deps: Upgrade to Expo SDK 45
Browse files Browse the repository at this point in the history
Following the "Bare workflow" instructions for upgrading:
  https://blog.expo.dev/expo-sdk-45-f4e332954a68#5954

As with the last one, 44 in 3edc37a, the `expo upgrade` command
went through a phase it described as "Updating packages to
compatible versions (where known)," and that changed several of our
dependency ranges, even of non-Expo things. (For speculation on what
that phase is about, see 3edc37a.)

We rejected version-range changes to these libraries that would have
resulted in downgrades to the libraries' resolved versions:

- react-native-safe-area-context from 4.3.1 to 4.2.4
- react-native-screens from 3.13.1 to 3.11.1
- react-native-webview from 11.22.2 to 11.18.1

We rejected upgrades to @react-native-community/netinfo and
react-native-reanimated for the reasons we gave in the Expo 44
upgrade; see those at
  zulip#5441 (comment) .

And we rejected bumping react-native from 0.67.4 to 0.68.2, with
optimism that we can get this Expo upgrade done before that RN
upgrade, which is zulip#5344.

We took the rest.

For the step

> Update your `App.Delegate.mm` (you should have moved from .m to
> .mm in the previous step) according to this diff

, we found that we'd already taken some of those changes when Expo
backported them to the Expo 44 template app. Others, like the .m to
.mm rename, we'd like to postpone until we do the RN 68 upgrade. A
full audit of Expo's template-app commits from 44 to 45 found no
changes we'd be interested in applying, except some related to RN 68
that we'd like to do with that upgrade; I've mentioned those on our
RN 68 upgrade issue. See:
  zulip#5507 (comment)

I tested basic functionality on my iPhone 13 Pro running iOS 15.6,
and on the office Android device, a Samsung Galaxy S9 running
Android 9. I didn't see any problems with building or running.
  • Loading branch information
chrisbobbe authored and gnprice committed Nov 23, 2022
1 parent 9f17d07 commit 47b7ead
Show file tree
Hide file tree
Showing 17 changed files with 610 additions and 390 deletions.
66 changes: 33 additions & 33 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ PODS:
- boost (1.76.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- EXAppleAuthentication (4.3.0):
- EXAppleAuthentication (4.2.1):
- ExpoModulesCore
- EXApplication (4.0.2):
- EXApplication (4.1.0):
- ExpoModulesCore
- EXConstants (13.0.2):
- EXConstants (13.1.1):
- ExpoModulesCore
- EXErrorRecovery (3.0.5):
- EXErrorRecovery (3.1.0):
- ExpoModulesCore
- EXFileSystem (13.1.4):
- EXFileSystem (14.0.0):
- ExpoModulesCore
- EXFont (10.0.5):
- EXFont (10.1.0):
- ExpoModulesCore
- EXKeepAwake (10.0.2):
- Expo (45.0.8):
- ExpoModulesCore
- Expo (44.0.6):
- ExpoKeepAwake (10.1.1):
- ExpoModulesCore
- ExpoModulesCore (0.6.5):
- ExpoModulesCore (0.9.2):
- React-Core
- ReactCommon/turbomodule/core
- EXScreenOrientation (4.1.2):
- ExpoWebBrowser (10.2.1):
- ExpoModulesCore
- React-Core
- EXSQLite (10.3.0):
- EXScreenOrientation (4.2.0):
- ExpoModulesCore
- EXWebBrowser (10.1.1):
- React-Core
- EXSQLite (10.2.0):
- ExpoModulesCore
- FBLazyVector (0.67.4)
- FBReactNativeSpec (0.67.4):
Expand Down Expand Up @@ -384,7 +384,7 @@ PODS:
- React-perflogger (= 0.67.4)
- rn-fetch-blob (0.11.2):
- React-Core
- RNCAsyncStorage (1.17.10):
- RNCAsyncStorage (1.17.11):
- React-Core
- RNCMaskedView (0.1.11):
- React
Expand Down Expand Up @@ -448,12 +448,12 @@ DEPENDENCIES:
- EXErrorRecovery (from `../node_modules/expo-error-recovery/ios`)
- EXFileSystem (from `../node_modules/expo-file-system/ios`)
- EXFont (from `../node_modules/expo-font/ios`)
- EXKeepAwake (from `../node_modules/expo-keep-awake/ios`)
- Expo (from `../node_modules/expo/ios`)
- ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`)
- ExpoModulesCore (from `../node_modules/expo-modules-core/ios`)
- ExpoWebBrowser (from `../node_modules/expo-web-browser/ios`)
- EXScreenOrientation (from `../node_modules/expo-screen-orientation/ios`)
- EXSQLite (from `../node_modules/expo-sqlite/ios`)
- EXWebBrowser (from `../node_modules/expo-web-browser/ios`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- Flipper (= 0.99.0)
Expand Down Expand Up @@ -560,18 +560,18 @@ EXTERNAL SOURCES:
:path: "../node_modules/expo-file-system/ios"
EXFont:
:path: "../node_modules/expo-font/ios"
EXKeepAwake:
:path: "../node_modules/expo-keep-awake/ios"
Expo:
:path: "../node_modules/expo/ios"
ExpoKeepAwake:
:path: "../node_modules/expo-keep-awake/ios"
ExpoModulesCore:
:path: "../node_modules/expo-modules-core/ios"
ExpoWebBrowser:
:path: "../node_modules/expo-web-browser/ios"
EXScreenOrientation:
:path: "../node_modules/expo-screen-orientation/ios"
EXSQLite:
:path: "../node_modules/expo-sqlite/ios"
EXWebBrowser:
:path: "../node_modules/expo-web-browser/ios"
FBLazyVector:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
Expand Down Expand Up @@ -667,18 +667,18 @@ SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
EXAppleAuthentication: b9e9d8fa9b0cc5277b2121eb809cf0f57c2496a7
EXApplication: 54fe5bd6268d697771645e8f1aef8b806a65247a
EXConstants: 88bf79622fbd9b476c96d8ec57fe97ca44fe8e3c
EXErrorRecovery: b0d7582714a2cc896e94a2308a356f94dbf14ef7
EXFileSystem: 08a3033ac372b6346becf07839e1ccef26fb1058
EXFont: 2597c10ac85a69d348d44d7873eccf5a7576ef5e
EXKeepAwake: bf48d7f740a5cd2befed6cf9a49911d385c6c47d
Expo: 534e51e607aba8229293297da5585f4b26f50fa1
ExpoModulesCore: 32c0ccb47f477d330ee93db72505380adf0de09a
EXScreenOrientation: ca9375ec57e5706128062867516da0b03a97ef64
EXSQLite: 82a4ca937f19d3cbbb6dba9e11d8e963175527c9
EXWebBrowser: f1573262c5de753987ed526c630076eda130804d
EXAppleAuthentication: 709a807fe7f48ac6986a2ceed206ee6a8baf28df
EXApplication: d6562af1204162e0ac46d341a7d4e5dc720b33de
EXConstants: fdbe52259365b6a6faaa5e99a3b82cfa6bc2eb61
EXErrorRecovery: 3ce46e5d42e53c0371ff048a7f0cbc959968ef4a
EXFileSystem: 2aa2d9289f84bca9532b9ccbd81504fa31eb1ded
EXFont: 04235cc22e6fef86028feb67db452978dc6f240f
Expo: 1133eaf0e12dc265ac82a256f3815401b7570f96
ExpoKeepAwake: c0c494b442ecd8122974c13b93ccfb57bd408e88
ExpoModulesCore: e4278a668e8c13c0269ed8b8a4200989deea2973
ExpoWebBrowser: 4b5f9633e5f169dc948587cb6d26d2d1d1406187
EXScreenOrientation: e3c072fb0add472a3037482ea43ccbade9b88a25
EXSQLite: 2b9accd925438293f9f39e0a57a08cca13bdffb2
FBLazyVector: f7b0632c6437e312acf6349288d9aa4cb6d59030
FBReactNativeSpec: 0f4e1f4cfeace095694436e7c7fcc5bf4b03a0ff
Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733
Expand Down Expand Up @@ -726,7 +726,7 @@ SPEC CHECKSUMS:
React-runtimeexecutor: a9d3c82ddf7ffdad9fbe6a81c6d6f8c06385464d
ReactCommon: 07d0c460b9ba9af3eaf1b8f5abe7daaad28c9c4e
rn-fetch-blob: f525a73a78df9ed5d35e67ea65e79d53c15255bc
RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca
RNCAsyncStorage: 8616bd5a58af409453ea4e1b246521bb76578d60
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNCPushNotificationIOS: 87b8d16d3ede4532745e05b03c42cff33a36cc45
RNDeviceInfo: aad3c663b25752a52bf8fce93f2354001dd185aa
Expand Down
2 changes: 2 additions & 0 deletions ios/ZulipMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@
"-ObjC",
"-lc++",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = org.zulip.Zulip;
PRODUCT_NAME = ZulipMobile;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -443,6 +444,7 @@
"-ObjC",
"-lc++",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = org.zulip.Zulip;
PRODUCT_NAME = ZulipMobile;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@expo/react-native-action-sheet": "^3.8.0",
"@react-native-async-storage/async-storage": "^1.13.0",
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-camera-roll/camera-roll": "^5.0.4",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/netinfo": "6.0.0",
Expand All @@ -31,18 +31,18 @@
"@react-navigation/material-top-tabs": "^5.2.19",
"@react-navigation/native": "^5.7.6",
"@react-navigation/stack": "^5.9.3",
"@sentry/react-native": "^3.3.3",
"@sentry/react-native": "^3.1.1",
"@zulip/shared": "0.0.16",
"base-64": "^1.0.0",
"blueimp-md5": "^2.10.0",
"color": "^4.0.1",
"date-fns": "^2.23.0",
"expo": "^44.0.0",
"expo-apple-authentication": "^4.0.0",
"expo-application": "~4.0.1",
"expo-screen-orientation": "~4.1.1",
"expo-sqlite": "^10.0.0",
"expo-web-browser": "~10.1.0",
"expo": "^45.0.0",
"expo-apple-authentication": "~4.2.1",
"expo-application": "~4.1.0",
"expo-screen-orientation": "~4.2.0",
"expo-sqlite": "~10.2.0",
"expo-web-browser": "~10.2.1",
"flow-enums-runtime": "^0.0.6",
"immutable": "^4.0.0-rc.12",
"invariant": "^2.2.4",
Expand Down Expand Up @@ -89,7 +89,7 @@
"@octokit/core": "^3.4.0",
"@rollup/plugin-babel": "^5.2.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@types/react-native": "^0.67.7",
"@types/react-native": "~0.67.6",
"@vusion/webfonts-generator": "^0.8.0",
"babel-plugin-transform-flow-enums": "^0.0.2",
"core-js": "^3.1.4",
Expand All @@ -114,7 +114,7 @@
"jest-cli": "^26.4.1",
"jest-environment-jsdom": "^26.3.0",
"jest-environment-jsdom-global": "^2.0.4",
"jest-expo": "^44.0.0",
"jest-expo": "^45.0.0",
"jest-extended": "^0.11.5",
"jetifier": "^2.0.0",
"metro-react-native-babel-preset": "^0.66.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
*/
import { type ProxyNativeModule } from './NativeModulesProxy.types';
declare var NativeModulesProxy: { [moduleName: string]: ProxyNativeModule, ... };
declare export function useExpoTurboModules(state?: boolean): void;
export default NativeModulesProxy;
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,3 @@ export type ProxyNativeModule = {
removeListeners: (count: number) => void,
...
};

export type TurboNativeModuleProxy = {
callMethodAsync: <ReturnType>(
moduleName: string,
methodName: string,
args: any[],
) => Promise<ReturnType>,
...
};
8 changes: 7 additions & 1 deletion types/expo-modules-core/build/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ import Platform from './Platform';
import SyntheticPlatformEmitter from './SyntheticPlatformEmitter';
import { CodedError } from './errors/CodedError';
import { UnavailabilityError } from './errors/UnavailabilityError';
export { default as deprecate } from './deprecate';

/* tsflower-unimplemented: ImportDeclaration with no import clause */
/*
import './sweet/setUpErrorManager.fx'; */

export { default as deprecate } from './deprecate';
export {
DeviceEventEmitter,
EventEmitter,
Expand All @@ -31,6 +35,8 @@ export {
export type ProxyNativeModule = ProxyNativeModule_;
export type Subscription = Subscription_;

export * from './requireNativeModule';

// See comment on DeviceEventEmitterStatic import, above.
declare export var RCTDeviceEventEmitter: $FlowFixMe; // $tsflower_import_type$_$react_2d_native$DeviceEventEmitterStatic

Expand Down
11 changes: 11 additions & 0 deletions types/expo-modules-core/build/requireNativeModule.js.flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* @flow
* @generated by TsFlower
*/
/* tsflower-unimplemented: ModuleDeclaration */
/* declare global {
var ExpoModules: undefined | {
[key: string]: any;
};
} */

declare export function requireNativeModule<ModuleType = any>(moduleName: string): ModuleType;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* @flow
* @generated by TsFlower
*/
import type { ProxyNativeModule as $tsflower_import_type$_$_2e__2e_$ProxyNativeModule } from '..';
declare var _default: $tsflower_import_type$_$_2e__2e_$ProxyNativeModule;
export default _default;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* @flow
* @generated by TsFlower
*/
export {};
9 changes: 7 additions & 2 deletions types/expo-web-browser/build/WebBrowser.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ import {
type WebBrowserResultTypeT as WebBrowserResultTypeT_,
type WebBrowserWarmUpResult as WebBrowserWarmUpResult_,
type WebBrowserWindowFeatures as WebBrowserWindowFeatures_,
WebBrowserPresentationStyle,
type WebBrowserPresentationStyleT as WebBrowserPresentationStyleT_,
type AuthSessionOpenOptions as AuthSessionOpenOptions_,
} from "./WebBrowser.types";

export { WebBrowserResultType };
export { WebBrowserResultType, WebBrowserPresentationStyle };

export type WebBrowserAuthSessionResult = WebBrowserAuthSessionResult_;
export type WebBrowserCompleteAuthSessionOptions = WebBrowserCompleteAuthSessionOptions_;
Expand All @@ -31,13 +34,15 @@ export type WebBrowserResult = WebBrowserResult_;
export type WebBrowserResultTypeT = WebBrowserResultTypeT_;
export type WebBrowserWarmUpResult = WebBrowserWarmUpResult_;
export type WebBrowserWindowFeatures = WebBrowserWindowFeatures_;
export type WebBrowserPresentationStyleT = WebBrowserPresentationStyleT_;
export type AuthSessionOpenOptions = AuthSessionOpenOptions_;

declare export function getCustomTabsSupportingBrowsersAsync(): Promise<WebBrowserCustomTabsResults>;
declare export function warmUpAsync(browserPackage?: string): Promise<WebBrowserWarmUpResult>;
declare export function mayInitWithUrlAsync(url: string, browserPackage?: string): Promise<WebBrowserMayInitWithUrlResult>;
declare export function coolDownAsync(browserPackage?: string): Promise<WebBrowserCoolDownResult>;
declare export function openBrowserAsync(url: string, browserParams?: WebBrowserOpenOptions): Promise<WebBrowserResult>;
declare export function dismissBrowser(): void;
declare export function openAuthSessionAsync(url: string, redirectUrl: string, browserParams?: WebBrowserOpenOptions): Promise<WebBrowserAuthSessionResult>;
declare export function openAuthSessionAsync(url: string, redirectUrl: string, options?: AuthSessionOpenOptions): Promise<WebBrowserAuthSessionResult>;
declare export function dismissAuthSession(): void;
declare export function maybeCompleteAuthSession(options?: WebBrowserCompleteAuthSessionOptions): WebBrowserCompleteAuthSessionResult;
46 changes: 46 additions & 0 deletions types/expo-web-browser/build/WebBrowser.types.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ export type WebBrowserOpenOptions = {
controlsColor?: string,
dismissButtonStyle?: "done" | "close" | "cancel",
readerMode?: boolean,
presentationStyle?: WebBrowserPresentationStyleT,
windowName?: string,
windowFeatures?: string | WebBrowserWindowFeatures,
...
};

export type AuthSessionOpenOptions = WebBrowserOpenOptions & { preferEphemeralSession?: boolean, ... };
export type WebBrowserAuthSessionResult = WebBrowserRedirectResult | WebBrowserResult;

export type WebBrowserCustomTabsResults = {
Expand Down Expand Up @@ -48,6 +50,50 @@ declare export var WebBrowserResultType: {|
|}
export type WebBrowserResultTypeT = $Values<typeof WebBrowserResultType>;

/**
* A browser presentation style. Its values are directly mapped to the [`UIModalPresentationStyle`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle).
*
* @platform ios
*/
declare export var WebBrowserPresentationStyle: {|
/**
* A presentation style in which the presented browser covers the screen.
*/
+FULL_SCREEN: "fullScreen",
/**
* A presentation style that partially covers the underlying content.
*/
+PAGE_SHEET: "pageSheet",
/**
* A presentation style that displays the browser centered in the screen.
*/
+FORM_SHEET: "formSheet",
/**
* A presentation style where the browser is displayed over the app's content.
*/
+CURRENT_CONTEXT: "currentContext",
/**
* A presentation style in which the browser view covers the screen.
*/
+OVER_FULL_SCREEN: "overFullScreen",
/**
* A presentation style where the browser is displayed over the app's content.
*/
+OVER_CURRENT_CONTEXT: "overCurrentContext",
/**
* A presentation style where the browser is displayed in a popover view.
*/
+POPOVER: "popover",
/**
* The default presentation style chosen by the system.
* On older iOS versions, falls back to `WebBrowserPresentationStyle.FullScreen`.
*
* @platform ios 13+
*/
+AUTOMATIC: "automatic"
|}
export type WebBrowserPresentationStyleT = $Values<typeof WebBrowserPresentationStyle>;

export type WebBrowserResult = { type: WebBrowserResultTypeT, ... };

export type WebBrowserRedirectResult = {
Expand Down

0 comments on commit 47b7ead

Please sign in to comment.