Skip to content

Commit 8d1cfa1

Browse files
authored
chore: upgrade expo to 44 (callstack#2951)
1 parent e049a46 commit 8d1cfa1

32 files changed

+3680
-7166
lines changed

Diff for: .github/workflows/publish-each-pr.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
- name: Setup Node.js
1414
uses: actions/setup-node@v1
1515
with:
16-
node-version: 12.x
16+
node-version: 14.x
1717

1818
- name: Setup Expo
1919
uses: expo/expo-github-action@v5
2020
with:
21-
expo-version: 3.x
21+
expo-version: 4.x
2222
expo-username: ${{ secrets.EXPO_CLI_USERNAME_PAPER }}
2323
expo-password: ${{ secrets.EXPO_CLI_PASSWORD_PAPER }}
2424
expo-cache: true

Diff for: .github/workflows/publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
- name: Setup Node.js
1515
uses: actions/setup-node@v1
1616
with:
17-
node-version: 12.x
17+
node-version: 14.x
1818

1919
- name: Setup Expo
2020
uses: expo/expo-github-action@v5
2121
with:
22-
expo-version: 3.x
22+
expo-version: 4.x
2323
expo-username: ${{ secrets.EXPO_CLI_USERNAME_PAPER }}
2424
expo-password: ${{ secrets.EXPO_CLI_PASSWORD_PAPER }}
2525
expo-cache: true

Diff for: example/babel.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = function (api) {
1717
},
1818
},
1919
],
20+
['react-native-reanimated/plugin'],
2021
],
2122
};
2223
};

Diff for: example/metro.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// /* eslint-disable import/no-commonjs */
22

33
const path = require('path');
4-
const blacklist = require('metro-config/src/defaults/blacklist');
4+
const blacklist = require('metro-config/src/defaults/exclusionList');
55
const escape = require('escape-string-regexp');
66
const pak = require('../package.json');
77

Diff for: example/package.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313
"main": "node_modules/expo/AppEntry.js",
1414
"dependencies": {
1515
"@expo/vector-icons": "^12.0.0",
16-
"@react-native-community/async-storage": "~1.12.0",
16+
"@react-native-async-storage/async-storage": "~1.15.0",
1717
"@react-native-community/masked-view": "0.1.10",
1818
"@react-navigation/drawer": "^5.12.5",
1919
"@react-navigation/native": "^5.2.1",
2020
"@react-navigation/stack": "^5.2.16",
21-
"expo": "^40.0.0",
22-
"expo-font": "~8.4.0",
23-
"expo-keep-awake": "~8.4.0",
24-
"expo-splash-screen": "~0.8.1",
25-
"expo-status-bar": "~1.0.3",
26-
"expo-updates": "^0.5.4",
21+
"expo": "^44.0.0",
22+
"expo-font": "~10.0.4",
23+
"expo-keep-awake": "~10.0.1",
24+
"expo-splash-screen": "~0.14.1",
25+
"expo-status-bar": "~1.2.0",
26+
"expo-updates": "~0.11.3",
2727
"file-loader": "^4.0.0",
28-
"react": "16.13.1",
29-
"react-dom": "16.13.1",
30-
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz",
31-
"react-native-gesture-handler": "~1.8.0",
32-
"react-native-reanimated": "~1.13.0",
33-
"react-native-safe-area-context": "3.1.9",
34-
"react-native-screens": "~2.15.0",
28+
"react": "17.0.1",
29+
"react-dom": "17.0.1",
30+
"react-native": "0.64.3",
31+
"react-native-gesture-handler": "~2.1.0",
32+
"react-native-reanimated": "~2.3.1",
33+
"react-native-safe-area-context": "3.3.2",
34+
"react-native-screens": "~3.10.1",
3535
"react-native-vector-icons": "^6.6.0",
36-
"react-native-web": "~0.13.12",
36+
"react-native-web": "0.17.1",
3737
"typeface-roboto": "^0.0.54"
3838
},
3939
"devDependencies": {
4040
"babel-plugin-module-resolver": "^4.0.0",
41-
"babel-preset-expo": "8.3.0",
42-
"expo-cli": "^4.1.6"
41+
"babel-preset-expo": "9.0.1",
42+
"expo-cli": "^5.0.3"
4343
}
4444
}

Diff for: example/src/Examples/BottomNavigationExample.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as React from 'react';
22
import { View, Image, Dimensions, StyleSheet, Platform } from 'react-native';
33
import { BottomNavigation } from 'react-native-paper';
44
import ScreenWrapper from '../ScreenWrapper';
5+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
56

67
type RoutesState = Array<{
78
key: string;
@@ -32,6 +33,7 @@ const PhotoGallery = ({ route }: Route) => {
3233
};
3334

3435
const BottomNavigationExample = () => {
36+
const insets = useSafeAreaInsets();
3537
const [index, setIndex] = React.useState(0);
3638
const [routes] = React.useState<RoutesState>([
3739
{ key: 'album', title: 'Album', icon: 'image-album', color: '#6200ee' },
@@ -58,6 +60,7 @@ const BottomNavigationExample = () => {
5860

5961
return (
6062
<BottomNavigation
63+
safeAreaInsets={{ bottom: insets.bottom }}
6164
navigationState={{ index, routes }}
6265
onIndexChange={setIndex}
6366
renderScene={BottomNavigation.SceneMap({

Diff for: example/src/index.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { I18nManager, Platform } from 'react-native';
3-
import AsyncStorage from '@react-native-community/async-storage';
4-
import { Updates } from 'expo';
3+
import AsyncStorage from '@react-native-async-storage/async-storage';
4+
import * as Updates from 'expo-updates';
55
import { useKeepAwake } from 'expo-keep-awake';
66
import { StatusBar } from 'expo-status-bar';
77
import { InitialState, NavigationContainer } from '@react-navigation/native';
@@ -160,7 +160,7 @@ export default function PaperExample() {
160160

161161
if (I18nManager.isRTL !== rtl) {
162162
I18nManager.forceRTL(rtl);
163-
Updates.reloadFromCache();
163+
Updates.reloadAsync();
164164
}
165165
};
166166

0 commit comments

Comments
 (0)