feature: upgrade dependencies

This commit is contained in:
Radek Czemerys
2020-06-09 15:27:46 +02:00
parent 9544a3b243
commit 03fca14015
9 changed files with 585 additions and 566 deletions

View File

@@ -78,7 +78,7 @@ import com.android.build.OutputFile
*/
project.ext.react = [
enableHermes: false, // clean and rebuild if changing
enableHermes: true, // clean and rebuild if changing
]
apply from: "../../node_modules/react-native/react.gradle"

View File

@@ -6,8 +6,8 @@ buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
compileSdkVersion = 29
targetSdkVersion = 29
}
repositories {
google()

View File

@@ -2,7 +2,7 @@ import './src/global';
import 'react-native-gesture-handler';
import { AppRegistry, YellowBox } from 'react-native';
import App from './src/App';
import { App } from './src/App';
import { name as appName } from './app.json';
// TODO: this breaks typescript and has to be fixed
// import 'style/AndroidTextFix';
@@ -11,8 +11,6 @@ require('react-native').unstable_enableLogBox();
YellowBox.ignoreWarnings([
'The scalesPageToFit property is not supported when useWebKit = true', // we still want to use this property for Android
'Remote debugger is in',
"Can't call", // Can't call forceUpdate on a component that is not yet mounted.
]);
AppRegistry.registerComponent(appName, () => App);

View File

@@ -1,9 +1,9 @@
PODS:
- boost-for-react-native (1.63.0)
- BugsnagReactNative (2.23.7):
- BugsnagReactNative/Core (= 2.23.7)
- BugsnagReactNative (2.23.9):
- BugsnagReactNative/Core (= 2.23.9)
- React
- BugsnagReactNative/Core (2.23.7):
- BugsnagReactNative/Core (2.23.9):
- React
- CocoaAsyncSocket (7.6.4)
- CocoaLibEvent (1.0.0)
@@ -244,11 +244,11 @@ PODS:
- React
- react-native-mail (4.1.0):
- React
- react-native-safe-area-context (1.0.0):
- react-native-safe-area-context (3.0.2):
- React
- react-native-sodium (0.4.0):
- React
- react-native-webview (9.2.2):
- react-native-webview (10.2.3):
- React
- React-RCTActionSheet (0.62.2):
- React-Core/RCTActionSheetHeaders (= 0.62.2)
@@ -311,23 +311,21 @@ PODS:
- ReactCommon/callinvoker (= 0.62.2)
- ReactNativeAlternateIcons (0.3.0):
- React
- ReactNativeDarkMode (0.2.2):
- React
- RNCAsyncStorage (1.10.1):
- RNCAsyncStorage (1.11.0):
- React
- RNCMaskedView (0.1.10):
- React
- RNFileViewer (2.0.2):
- RNFileViewer (2.1.1):
- React
- RNFS (2.16.6):
- React
- RNGestureHandler (1.6.1):
- React
- RNKeychain (6.0.0):
- RNKeychain (6.1.0):
- React
- RNReanimated (1.8.0):
- RNReanimated (1.9.0):
- React
- RNScreens (2.7.0):
- RNScreens (2.8.0):
- React
- RNStoreReview (0.1.5):
- React
@@ -383,7 +381,6 @@ DEPENDENCIES:
- ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- ReactNativeAlternateIcons (from `../node_modules/react-native-alternate-icons`)
- ReactNativeDarkMode (from `../node_modules/react-native-dark-mode`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- RNFileViewer (from `../node_modules/react-native-file-viewer`)
@@ -480,8 +477,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon"
ReactNativeAlternateIcons:
:path: "../node_modules/react-native-alternate-icons"
ReactNativeDarkMode:
:path: "../node_modules/react-native-dark-mode"
RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage"
RNCMaskedView:
@@ -511,7 +506,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
BugsnagReactNative: 14c1b59cfbf34fd5591b734bfec65a277b677ef8
BugsnagReactNative: 10fc11d9a29800052b3747eb45e7c903b3b057d5
CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
@@ -539,9 +534,9 @@ SPEC CHECKSUMS:
react-native-aes: ff31f0dd4c791eb423a631ee04570fcf3c618924
react-native-fingerprint-scanner: f0d8190ceaf0b9e1893e3379d78724375b8f6ea7
react-native-mail: a864fb211feaa5845c6c478a3266de725afdce89
react-native-safe-area-context: a346c75f2288147527365ce27b59ca6d38c27805
react-native-safe-area-context: b11a34881faac509cad5578726c98161ad4d275c
react-native-sodium: ef43e28fdf8d866e68ed06890c32f8d86a570cc7
react-native-webview: 881baa70f381b838964574f48153a2d453402922
react-native-webview: 0bacc79175bc44869e4c1a015b9bc21df8cf4feb
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0
React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71
@@ -553,15 +548,14 @@ SPEC CHECKSUMS:
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
ReactNativeAlternateIcons: b2a8a729d9d9756ed0652c352694f190407f297f
ReactNativeDarkMode: 0178ffca3b10f6a7c9f49d6f9810232b328fa949
RNCAsyncStorage: 39831e0dc5f547a1fb2669eb9e091d460a9be2be
RNCAsyncStorage: d059c3ee71738c39834a627476322a5a8cd5bf36
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
RNFileViewer: b815b353fdc08552766c6325e5b66ff52bb6b7af
RNFileViewer: db62d60dd19007c54b2c959b5e675a46d59f8a43
RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df
RNGestureHandler: 8f09cd560f8d533eb36da5a6c5a843af9f056b38
RNKeychain: bf2d7e9a0ae7a073c07770dd2aa6d11c67581733
RNReanimated: 955cf4068714003d2f1a6e2bae3fb1118f359aff
RNScreens: cf198f915f8a2bf163de94ca9f5bfc8d326c3706
RNKeychain: 7cab1c45629f265ebccd8d737cd4cb5b23a865df
RNReanimated: b5ccb50650ba06f6e749c7c329a1bc3ae0c88b43
RNScreens: 62211832af51e0aebcf6e8c36bcf7dd65592f244
RNStoreReview: 62d6afd7c37db711a594bbffca6b0ea3a812b7a8
RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
sn-textview: f478ee79531da2c7b129c4ea3b20c665e75e1f4b

View File

@@ -20,67 +20,66 @@
"postinstall": "patch-package"
},
"dependencies": {
"@react-native-community/async-storage": "1.10.1",
"@react-native-community/async-storage": "1.11.0",
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/native": "^5.5.1",
"base-64": "^0.1.0",
"base64-arraybuffer": "^0.2.0",
"bugsnag-react-native": "^2.23.7",
"bugsnag-react-native": "^2.23.9",
"immutable": "^3.8.2",
"js-base64": "^2.5.2",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"moment": "^2.26.0",
"react": "16.11.0",
"react-native": "0.62.2",
"react-native-actionsheet": "standardnotes/react-native-actionsheet#9cb323f",
"react-native-aes-crypto": "standardnotes/react-native-aes#d156762",
"react-native-alternate-icons": "standardnotes/react-native-alternate-icons#1d335d",
"react-native-dark-mode": "^0.2.2",
"react-native-fab": "standardnotes/react-native-fab#cb60e00",
"react-native-file-viewer": "^2.0.0",
"react-native-file-viewer": "^2.1.1",
"react-native-fingerprint-scanner": "standardnotes/react-native-fingerprint-scanner#5984941",
"react-native-flag-secure-android": "standardnotes/react-native-flag-secure-android#3d59055",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.6.1",
"react-native-keychain": "^6.0.0",
"react-native-keychain": "^6.1.0",
"react-native-mail": "standardnotes/react-native-mail#9862c76",
"react-native-reanimated": "^1.8.0",
"react-native-safe-area-context": "^1.0.0",
"react-native-screens": "^2.7.0",
"react-native-reanimated": "^1.9.0",
"react-native-safe-area-context": "^3.0.2",
"react-native-screens": "^2.8.0",
"react-native-search-box": "standardnotes/react-native-search-box#f61a2b5",
"react-native-sodium": "standardnotes/react-native-sodium#8a18dd3",
"react-native-store-review": "^0.1.5",
"react-native-vector-icons": "6.6.0",
"react-native-webview": "9.2.2",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-navigation-header-buttons": "^2.1.1",
"react-navigation-stack": "^1.10.3",
"react-native-webview": "^10.2.3",
"react-navigation-header-buttons": "^4.0.2",
"regenerator": "^0.14.2",
"sn-textview": "standardnotes/sn-textview#f42f0bf",
"snjs": "standardnotes/snjs#6249603",
"standard-notes-rn": "standardnotes/standard-notes-rn"
"standard-notes-rn": "standardnotes/standard-notes-rn",
"styled-components": "^5.1.1"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@babel/runtime": "^7.9.6",
"@react-native-community/eslint-config": "^1.1.0",
"@types/detox": "^14.5.2",
"@types/faker": "^4.1.11",
"@types/jest": "^25.2.1",
"@babel/core": "^7.10.2",
"@babel/runtime": "^7.10.2",
"@react-native-community/eslint-config": "^2.0.0",
"@types/detox": "^16.4.1",
"@types/faker": "^4.1.12",
"@types/jest": "^25.2.3",
"@types/js-base64": "^2.3.1",
"@types/lodash": "^4.14.150",
"@types/react-native": "^0.62.8",
"@types/lodash": "^4.14.155",
"@types/react-native": "^0.62.13",
"@types/react-native-vector-icons": "^6.4.5",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"@types/styled-components": "^5.1.0",
"@typescript-eslint/eslint-plugin": "^3.2.0",
"@typescript-eslint/parser": "^3.2.0",
"babel-jest": "^26.0.1",
"concurrently": "^5.2.0",
"detox": "^16.5.0",
"eslint": "^7.0.0",
"eslint": "^7.2.0",
"faker": "^4.1.0",
"jest": "^26.0.1",
"jest-circus": "^26.0.1",
"metro-react-native-babel-preset": "^0.58.0",
"metro-react-native-babel-preset": "^0.59.0",
"npm-run-all": "^4.1.5",
"patch-package": "^6.2.2",
"postinstall-postinstall": "^2.1.0",

View File

@@ -1,7 +1,7 @@
diff --git a/node_modules/react-native-webview/ios/RNCWebView.h b/node_modules/react-native-webview/ios/RNCWebView.h
index 4e94bed..b4349a9 100644
--- a/node_modules/react-native-webview/ios/RNCWebView.h
+++ b/node_modules/react-native-webview/ios/RNCWebView.h
diff --git a/node_modules/react-native-webview/apple/RNCWebView.h b/node_modules/react-native-webview/apple/RNCWebView.h
index c55950f..6c0356c 100644
--- a/node_modules/react-native-webview/apple/RNCWebView.h
+++ b/node_modules/react-native-webview/apple/RNCWebView.h
@@ -35,6 +35,7 @@
@property (nonatomic, assign) BOOL injectedJavaScriptBeforeContentLoadedForMainFrameOnly;
@property (nonatomic, assign) BOOL scrollEnabled;
@@ -10,11 +10,11 @@ index 4e94bed..b4349a9 100644
@property (nonatomic, assign) BOOL pagingEnabled;
@property (nonatomic, assign) CGFloat decelerationRate;
@property (nonatomic, assign) BOOL allowsInlineMediaPlayback;
diff --git a/node_modules/react-native-webview/ios/RNCWebView.m b/node_modules/react-native-webview/ios/RNCWebView.m
index 11385cf..1bfff4d 100644
--- a/node_modules/react-native-webview/ios/RNCWebView.m
+++ b/node_modules/react-native-webview/ios/RNCWebView.m
@@ -123,6 +123,7 @@ - (instancetype)initWithFrame:(CGRect)frame
diff --git a/node_modules/react-native-webview/apple/RNCWebView.m b/node_modules/react-native-webview/apple/RNCWebView.m
index 02b4238..a1f0177 100644
--- a/node_modules/react-native-webview/apple/RNCWebView.m
+++ b/node_modules/react-native-webview/apple/RNCWebView.m
@@ -125,6 +125,7 @@ - (instancetype)initWithFrame:(CGRect)frame
_showsVerticalScrollIndicator = YES;
_directionalLockEnabled = YES;
_automaticallyAdjustContentInsets = YES;
@@ -22,7 +22,7 @@ index 11385cf..1bfff4d 100644
_contentInset = UIEdgeInsetsZero;
_savedKeyboardDisplayRequiresUserAction = YES;
#if !TARGET_OS_OSX
@@ -314,6 +315,9 @@ - (void)removeFromSuperview
@@ -324,6 +325,9 @@ - (void)removeFromSuperview
-(void)showFullScreenVideoStatusBars
{
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -32,21 +32,11 @@ index 11385cf..1bfff4d 100644
_isFullScreenVideoOpen = YES;
RCTUnsafeExecuteOnMainQueueSync(^{
[RCTSharedApplication() setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
@@ -324,6 +328,9 @@ -(void)showFullScreenVideoStatusBars
-(void)hideFullScreenVideoStatusBars
{
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ if (!_autoManageStatusBarEnabled) {
+ return;
+ }
_isFullScreenVideoOpen = NO;
RCTUnsafeExecuteOnMainQueueSync(^{
[RCTSharedApplication() setStatusBarHidden:self->_savedStatusBarHidden animated:YES];
diff --git a/node_modules/react-native-webview/ios/RNCWebViewManager.m b/node_modules/react-native-webview/ios/RNCWebViewManager.m
index b69cfbd..02ae2f4 100644
--- a/node_modules/react-native-webview/ios/RNCWebViewManager.m
+++ b/node_modules/react-native-webview/ios/RNCWebViewManager.m
@@ -54,6 +54,7 @@ - (RCTUIView *)view
diff --git a/node_modules/react-native-webview/apple/RNCWebViewManager.m b/node_modules/react-native-webview/apple/RNCWebViewManager.m
index 23ab93b..ea17ae2 100644
--- a/node_modules/react-native-webview/apple/RNCWebViewManager.m
+++ b/node_modules/react-native-webview/apple/RNCWebViewManager.m
@@ -56,6 +56,7 @@ - (RCTUIView *)view
#endif
RCT_EXPORT_VIEW_PROPERTY(contentInset, UIEdgeInsets)
RCT_EXPORT_VIEW_PROPERTY(automaticallyAdjustContentInsets, BOOL)
@@ -55,10 +45,10 @@ index b69cfbd..02ae2f4 100644
RCT_EXPORT_VIEW_PROPERTY(allowsBackForwardNavigationGestures, BOOL)
RCT_EXPORT_VIEW_PROPERTY(incognito, BOOL)
diff --git a/node_modules/react-native-webview/lib/WebViewTypes.d.ts b/node_modules/react-native-webview/lib/WebViewTypes.d.ts
index cf5c838..062f628 100644
index b532b76..d2427b6 100644
--- a/node_modules/react-native-webview/lib/WebViewTypes.d.ts
+++ b/node_modules/react-native-webview/lib/WebViewTypes.d.ts
@@ -202,6 +202,7 @@ export interface IOSNativeWebViewProps extends CommonNativeWebViewProps {
@@ -207,6 +207,7 @@ export interface IOSNativeWebViewProps extends CommonNativeWebViewProps {
allowsInlineMediaPlayback?: boolean;
allowsLinkPreview?: boolean;
automaticallyAdjustContentInsets?: boolean;
@@ -66,10 +56,10 @@ index cf5c838..062f628 100644
bounces?: boolean;
contentInset?: ContentInsetProp;
contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
@@ -493,6 +494,12 @@ export interface MacOSWebViewProps extends WebViewSharedProps {
* @platform macos
@@ -329,6 +330,12 @@ export interface IOSWebViewProps extends WebViewSharedProps {
* @platform ios
*/
sharedCookiesEnabled?: boolean;
allowsInlineMediaPlayback?: boolean;
+ /**
+ * Set true if StatusBar should be light when user watch video fullscreen.
+ * The default value is `true`.
@@ -77,5 +67,5 @@ index cf5c838..062f628 100644
+ */
+ autoManageStatusBarEnabled?: boolean;
/**
* A Boolean value that determines whether scrolling is disabled in a particular direction.
* The default value is `true`.
* Hide the accessory view when the keyboard is open. Default is false to be
* backward compatible.

View File

@@ -1,9 +1,8 @@
import { Client } from 'bugsnag-react-native';
import React, { Component, useState, useEffect, useCallback } from 'react';
// import { Animated } from 'react-native';
import { createAppContainer, NavigationActions } from 'react-navigation';
import React, { useState, useEffect, useCallback } from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { Text } from 'react-native';
// import { createDrawerNavigator, DrawerActions } from 'react-navigation-drawer';
import { createStackNavigator } from 'react-navigation-stack';
// import Authenticate from '@Screens/Authentication/Authenticate';
// import Compose from '@Screens/Compose';
// import {
@@ -21,13 +20,13 @@ import { createStackNavigator } from 'react-navigation-stack';
// import MainSideMenu from '@Screens/SideMenu/MainSideMenu';
// import ManagePrivileges from '@Screens/ManagePrivileges';
// import NoteSideMenu from '@Screens/SideMenu/NoteSideMenu';
import Root from '@Screens/Root';
// import Root from '@Screens/Root';
// import Settings from '@Screens/Settings/Settings';
// import SideMenuManager from '@Screens/SideMenu/SideMenuManager';
import { MobileApplication } from '@Lib/application';
// import { MobileApplication } from '@Lib/application';
import { CurrentApplication } from './ApplicationContext';
import { ApplicationGroup } from '@Lib/applicationGroup';
import ThemedComponent from '@Components/ThemedComponent';
// import { ApplicationGroup } from '@Lib/applicationGroup';
// import ThemedComponent from '@Components/ThemedComponent';
// import Notes from '@Screens/Notes/Notes';
if (__DEV__ === false) {
@@ -102,9 +101,9 @@ if (__DEV__ === false) {
// screen: ManagePrivileges,
// });
const KeyRecoveryStack = createStackNavigator({
screen: Root,
});
// const KeyRecoveryStack = createStackNavigator({
// screen: Root,
// });
// const AppDrawer = createStackNavigator(
// {
@@ -168,8 +167,6 @@ const KeyRecoveryStack = createStackNavigator({
// }
// );
const AppContainer = createAppContainer(KeyRecoveryStack);
type State = {
ready: boolean;
};
@@ -209,5 +206,9 @@ export const App: React.FC<{}> = () => {
if (!ready) {
return null;
}
return <AppContainer />;
return (
<NavigationContainer>
<Text>ssssss</Text>
</NavigationContainer>
);
};

View File

@@ -112,45 +112,45 @@ export default class Root extends Abstract<AbstractProps, State> {
// }
// }
// );
this.context?.getSyncStatus();
this.syncStatusObserver = Sync.get().registerSyncStatusObserver(
(status: { error: any; retrievedCount: number }) => {
if (status.error) {
const text = 'Unable to connect to sync server.';
this.showingErrorStatus = true;
setTimeout(() => {
// need timeout for syncing on app launch
this.setSubTitle(
text,
this.context?.getThemeService().variables.stylekitWarningColor
);
}, 250);
} else if (status.retrievedCount > 20) {
const text = `Downloading ${status.retrievedCount} items. Keep app open.`;
this.setSubTitle(text);
this.showingDownloadStatus = true;
} else if (this.showingDownloadStatus) {
this.showingDownloadStatus = false;
const text = 'Download Complete.';
this.setSubTitle(text);
setTimeout(() => {
this.setSubTitle(null);
}, 2000);
} else if (this.showingErrorStatus) {
this.setSubTitle(null);
}
}
);
// this.context?.getSyncStatus();
// this.syncStatusObserver = Sync.get().registerSyncStatusObserver(
// (status: { error: any; retrievedCount: number }) => {
// if (status.error) {
// const text = 'Unable to connect to sync server.';
// this.showingErrorStatus = true;
// setTimeout(() => {
// // need timeout for syncing on app launch
// this.setSubTitle(
// text,
// this.context?.getThemeService().variables.stylekitWarningColor
// );
// }, 250);
// } else if (status.retrievedCount > 20) {
// const text = `Downloading ${status.retrievedCount} items. Keep app open.`;
// this.setSubTitle(text);
// this.showingDownloadStatus = true;
// } else if (this.showingDownloadStatus) {
// this.showingDownloadStatus = false;
// const text = 'Download Complete.';
// this.setSubTitle(text);
// setTimeout(() => {
// this.setSubTitle(null);
// }, 2000);
// } else if (this.showingErrorStatus) {
// this.setSubTitle(null);
// }
// }
// );
this.signoutObserver = Auth.get().addEventHandler(async (event: any) => {
if (event === SFAuthManager.DidSignOutEvent) {
this.setSubTitle(null);
const notifyObservers = false;
ApplicationState.getOptions().reset(notifyObservers);
this.reloadOptionsToDefault();
ApplicationState.getOptions().notifyObservers();
}
});
// this.signoutObserver = Auth.get().addEventHandler(async (event: any) => {
// if (event === SFAuthManager.DidSignOutEvent) {
// this.setSubTitle(null);
// const notifyObservers = false;
// ApplicationState.getOptions().reset(notifyObservers);
// this.reloadOptionsToDefault();
// ApplicationState.getOptions().notifyObservers();
// }
// });
this.reloadOptionsToDefault();
}

887
yarn.lock
View File

File diff suppressed because it is too large Load Diff