Skip to content

Commit

Permalink
chore(expo sdk): upgrade to 41
Browse files Browse the repository at this point in the history
- updated react-native-webview-leaflet fork to use new version of webview
- replaced deprecated dependencies + imports

SVA-139
  • Loading branch information
Julian Kwast committed Jun 22, 2021
1 parent 0d0e4e3 commit 624e367
Show file tree
Hide file tree
Showing 7 changed files with 1,588 additions and 774 deletions.
46 changes: 24 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
},
"dependencies": {
"@apollo/react-hooks": "~3.1.5",
"@react-native-community/datetimepicker": "3.0.4",
"@react-native-async-storage/async-storage": "^1.13.0",
"@react-native-community/datetimepicker": "3.2.0",
"@react-native-community/masked-view": "0.1.10",
"@react-native-community/netinfo": "5.9.7",
"@react-native-community/netinfo": "6.0.0",
"@react-navigation/bottom-tabs": "^5.11.10",
"@react-navigation/drawer": "^5.12.5",
"@react-navigation/native": "^5.9.4",
Expand All @@ -36,16 +37,17 @@
"apollo-link-http": "1.5.17",
"apollo-link-rest": "~0.7.3",
"deep-rename-keys": "~0.2.1",
"expo": "^40.0.0",
"expo-asset": "^8.2.1",
"expo-blur": "~8.2.2",
"expo-font": "~8.4.0",
"expo-linear-gradient": "~8.4.0",
"expo-notifications": "~0.8.2",
"expo-permissions": "~10.0.0",
"expo-screen-orientation": "~2.1.0",
"expo-secure-store": "~9.3.0",
"expo-splash-screen": "~0.8.1",
"expo": "^41.0.0",
"expo-asset": "~8.3.1",
"expo-blur": "~9.0.3",
"expo-font": "~9.1.0",
"expo-linear-gradient": "~9.1.0",
"expo-linking": "~2.2.3",
"expo-notifications": "~0.11.6",
"expo-permissions": "~12.0.1",
"expo-screen-orientation": "~3.1.0",
"expo-secure-store": "~10.1.0",
"expo-splash-screen": "~0.10.2",
"graphql": "14.6.0",
"graphql-anywhere": "~4.2.4",
"graphql-tag": "2.10.4",
Expand All @@ -55,28 +57,28 @@
"qs": "^6.7.0",
"react": "16.13.1",
"react-apollo": "~3.1.5",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz",
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
"react-native-autocomplete-input": "^4.2.0",
"react-native-calendars": "^1.1129.0",
"react-native-collapsible": "^1.5.3",
"react-native-elements": "~1.2.0",
"react-native-expo-image-cache": "4.1.0",
"react-native-gesture-handler": "~1.8.0",
"react-native-get-random-values": "^1.5.0",
"react-native-gesture-handler": "~1.10.2",
"react-native-get-random-values": "~1.7.0",
"react-native-modal-dropdown": "https://github.com/donni106/react-native-modal-dropdown#feature/search-options",
"react-native-reanimated": "~1.13.0",
"react-native-reanimated": "~2.1.0",
"react-native-render-html": "4.2.3",
"react-native-render-html-table-bridge": "~0.3.1",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.0.0",
"react-native-snap-carousel": "~3.9.0",
"react-native-svg": "12.1.0",
"react-native-webview": "11.0.0",
"react-native-webview-leaflet": "https://github.com/digorath/react-native-webview-leaflet#d358a18c99cc0d9d9ea57de224b3917c4ad2a58f",
"react-native-webview": "11.2.3",
"react-native-webview-leaflet": "https://github.com/digorath/react-native-webview-leaflet#17513281662f7767e3c107fc86ceca805258ba44",
"styled-components": "~4.3.2"
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"@babel/core": "~7.9.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.12.1",
"@types/lodash": "^4.14.165",
"@types/react": "~16.9.35",
Expand All @@ -95,7 +97,7 @@
"eslint-plugin-react-native": "3.9.1",
"eslint-utils": "1.4.3",
"jest": "25.5.4",
"jest-expo": "^40.0.0",
"jest-expo": "^41.0.0",
"mixin-deep": "^1.3.2",
"prettier": "^2.2.1",
"react-test-renderer": "16.11.0",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/linkHelper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Linking } from 'react-native';
import * as Linking from 'expo-linking';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/storageHelper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncStorage } from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';

// thx to: https://stackoverflow.com/a/35629507/9956365
export const addToStore = async (key, value) =>
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { persistCache } from 'apollo-cache-persist';
import { ApolloClient } from 'apollo-client';
Expand All @@ -10,7 +11,7 @@ import * as SplashScreen from 'expo-splash-screen';
import _isEmpty from 'lodash/isEmpty';
import React, { useEffect, useState } from 'react';
import { ApolloProvider } from 'react-apollo';
import { ActivityIndicator, AsyncStorage, StatusBar } from 'react-native';
import { ActivityIndicator, StatusBar } from 'react-native';
import { SafeAreaProvider } from 'react-native-safe-area-context';

import { auth } from './auth';
Expand Down
10 changes: 5 additions & 5 deletions src/pushNotifications/PermissionHandling.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Alert } from 'react-native';
import * as Permissions from 'expo-permissions';
import { PermissionStatus } from 'expo-permissions';
import * as Notifications from 'expo-notifications';
import Constants from 'expo-constants';

Expand Down Expand Up @@ -63,16 +63,16 @@ export const handleSystemPermissions = async (): Promise<boolean> => {
// Push notifications do not work properly with simulators/emulators
if (!Constants.isDevice) return false;

const { status: existingStatus } = await Permissions.getAsync(Permissions.NOTIFICATIONS);
const { status: existingStatus } = await Notifications.getPermissionsAsync();

let finalStatus = existingStatus;

if (existingStatus === Permissions.PermissionStatus.UNDETERMINED) {
const { status: askedStatus } = await Permissions.askAsync(Permissions.NOTIFICATIONS);
if (existingStatus === PermissionStatus.UNDETERMINED) {
const { status: askedStatus } = await Notifications.requestPermissionsAsync();
finalStatus = askedStatus;
}

return finalStatus === Permissions.PermissionStatus.GRANTED;
return finalStatus === PermissionStatus.GRANTED;
};

export const updatePushToken = async () => {
Expand Down
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"exclude": [
"./node_modules",
"babel.config.js",
]
}
"babel.config.js"
],
"extends": "expo/tsconfig.base"
}
Loading

0 comments on commit 624e367

Please sign in to comment.