From a1a0e0b7f01e6760247a74bba1621deade613801 Mon Sep 17 00:00:00 2001 From: keplyx Date: Sun, 26 Jan 2020 17:51:15 +0100 Subject: [PATCH] Updated expo and other libs to newer version --- App.js | 9 ++++---- app.json | 2 +- clear-node-cache.sh | 1 + navigation/MainTabNavigator.js | 12 ++++++---- package.json | 34 +++++++++++++++------------- screens/About/AboutScreen.js | 2 +- screens/DebugScreen.js | 2 +- screens/PlanningScreen.js | 2 +- screens/Proximo/ProximoListScreen.js | 2 +- 9 files changed, 35 insertions(+), 31 deletions(-) create mode 100755 clear-node-cache.sh diff --git a/App.js b/App.js index 7942001..9644f2d 100644 --- a/App.js +++ b/App.js @@ -1,15 +1,12 @@ // @flow import * as React from 'react'; -import {StatusBar, Platform } from 'react-native'; +import {StatusBar, Platform} from 'react-native'; import {Root, StyleProvider} from 'native-base'; import {createAppContainerWithInitialRoute} from './navigation/AppNavigator'; import ThemeManager from './utils/ThemeManager'; import LocaleManager from './utils/LocaleManager'; import * as Font from 'expo-font'; -// edited native-base-shoutem-theme according to -// https://github.com/GeekyAnts/theme/pull/5/files/91f67c55ca6e65fe3af779586b506950c9f331be#diff-4cfc2dd4d5dae7954012899f2268a422 -// to allow for dynamic theme switching import {clearThemeCache} from 'native-base-shoutem-theme'; import AsyncStorageManager from "./utils/AsyncStorageManager"; import CustomIntroSlider from "./components/CustomIntroSlider"; @@ -81,6 +78,7 @@ export default class App extends React.Component { await Font.loadAsync({ 'Roboto': require('native-base/Fonts/Roboto.ttf'), 'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'), + 'material-community': require('native-base/Fonts/MaterialCommunityIcons.ttf'), }); await AsyncStorageManager.getInstance().loadPreferences(); ThemeManager.getInstance().setUpdateThemeCallback(() => this.updateTheme()); @@ -118,7 +116,8 @@ export default class App extends React.Component { ); } if (this.state.showIntro || this.state.showUpdate) { - return this.onIntroDone()} isUpdate={this.state.showUpdate && !this.state.showIntro}/>; + return this.onIntroDone()} + isUpdate={this.state.showUpdate && !this.state.showIntro}/>; } else { const AppNavigator = createAppContainerWithInitialRoute(AsyncStorageManager.getInstance().preferences.defaultStartScreen.current); return ( diff --git a/app.json b/app.json index c7402a8..ff728d8 100644 --- a/app.json +++ b/app.json @@ -4,7 +4,7 @@ "description": "Application mobile compatible Android et iOS pour l'Amicale INSA Toulouse. Grâce à cette application, vous avez facilement accès aux news du campus, aux emplois du temps, à l'état de la laverie, et bien d'autres services ! Ceci est une version Beta, Toutes les fonctionnalités ne sont pas encore implémentées, et il est possible de rencontrer quelques bugs.", "slug": "application-amicale", "privacy": "public", - "sdkVersion": "33.0.0", + "sdkVersion": "36.0.0", "platforms": [ "ios", "android", diff --git a/clear-node-cache.sh b/clear-node-cache.sh new file mode 100755 index 0000000..c9bd8af --- /dev/null +++ b/clear-node-cache.sh @@ -0,0 +1 @@ +rm -rf node_modules/ && rm -f package-lock.json && rm -f yarn.lock && npm cache verify && npm install && expo r -c diff --git a/navigation/MainTabNavigator.js b/navigation/MainTabNavigator.js index 04f725f..33ec229 100644 --- a/navigation/MainTabNavigator.js +++ b/navigation/MainTabNavigator.js @@ -26,18 +26,20 @@ function createMaterialBottomTabNavigatorWithInitialRoute(initialRoute: string) Proximo: {screen: ProximoMainScreen,}, Planex: { screen: PlanexScreen, - navigationOptions: ({ navigation }) => { + navigationOptions: ({navigation}) => { const showTabBar = navigation.state && navigation.state.params ? navigation.state.params.showTabBar : true; return { tabBarVisible: showTabBar, }; - },}, + }, + }, }, { defaultNavigationOptions: ({navigation}) => ({ - tabBarIcon: ({focused, horizontal, tintColor}) => { + tabBarIcon: ({focused, tintColor}) => { let icon = TAB_ICONS[navigation.state.routeName]; - - return ; + // tintColor is ignoring activeColor et inactiveColor for some reason + let color = focused ? "#f0edf6" : "#4e1108"; + return ; }, tabBarVisible: true, }), diff --git a/package.json b/package.json index 2122e9e..07f21c2 100644 --- a/package.json +++ b/package.json @@ -8,38 +8,40 @@ "eject": "expo eject" }, "dependencies": { - "@expo/vector-icons": "^10.0.2", + "@expo/vector-icons": "^10.0.0", "@react-native-community/status-bar": "^1.0.3", "@shoutem/theme": "^0.11.3", - "expo": "^33.0.7", - "expo-font": "^5.0.1", - "expo-linear-gradient": "^5.0.1", - "expo-localization": "^5.0.1", - "expo-permissions": "^5.0.1", + "expo": "^36.0.0", + "expo-font": "~8.0.0", + "expo-linear-gradient": "~8.0.0", + "expo-localization": "~8.0.0", + "expo-permissions": "~8.0.0", "i18n-js": "^3.3.0", "native-base": "^2.12.1", - "native-base-shoutem-theme": "^0.2.3", - "react": "^16.8.6", - "react-dom": "^16.8.6", - "react-native": "^0.59.9", + "native-base-shoutem-theme": "^0.3.1", + "react": "16.9.0", + "react-dom": "16.9.0", + "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz", "react-native-app-intro-slider": "^3.0.0", "react-native-autolink": "^1.8.1", "react-native-calendars": "^1.212.0", + "react-native-gesture-handler": "~1.5.0", + "react-native-material-menu": "^0.6.7", "react-native-modal": "^11.3.1", - "react-native-modalize": "^1.2.1", + "react-native-modalize": "^1.3.6", "react-native-paper": "^2.16.0", "react-native-platform-touchable": "^1.1.1", + "react-native-reanimated": "~1.4.0", "react-native-render-html": "^4.1.2", "react-native-side-menu": "^1.1.3", "react-native-status-bar-height": "^2.3.1", - "react-native-webview": "^5.8.1", - "react-navigation": "^3.11.0", - "react-navigation-material-bottom-tabs": "^1.0.0", + "react-native-webview": "7.4.3", + "react-navigation": "^3.13.0", + "react-navigation-material-bottom-tabs": "^1.1.1", "react-navigation-transitions": "^1.0.12" }, "devDependencies": { - "babel-preset-expo": "^5.1.1", - "react-native-material-menu": "^0.6.3" + "babel-preset-expo": "^8.0.0" }, "private": true } diff --git a/screens/About/AboutScreen.js b/screens/About/AboutScreen.js index 701bc9a..0c361ca 100644 --- a/screens/About/AboutScreen.js +++ b/screens/About/AboutScreen.js @@ -9,7 +9,7 @@ import appJson from '../../app'; import packageJson from '../../package'; import CustomMaterialIcon from "../../components/CustomMaterialIcon"; import AsyncStorageManager from "../../utils/AsyncStorageManager"; -import Modalize from "react-native-modalize"; +import {Modalize} from "react-native-modalize"; import ThemeManager from "../../utils/ThemeManager"; const links = { diff --git a/screens/DebugScreen.js b/screens/DebugScreen.js index 0e73ba7..f5c1347 100644 --- a/screens/DebugScreen.js +++ b/screens/DebugScreen.js @@ -28,7 +28,7 @@ import Touchable from "react-native-platform-touchable"; import {Alert, View, Clipboard, Image} from "react-native"; import AsyncStorageManager from "../utils/AsyncStorageManager"; import NotificationsManager from "../utils/NotificationsManager"; -import Modalize from "react-native-modalize"; +import {Modalize} from "react-native-modalize"; type Props = { navigation: Object, diff --git a/screens/PlanningScreen.js b/screens/PlanningScreen.js index 132ad97..3d936f5 100644 --- a/screens/PlanningScreen.js +++ b/screens/PlanningScreen.js @@ -11,7 +11,7 @@ import BaseContainer from "../components/BaseContainer"; import {Agenda, LocaleConfig} from 'react-native-calendars'; import HTML from 'react-native-render-html'; import Touchable from 'react-native-platform-touchable'; -import Modalize from 'react-native-modalize'; +import {Modalize} from 'react-native-modalize'; import WebDataManager from "../utils/WebDataManager"; import CustomMaterialIcon from "../components/CustomMaterialIcon"; diff --git a/screens/Proximo/ProximoListScreen.js b/screens/Proximo/ProximoListScreen.js index 7575f8c..09918a6 100644 --- a/screens/Proximo/ProximoListScreen.js +++ b/screens/Proximo/ProximoListScreen.js @@ -9,7 +9,7 @@ import Menu, {MenuItem} from 'react-native-material-menu'; import i18n from "i18n-js"; import CustomMaterialIcon from "../../components/CustomMaterialIcon"; import ThemeManager from "../../utils/ThemeManager"; -import Modalize from 'react-native-modalize'; +import {Modalize} from 'react-native-modalize'; const sortMode = { price: "0",