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

deps: Upgrade to Expo SDK 44 #5441

Merged
merged 4 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ android/build/
# CocoaPods
/ios/Pods

# Expo
.expo/

# Transifex, for a maintainer syncing translations up and down
/.transifexrc

Expand Down
37 changes: 19 additions & 18 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@ PODS:
- DoubleConversion (1.1.6)
- EXAppleAuthentication (4.2.1):
- ExpoModulesCore
- EXApplication (3.3.0):
- EXApplication (4.0.2):
- ExpoModulesCore
- EXConstants (12.1.3):
- EXConstants (13.0.2):
- ExpoModulesCore
- EXErrorRecovery (3.0.5):
- ExpoModulesCore
- EXFileSystem (13.0.3):
- EXFileSystem (13.1.4):
- ExpoModulesCore
- EXFont (10.0.5):
- ExpoModulesCore
- EXKeepAwake (10.0.2):
- ExpoModulesCore
- Expo (43.0.5):
- Expo (44.0.6):
- ExpoModulesCore
- ExpoModulesCore (0.4.10):
- ExpoModulesCore (0.6.5):
- React-Core
- EXScreenOrientation (4.0.3):
- ReactCommon/turbomodule/core
- EXScreenOrientation (4.1.2):
- ExpoModulesCore
- React-Core
- EXSQLite (10.2.0):
- ExpoModulesCore
- EXWebBrowser (9.3.0):
- EXWebBrowser (10.1.1):
- ExpoModulesCore
- FBLazyVector (0.67.4)
- FBReactNativeSpec (0.67.4):
Expand Down Expand Up @@ -311,7 +312,7 @@ PODS:
- RCTTypeSafety
- React
- ReactCommon/turbomodule/core
- react-native-simple-toast (1.1.3):
- react-native-simple-toast (1.1.4):
- React-Core
- Toast (~> 4.0.0)
- react-native-webview (11.22.2):
Expand Down Expand Up @@ -391,7 +392,7 @@ PODS:
- React-Core
- RNDeviceInfo (8.7.1):
- React-Core
- RNGestureHandler (1.10.3):
- RNGestureHandler (2.1.3):
- React-Core
- RNReanimated (2.2.4):
- DoubleConversion
Expand Down Expand Up @@ -667,17 +668,17 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
EXAppleAuthentication: 709a807fe7f48ac6986a2ceed206ee6a8baf28df
EXApplication: d99a1ecb99dfb63dab8acb66d0181857ee79b25f
EXConstants: 6d585d93723b18d7a8c283591a335609e3bc153e
EXApplication: 54fe5bd6268d697771645e8f1aef8b806a65247a
EXConstants: 88bf79622fbd9b476c96d8ec57fe97ca44fe8e3c
EXErrorRecovery: b0d7582714a2cc896e94a2308a356f94dbf14ef7
EXFileSystem: 99aac7962c11c680681819dd9cbca24e20e5b1e7
EXFileSystem: 08a3033ac372b6346becf07839e1ccef26fb1058
EXFont: 2597c10ac85a69d348d44d7873eccf5a7576ef5e
EXKeepAwake: bf48d7f740a5cd2befed6cf9a49911d385c6c47d
Expo: d9588796cd19999da4d440d87bf7eb7ae4dbd608
ExpoModulesCore: c9438f6add0fb7b04b7c64eb97a833d2752a7834
EXScreenOrientation: 80c8c07ab3f2beb8e83ba94ab6ee4fb7a6bf01a6
Expo: 534e51e607aba8229293297da5585f4b26f50fa1
ExpoModulesCore: 32c0ccb47f477d330ee93db72505380adf0de09a
EXScreenOrientation: ca9375ec57e5706128062867516da0b03a97ef64
EXSQLite: 2b9accd925438293f9f39e0a57a08cca13bdffb2
EXWebBrowser: f9435daf809a688e0cb63675da208196007573b6
EXWebBrowser: f1573262c5de753987ed526c630076eda130804d
FBLazyVector: f7b0632c6437e312acf6349288d9aa4cb6d59030
FBReactNativeSpec: 0f4e1f4cfeace095694436e7c7fcc5bf4b03a0ff
Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733
Expand Down Expand Up @@ -710,7 +711,7 @@ SPEC CHECKSUMS:
react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d
react-native-photo-view: 63e9e61da873531f931008b545d8d10c5373ddf8
react-native-safe-area-context: 6c12e3859b6f27b25de4fee8201cfb858432d8de
react-native-simple-toast: bf002828cf816775a6809f7a9ec3907509bce11f
react-native-simple-toast: 8ee5d23f0b92b935ab7434cdb65159ce12dfb4b7
react-native-webview: 159034a856a6e95995f5bf2eed40d70b103d6572
React-perflogger: 0afaf2f01a47fd0fc368a93bfbb5bd3b26db6e7f
React-RCTActionSheet: 59f35c4029e0b532fc42114241a06e170b7431a2
Expand All @@ -729,7 +730,7 @@ SPEC CHECKSUMS:
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNCPushNotificationIOS: 87b8d16d3ede4532745e05b03c42cff33a36cc45
RNDeviceInfo: aad3c663b25752a52bf8fce93f2354001dd185aa
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNGestureHandler: e1099204721a17a89c81fcd1cc2e92143dc040fb
RNReanimated: e28dfaa950064b674fde0a9b736e62b9dff500a7
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
RNSentry: 85f6525b5fe8d2ada065858026b338605b3c09da
Expand Down
7 changes: 3 additions & 4 deletions ios/ZulipMobile/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import <React/RCTLog.h>
#import <UserNotifications/UserNotifications.h>
#import <RNCPushNotificationIOS.h>
#import <EXScreenOrientation/EXScreenOrientationViewController.h>

