Skip to content

Commit 09952a0

Browse files
authored
chore: upgraded expo sdk to 41
1 parent 6d93f4a commit 09952a0

File tree

11 files changed

+3418
-1720
lines changed

11 files changed

+3418
-1720
lines changed

App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { MaterialIcons } from '@expo/vector-icons'
2-
import { AppLoading, Asset, Linking } from 'expo'
2+
import { Asset, Linking } from 'expo'
3+
import AppLoading from 'expo-app-loading'
34
import React, { Component } from 'react'
45
import { StyleSheet, View, Text, Platform } from 'react-native'
56
import { Bubble, GiftedChat, SystemMessage, IMessage, Send, SendProps } from './src'
File renamed without changes.

example-expo/mediaUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default async function getPermissionAsync(permission) {
2828
}
2929

3030
export async function getLocationAsync(onSend) {
31-
if (await getPermissionAsync(Permissions.LOCATION)) {
31+
if (await Location.requestForegroundPermissionsAsync()) {
3232
const location = await Location.getCurrentPositionAsync({})
3333
if (location) {
3434
onSend([{ location: location.coords }])
@@ -37,7 +37,7 @@ export async function getLocationAsync(onSend) {
3737
}
3838

3939
export async function pickImageAsync(onSend) {
40-
if (await getPermissionAsync(Permissions.CAMERA_ROLL)) {
40+
if (await ImagePicker.requestMediaLibraryPermissionsAsync()) {
4141
const result = await ImagePicker.launchImageLibraryAsync({
4242
allowsEditing: true,
4343
aspect: [4, 3],
@@ -51,7 +51,7 @@ export async function pickImageAsync(onSend) {
5151
}
5252

5353
export async function takePictureAsync(onSend) {
54-
if (await getPermissionAsync(Permissions.CAMERA)) {
54+
if (await ImagePicker.requestCameraPermissionsAsync()) {
5555
const result = await ImagePicker.launchCameraAsync({
5656
allowsEditing: true,
5757
aspect: [4, 3],

package.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,42 +68,43 @@
6868
]
6969
},
7070
"devDependencies": {
71-
"@babel/core": "7.9.6",
71+
"@babel/core": "~7.9.0",
7272
"@babel/preset-typescript": "7.9.0",
7373
"@types/jest": "25.2.1",
74-
"@types/react": "^16.9.11",
75-
"@types/react-native": "^0.60.22",
74+
"@types/react": "~16.9.35",
75+
"@types/react-native": "~0.63.2",
7676
"@types/react-native-communications": "2.2.1",
7777
"@types/react-test-renderer": "16.9.2",
7878
"@types/uuid": "3.4.9",
7979
"babel-core": "7.0.0-bridge.0",
8080
"babel-jest": "25.5.1",
81-
"babel-preset-expo": "^8.1.0",
82-
"expo": "^37.0.0",
83-
"expo-constants": "~9.0.0",
84-
"expo-image-picker": "~8.1.0",
85-
"expo-location": "~8.1.0",
86-
"expo-permissions": "~8.1.0",
81+
"babel-preset-expo": "8.3.0",
82+
"expo": "^41.0.0",
83+
"expo-constants": "~10.1.3",
84+
"expo-image-picker": "~10.1.4",
85+
"expo-location": "~12.0.4",
86+
"expo-permissions": "~12.0.1",
8787
"flow-bin": "0.125.0",
8888
"husky": "4.2.5",
89-
"jest-expo": "^37.0.0",
89+
"jest-expo": "^41.0.0",
9090
"json": "9.0.6",
9191
"prettier": "2.0.5",
92-
"react": "16.9.0",
93-
"react-dom": "16.9.0",
94-
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
95-
"react-native-maps": "0.26.1",
92+
"react": "16.13.1",
93+
"react-dom": "16.13.1",
94+
"react-native": "0.63.4",
95+
"react-native-maps": "0.27.1",
9696
"react-native-nav": "2.0.2",
97-
"react-native-web": "^0.11.7",
97+
"react-native-web": "~0.13.12",
9898
"react-native-web-maps": "0.2.0",
9999
"react-test-renderer": "16.9.0",
100100
"tslint": "6.1.2",
101101
"tslint-config-prettier": "1.18.0",
102-
"typescript": "^3.8.3"
102+
"typescript": "~4.0.0"
103103
},
104104
"dependencies": {
105105
"@expo/react-native-action-sheet": "^3.6.0",
106106
"dayjs": "^1.8.26",
107+
"expo-app-loading": "^1.0.3",
107108
"prop-types": "^15.7.2",
108109
"react-native-communications": "^2.2.1",
109110
"react-native-iphone-x-helper": "^1.3.1",
@@ -123,4 +124,4 @@
123124
"pre-commit": "yarn lint:fix && yarn prettier && yarn tsc"
124125
}
125126
}
126-
}
127+
}

src/__tests__/__snapshots__/Actions.test.tsx.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exports[`should render <Actions /> and compare with snapshot 1`] = `
44
<View
55
accessible={true}
66
focusable={true}
7-
isTVSelectable={true}
87
onClick={[Function]}
98
onResponderGrant={[Function]}
109
onResponderMove={[Function]}

src/__tests__/__snapshots__/InputToolbar.test.tsx.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ exports[`should render <InputToolbar /> and compare with snapshot 1`] = `
3333
<View
3434
accessible={true}
3535
focusable={true}
36-
isTVSelectable={true}
3736
onClick={[Function]}
3837
onResponderGrant={[Function]}
3938
onResponderMove={[Function]}

src/__tests__/__snapshots__/LoadEarlier.test.tsx.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exports[`should render <LoadEarlier /> and compare with snapshot 1`] = `
44
<View
55
accessible={true}
66
focusable={true}
7-
isTVSelectable={true}
87
onClick={[Function]}
98
onResponderGrant={[Function]}
109
onResponderMove={[Function]}

src/__tests__/__snapshots__/MessageContainer.test.tsx.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ exports[`should render <MessageContainer /> and compare with snapshot 1`] = `
3636
inverted={true}
3737
keyExtractor={[Function]}
3838
maxToRenderPerBatch={10}
39-
numColumns={1}
4039
onContentSizeChange={[Function]}
4140
onEndReached={[Function]}
4241
onEndReachedThreshold={0.1}

src/__tests__/__snapshots__/MessageImage.test.tsx.snap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ exports[`should render <MessageImage /> and compare with snapshot 1`] = `
2222
<View
2323
accessible={true}
2424
focusable={true}
25-
isTVSelectable={true}
2625
onClick={[Function]}
2726
onResponderGrant={[Function]}
2827
onResponderMove={[Function]}
2928
onResponderRelease={[Function]}
3029
onResponderTerminate={[Function]}
3130
onResponderTerminationRequest={[Function]}
3231
onStartShouldSetResponder={[Function]}
33-
style={null}
3432
>
3533
<Image
3634
source={
@@ -127,7 +125,6 @@ exports[`should render <MessageImage /> and compare with snapshot 1`] = `
127125
<View
128126
accessible={true}
129127
focusable={true}
130-
isTVSelectable={true}
131128
onClick={[Function]}
132129
onResponderGrant={[Function]}
133130
onResponderMove={[Function]}

tsconfig.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,21 @@
2626
"resolveJsonModule": true,
2727
"noFallthroughCasesInSwitch": true,
2828
"strictPropertyInitialization": false,
29-
"lib": ["es6"],
30-
"typeRoots": ["./node_modules/@types", "./@types"]
29+
"lib": [
30+
"es6"
31+
],
32+
"typeRoots": [
33+
"./node_modules/@types",
34+
"./@types"
35+
]
3136
},
32-
"include": ["src", "./types.d.ts"],
33-
"exclude": ["node_modules", "src/__tests__"]
37+
"include": [
38+
"src",
39+
"./types.d.ts"
40+
],
41+
"exclude": [
42+
"node_modules",
43+
"src/__tests__"
44+
],
45+
"extends": "expo/tsconfig.base"
3446
}

0 commit comments

Comments
 (0)