#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
Expand Down Expand Up @@ -39,8 +38,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

RCTSetLogThreshold(RCTLogLevelError);

RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge
moduleName:@"ZulipMobile"
initialProperties:nil];

Expand All @@ -49,7 +48,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
rootView.loadingView = loadingView;

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [[EXScreenOrientationViewController alloc] initWithDefaultScreenOrientationMask:UIInterfaceOrientationMaskAll];
UIViewController *rootViewController = [self.reactDelegate createRootViewController];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
Expand Down
2 changes: 2 additions & 0 deletions ios/ZulipMobile/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>EXDefaultScreenOrientationMask</key>
<string>UIInterfaceOrientationMaskAll</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"blueimp-md5": "^2.10.0",
"color": "^4.0.1",
"date-fns": "^2.23.0",
"expo": "^43.0.5",
"expo": "^44.0.0",
"expo-apple-authentication": "^4.0.0",
"expo-application": "^3.3.0",
"expo-screen-orientation": ">=4.0.0 <4.1.0",
"expo-application": "~4.0.1",
"expo-screen-orientation": "~4.1.1",
"expo-sqlite": "^10.0.0",
"expo-web-browser": "^9.3.0",
"expo-web-browser": "~10.1.0",
"immutable": "^4.0.0-rc.12",
"invariant": "^2.2.4",
"katex": "^0.11.1",
Expand All @@ -56,13 +56,13 @@
"react-native": "0.67.4",
"react-native-device-info": "^8.1.7",
"react-native-document-picker": "^3.2.4",
"react-native-gesture-handler": "^1.0.12",
"react-native-gesture-handler": "~2.1.0",
"react-native-image-picker": "^4.1.1",
"react-native-photo-view": "alwx/react-native-photo-view#c58fd6b30",
"react-native-reanimated": "^2.2.0 <2.3.0",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "^3.13.1",
"react-native-simple-toast": "^1.0.0",
"react-native-simple-toast": "^1.1.4",
"react-native-tab-view": "^2.15.2",
"react-native-url-polyfill": "^1.3.0",
"react-native-vector-icons": "^9.1.0",
Expand Down Expand Up @@ -102,6 +102,7 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.5.0",
"expo-cli": "^5.4.12",
"flow-bin": "^0.162.0",
"flow-coverage-report": "^0.8.0",
"flow-typed": "^3.3.1",
Expand All @@ -111,7 +112,7 @@
"jest-cli": "^26.4.1",
"jest-environment-jsdom": "^26.3.0",
"jest-environment-jsdom-global": "^2.0.4",
"jest-expo": "^43.0.1",
"jest-expo": "^44.0.0",
"jest-extended": "^0.11.5",
"jetifier": "^2.0.0",
"metro-react-native-babel-preset": "^0.66.2",
Expand All @@ -124,7 +125,7 @@
"rollup": "^2.26.5",
"sqlite3": "^5.0.2",
"tsflower": "^0.0.12",
"typescript": "~3.8.3",
"typescript": "~4.3.5",
"yarn-deduplicate": "^3.0.0"
},
"resolutions": {
Expand Down
3 changes: 3 additions & 0 deletions src/boot/AppEventHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ class AppEventHandlersInner extends PureComponent<Props> {
this.netInfoDisconnectCallback = NetInfo.addEventListener(this.handleConnectivityChange);

AppState.addEventListener('memoryWarning', this.handleMemoryWarning);

// The listener doesn't seem to fire in RN's "Debug with Chrome" mode.
ScreenOrientation.addOrientationChangeListener(this.handleOrientationChange);

this.notificationListener.start();
this.shareListener.start();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
*/
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,3 +7,12 @@ export type ProxyNativeModule = {
removeListeners: (count: number) => void,
...
};

export type TurboNativeModuleProxy = {
callMethodAsync: <ReturnType>(
moduleName: string,
methodName: string,
args: any[],
) => Promise<ReturnType>,
...
};
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type OrientationT = $Values<typeof Orientation>;
* An enum whose values can be passed to the [`lockAsync`](#screenorientationlockasyncorientationlock)
* method.
* > __Note:__ `OrientationLock.ALL` and `OrientationLock.PORTRAIT` are invalid on devices which
* don't support `OrientationLock.PORTRAIT_DOWN`.
* > don't support `OrientationLock.PORTRAIT_DOWN`.
*/
declare export var OrientationLock: {|
/**
Expand Down Expand Up @@ -91,7 +91,7 @@ export type SizeClassIOST = $Values<typeof SizeClassIOS>;
/**
* An enum representing the lock policies that can be applied on the web platform, modelled after
* the [W3C specification](https://w3c.github.io/screen-orientation/#dom-orientationlocktype).
* These values can be applied through the [`lockPlatformAsync`](#screenorientationlockplatformasyncplatforminfo)
* These values can be applied through the [`lockPlatformAsync`](#screenorientationlockplatformasyncoptions)
* method.
*/
declare export var WebOrientationLock: {|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
/* @flow
* @generated by TsFlower
*/
/* $FlowFixMe[untyped-type-import] - We don't expect to need this
withScreenOrientation HOC at all; we favor React Hooks. Could get types
for @expo/config-plugins, if enough of types/expo-* would make good use
of them. */
import { type ConfigPlugin } from '@expo/config-plugins';
declare export function modifyObjcAppDelegate(contents: string, mask: string): string;
declare var _default: ConfigPlugin<void | {
initialOrientation?:
| 'DEFAULT'
| 'ALL'
| 'PORTRAIT'
| 'PORTRAIT_UP'
| 'PORTRAIT_DOWN'
| 'LANDSCAPE'
| 'LANDSCAPE_LEFT'
| 'LANDSCAPE_RIGHT'
| void,
...
}>;
export default _default;

// This module seems pretty useless, so we've erased everything in it. If
// that seems wrong, we can process it (or part of it) as usual.
6 changes: 3 additions & 3 deletions types/expo-web-browser/build/WebBrowser.types.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ export type WebBrowserCustomTabsResults = {

declare export var WebBrowserResultType: {|
/**
* iOS only.
* @platform ios
*/
+CANCEL: 'cancel',
/**
* iOS only.
* @platform ios
*/
+DISMISS: 'dismiss',
/**
* Android only.
* @platform android
*/
+OPENED: 'opened',
+LOCKED: 'locked',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ index a714391d8..487278d38 100644
declare export function addOrientationChangeListener(
listener: OrientationChangeListener,
diff --git types/expo-screen-orientation/build/ScreenOrientation.types.js.flow types/expo-screen-orientation/build/ScreenOrientation.types.js.flow
index 76e6c2641..fce818edd 100644
index ec7bf0644..88cbbc96d 100644
--- types/expo-screen-orientation/build/ScreenOrientation.types.js.flow
+++ types/expo-screen-orientation/build/ScreenOrientation.types.js.flow
@@ -1,141 +1,138 @@
Expand Down Expand Up @@ -122,7 +122,7 @@ index 76e6c2641..fce818edd 100644
* An enum whose values can be passed to the [`lockAsync`](#screenorientationlockasyncorientationlock)
* method.
* > __Note:__ `OrientationLock.ALL` and `OrientationLock.PORTRAIT` are invalid on devices which
* don't support `OrientationLock.PORTRAIT_DOWN`.
* > don't support `OrientationLock.PORTRAIT_DOWN`.
- * /
-export declare enum OrientationLock {
- /**
Expand Down Expand Up @@ -237,7 +237,7 @@ index 76e6c2641..fce818edd 100644
/**
* An enum representing the lock policies that can be applied on the web platform, modelled after
* the [W3C specification](https://w3c.github.io/screen-orientation/#dom-orientationlocktype).
* These values can be applied through the [`lockPlatformAsync`](#screenorientationlockplatformasyncplatforminfo)
* These values can be applied through the [`lockPlatformAsync`](#screenorientationlockplatformasyncoptions)
* method.
- * /
-export declare enum WebOrientationLock {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Bobbe <cbobbe@zulip.com>
Date: Wed, 20 Jul 2022 15:49:54 -0700
Subject: [shortcut] expo-screen-orientation: Clear out unused
withScreenOrientation

---
.../build/withScreenOrientation.js.flow | 44 +------------------
1 file changed, 2 insertions(+), 42 deletions(-)

diff --git types/expo-screen-orientation/plugin/build/withScreenOrientation.js.flow types/expo-screen-orientation/plugin/build/withScreenOrientation.js.flow
index 3a5f3c06d..31ab8ed2d 100644
--- types/expo-screen-orientation/plugin/build/withScreenOrientation.js.flow
+++ types/expo-screen-orientation/plugin/build/withScreenOrientation.js.flow
@@ -1,46 +1,6 @@
/* @flow
* @generated by TsFlower
*/
-import { type ConfigPlugin, type InfoPlist } from '@expo/config-plugins';
-import { type ExpoConfig } from '@expo/config-types';
-declare export var INITIAL_ORIENTATION_KEY: 'EXDefaultScreenOrientationMask';

-declare var OrientationLock: {
- DEFAULT: string,
- ALL: string,
- PORTRAIT: string,
- PORTRAIT_UP: string,
- PORTRAIT_DOWN: string,
- LANDSCAPE: string,
- LANDSCAPE_LEFT: string,
- LANDSCAPE_RIGHT: string,
- ...
-};
-
-type OrientationMasks = $Keys<typeof OrientationLock>;
-declare interface ExpoConfigWithInitialOrientation extends ExpoConfig {
- initialOrientation?: OrientationMasks;
-}
-declare export function getInitialOrientation(
- config: Pick<ExpoConfigWithInitialOrientation, 'initialOrientation'>,
-): OrientationMasks;
-
-declare export function setInitialOrientation(
- config: Pick<ExpoConfigWithInitialOrientation, 'initialOrientation'>,
- infoPlist: InfoPlist,
-): InfoPlist;
-
-declare var _default: ConfigPlugin<void | {
- initialOrientation?:
- | 'DEFAULT'
- | 'ALL'
- | 'PORTRAIT'
- | 'PORTRAIT_UP'
- | 'PORTRAIT_DOWN'
- | 'LANDSCAPE'
- | 'LANDSCAPE_LEFT'
- | 'LANDSCAPE_RIGHT'
- | void,
- ...
-}>;
-export default _default;
+// This module seems pretty useless, so we've erased everything in it. If
+// that seems wrong, we can process it (or part of it) as usual.
--
2.32.0

Loading