From b8af8a386072454273a383435ff502a0c72f89cd Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Wed, 17 Jul 2019 11:06:21 -0400 Subject: [PATCH] Lazy android native modules (#2973) * Lazy loading Android modules * Remove react-native-bottom-sheet * Remove comments * npm audit fix * Update rnn-v2 modals * audit fix * Fix tests --- Makefile | 1 - android/app/build.gradle | 1 - .../mattermost/rnbeta/MainApplication.java | 181 ++++++++++---- .../mattermost/rnbeta/MattermostPackage.java | 33 --- android/settings.gradle | 2 - app/screens/options_modal/options_modal.js | 4 +- .../bottom_sheet/bottom_sheet.android.js | 19 +- app/utils/bottom_sheet/bottom_sheet.ios.js | 4 - package-lock.json | 228 +++++++++--------- package.json | 3 +- 10 files changed, 260 insertions(+), 216 deletions(-) delete mode 100644 android/app/src/main/java/com/mattermost/rnbeta/MattermostPackage.java diff --git a/Makefile b/Makefile index 6027aa303..2fd1ff7f0 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,6 @@ post-install: @sed -i'' -e 's|"./lib/locales": false|"./lib/locales": "./lib/locales"|g' node_modules/intl-messageformat/package.json @sed -i'' -e 's|"./lib/locales": false|"./lib/locales": "./lib/locales"|g' node_modules/intl-relativeformat/package.json @sed -i'' -e 's|"./locale-data/complete.js": false|"./locale-data/complete.js": "./locale-data/complete.js"|g' node_modules/intl/package.json - @sed -i'' -e "s|compile 'com.facebook.react:react-native:0.17.+'|compile 'com.facebook.react:react-native:+'|g" node_modules/react-native-bottom-sheet/android/build.gradle @if [ $(shell grep "const Platform" node_modules/react-native/Libraries/Lists/VirtualizedList.js | grep -civ grep) -eq 0 ]; then \ sed $ -i'' -e "s|const ReactNative = require('ReactNative');|const ReactNative = require('ReactNative');`echo $\\\\\\r;`const Platform = require('Platform');|g" node_modules/react-native/Libraries/Lists/VirtualizedList.js; \ fi diff --git a/android/app/build.gradle b/android/app/build.gradle index 7fc49ec17..84bd2d55b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -226,7 +226,6 @@ dependencies { implementation project(':react-native-video') implementation project(':react-native-navigation') implementation project(':react-native-image-picker') - implementation project(':react-native-bottom-sheet') implementation project(':react-native-device-info') implementation project(':reactnativenotifications') implementation project(':react-native-cookies') diff --git a/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java b/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java index eb952447d..8494c7ed8 100644 --- a/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java +++ b/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java @@ -1,8 +1,5 @@ package com.mattermost.rnbeta; -import com.mattermost.share.SharePackage; -import com.mattermost.share.RealPathUtil; - import android.app.Activity; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -10,42 +7,38 @@ import android.content.Context; import android.content.RestrictionsManager; import android.os.Bundle; import android.util.Log; - import java.io.File; +import java.util.HashMap; import java.util.Arrays; import java.util.List; +import java.util.Map; -import com.facebook.soloader.SoLoader; -import com.facebook.react.ReactPackage; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.bridge.Arguments; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.bridge.ReactMarker; -import com.facebook.react.bridge.ReactMarkerConstants; -import com.facebook.react.bridge.WritableMap; -import com.facebook.react.modules.core.DeviceEventManagerModule; -import com.reactnativedocumentpicker.ReactNativeDocumentPicker; -import com.oblador.keychain.KeychainPackage; -import com.reactlibrary.RNReactNativeDocViewerPackage; +import com.mattermost.share.ShareModule; +import com.learnium.RNDeviceInfo.RNDeviceModule; +import com.imagepicker.ImagePickerModule; +import com.psykar.cookiemanager.CookieManagerModule; +import com.oblador.vectoricons.VectorIconsModule; +import com.wix.reactnativenotifications.RNNotificationsModule; +import io.tradle.react.LocalAuthModule; +import com.gantix.JailMonkey.JailMonkeyModule; +import com.RNFetchBlob.RNFetchBlob; +import io.sentry.RNSentryModule; +import io.sentry.RNSentryEventEmitter; +import com.masteratul.exceptionhandler.ReactNativeExceptionHandlerModule; +import com.inprogress.reactnativeyoutube.YouTubeStandaloneModule; +import com.reactlibrary.RNReactNativeDocViewerModule; +import com.reactnativedocumentpicker.DocumentPicker; +import com.oblador.keychain.KeychainModule; +import com.reactnativecommunity.asyncstorage.AsyncStorageModule; +import com.reactnativecommunity.netinfo.NetInfoModule; +import com.reactnativecommunity.webview.RNCWebViewModule; + import com.brentvatne.react.ReactVideoPackage; -import com.horcrux.svg.SvgPackage; -import com.inprogress.reactnativeyoutube.ReactNativeYouTube; -import io.sentry.RNSentryPackage; -import com.masteratul.exceptionhandler.ReactNativeExceptionHandlerPackage; -import com.RNFetchBlob.RNFetchBlobPackage; -import com.gantix.JailMonkey.JailMonkeyPackage; -import io.tradle.react.LocalAuthPackage; -import com.reactnativecommunity.asyncstorage.AsyncStoragePackage; -import com.reactnativecommunity.netinfo.NetInfoPackage; -import com.reactnativecommunity.webview.RNCWebViewPackage; -import com.swmansion.gesturehandler.react.RNGestureHandlerPackage; -import com.imagepicker.ImagePickerPackage; -import com.gnet.bottomsheet.RNBottomSheetPackage; -import com.learnium.RNDeviceInfo.RNDeviceInfo; -import com.psykar.cookiemanager.CookieManagerPackage; -import com.oblador.vectoricons.VectorIconsPackage; import com.BV.LinearGradient.LinearGradientPackage; +import com.horcrux.svg.SvgPackage; +import com.swmansion.gesturehandler.react.RNGestureHandlerPackage; + import com.reactnativenavigation.NavigationApplication; import com.reactnativenavigation.react.NavigationReactNativeHost; import com.reactnativenavigation.react.ReactGateway; @@ -58,6 +51,23 @@ import com.wix.reactnativenotifications.core.AppLaunchHelper; import com.wix.reactnativenotifications.core.AppLifecycleFacade; import com.wix.reactnativenotifications.core.JsIOHelper; +import com.facebook.react.ReactPackage; +import com.facebook.react.ReactNativeHost; +import com.facebook.react.TurboReactPackage; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.Arguments; +import com.facebook.react.bridge.ReactContext; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactMarker; +import com.facebook.react.bridge.ReactMarkerConstants; +import com.facebook.react.bridge.WritableMap; +import com.facebook.react.module.model.ReactModuleInfo; +import com.facebook.react.module.model.ReactModuleInfoProvider; +import com.facebook.react.modules.core.DeviceEventManagerModule; +import com.facebook.soloader.SoLoader; + +import com.mattermost.share.RealPathUtil; + public class MainApplication extends NavigationApplication implements INotificationsApplication, INotificationsDrawerApplication { public static MainApplication instance; @@ -95,29 +105,96 @@ public class MainApplication extends NavigationApplication implements INotificat // Add the packages you require here. // No need to add RnnPackage and MainReactPackage return Arrays.asList( - new ImagePickerPackage(), - new RNBottomSheetPackage(), - new RNDeviceInfo(), - new CookieManagerPackage(), - new VectorIconsPackage(), + new TurboReactPackage() { + @Override + public NativeModule getModule(String name, ReactApplicationContext reactContext) { + switch (name) { + case "MattermostShare": + return new ShareModule(instance, reactContext); + case "RNDeviceInfo": + return new RNDeviceModule(reactContext, false); + case "ImagePickerManager": + return new ImagePickerModule(reactContext, R.style.DefaultExplainingPermissionsTheme); + case "RNCookieManagerAndroid": + return new CookieManagerModule(reactContext); + case "RNVectorIconsModule": + return new VectorIconsModule(reactContext); + case "WixRNNotifications": + return new RNNotificationsModule(instance, reactContext); + case "RNLocalAuth": + return new LocalAuthModule(reactContext); + case "JailMonkey": + return new JailMonkeyModule(reactContext); + case "RNFetchBlob": + return new RNFetchBlob(reactContext); + case "MattermostManaged": + return MattermostManagedModule.getInstance(reactContext); + case "NotificationPreferences": + return NotificationPreferencesModule.getInstance(instance, reactContext); + case "RNTextInputReset": + return new RNTextInputResetModule(reactContext); + case "RNSentry": + return new RNSentryModule(reactContext); + case "RNSentryEventEmitter": + return new RNSentryEventEmitter(reactContext); + case "ReactNativeExceptionHandler": + return new ReactNativeExceptionHandlerModule(reactContext); + case "YouTubeStandaloneModule": + return new YouTubeStandaloneModule(reactContext); + case "RNReactNativeDocViewer": + return new RNReactNativeDocViewerModule(reactContext); + case "RNDocumentPicker": + return new DocumentPicker(reactContext); + case "RNKeychainManager": + return new KeychainModule(reactContext); + case AsyncStorageModule.NAME: + return new AsyncStorageModule(reactContext); + case NetInfoModule.NAME: + return new NetInfoModule(reactContext); + case RNCWebViewModule.MODULE_NAME: + return new RNCWebViewModule(reactContext); + default: + throw new IllegalArgumentException("Could not find module " + name); + } + } + + @Override + public ReactModuleInfoProvider getReactModuleInfoProvider() { + return new ReactModuleInfoProvider() { + @Override + public Map getReactModuleInfos() { + Map map = new HashMap<>(); + map.put("MattermostManaged", new ReactModuleInfo("MattermostManaged", "com.mattermost.rnbeta.MattermostManagedModule", false, false, false, false, false)); + map.put("NotificationPreferences", new ReactModuleInfo("NotificationPreferences", "com.mattermost.rnbeta.NotificationPreferencesModule", false, false, false, false, false)); + map.put("RNTextInputReset", new ReactModuleInfo("RNTextInputReset", "com.mattermost.rnbeta.RNTextInputResetModule", false, false, false, false, false)); + + map.put("MattermostShare", new ReactModuleInfo("MattermostShare", "com.mattermost.share.ShareModule", false, false, true, false, false)); + map.put("RNDeviceInfo", new ReactModuleInfo("RNDeviceInfo", "com.learnium.RNDeviceInfo.RNDeviceModule", false, false, true, false, false)); + map.put("ImagePickerManager", new ReactModuleInfo("ImagePickerManager", "com.imagepicker.ImagePickerModule", false, false, false, false, false)); + map.put("RNCookieManagerAndroid", new ReactModuleInfo("RNCookieManagerAndroid", "com.psykar.cookiemanager.CookieManagerModule", false, false, false, false, false)); + map.put("RNVectorIconsModule", new ReactModuleInfo("RNVectorIconsModule", "com.oblador.vectoricons.VectorIconsModule", false, false, false, false, false)); + map.put("WixRNNotifications", new ReactModuleInfo("WixRNNotifications", "com.wix.reactnativenotifications.RNNotificationsModule", false, false, false, false, false)); + map.put("RNLocalAuth", new ReactModuleInfo("RNLocalAuth", "io.tradle.react.LocalAuthModule", false, false, false, false, false)); + map.put("JailMonkey", new ReactModuleInfo("JailMonkey", "com.gantix.JailMonkey.JailMonkeyModule", false, false, true, false, false)); + map.put("RNFetchBlob", new ReactModuleInfo("RNFetchBlob", "com.RNFetchBlob.RNFetchBlob", false, false, true, false, false)); + map.put("RNSentry", new ReactModuleInfo("RNSentry", "com.sentry.RNSentryModule", false, false, true, false, false)); + map.put("RNSentryEventEmitter", new ReactModuleInfo("RNSentryEventEmitter", "com.sentry.RNSentryEventEmitter", false, false, true, false, false)); + map.put("ReactNativeExceptionHandler", new ReactModuleInfo("ReactNativeExceptionHandler", "com.masteratul.exceptionhandler.ReactNativeExceptionHandlerModule", false, false, false, false, false)); + map.put("YouTubeStandaloneModule", new ReactModuleInfo("YouTubeStandaloneModule", "com.inprogress.reactnativeyoutube.YouTubeStandaloneModule", false, false, false, false, false)); + map.put("RNReactNativeDocViewer", new ReactModuleInfo("RNReactNativeDocViewer", "com.reactlibrary.RNReactNativeDocViewerModule", false, false, false, false, false)); + map.put("RNDocumentPicker", new ReactModuleInfo("RNDocumentPicker", "com.reactnativedocumentpicker.DocumentPicker", false, false, false, false, false)); + map.put("RNKeychainManager", new ReactModuleInfo("RNKeychainManager", "com.oblador.keychain.KeychainModule", false, false, true, false, false)); + map.put(AsyncStorageModule.NAME, new ReactModuleInfo(AsyncStorageModule.NAME, "com.reactnativecommunity.asyncstorage.AsyncStorageModule", false, false, false, false, false)); + map.put(NetInfoModule.NAME, new ReactModuleInfo(NetInfoModule.NAME, "com.reactnativecommunity.netinfo.NetInfoModule", false, false, false, false, false)); + map.put(RNCWebViewModule.MODULE_NAME, new ReactModuleInfo(RNCWebViewModule.MODULE_NAME, "com.reactnativecommunity.webview.RNCWebViewModule", false, false, false, false, false)); + return map; + } + }; + } + }, new SvgPackage(), new LinearGradientPackage(), - new RNNotificationsPackage(this), - new LocalAuthPackage(), - new JailMonkeyPackage(), - new RNFetchBlobPackage(), - new MattermostPackage(this), - new RNSentryPackage(), - new ReactNativeExceptionHandlerPackage(), - new ReactNativeYouTube(), new ReactVideoPackage(), - new RNReactNativeDocViewerPackage(), - new ReactNativeDocumentPicker(), - new SharePackage(this), - new KeychainPackage(), - new AsyncStoragePackage(), - new NetInfoPackage(), - new RNCWebViewPackage(), new RNGestureHandlerPackage() ); } diff --git a/android/app/src/main/java/com/mattermost/rnbeta/MattermostPackage.java b/android/app/src/main/java/com/mattermost/rnbeta/MattermostPackage.java deleted file mode 100644 index 7c5d4021b..000000000 --- a/android/app/src/main/java/com/mattermost/rnbeta/MattermostPackage.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.mattermost.rnbeta; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import com.facebook.react.ReactPackage; -import com.facebook.react.bridge.NativeModule; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.uimanager.ViewManager; -import com.facebook.react.bridge.JavaScriptModule; - -public class MattermostPackage implements ReactPackage { - private final MainApplication mApplication; - - public MattermostPackage(MainApplication application) { - mApplication = application; - } - - @Override - public List createNativeModules(ReactApplicationContext reactContext) { - return Arrays.asList( - MattermostManagedModule.getInstance(reactContext), - NotificationPreferencesModule.getInstance(mApplication, reactContext), - new RNTextInputResetModule(reactContext) - ); - } - - @Override - public List createViewManagers(ReactApplicationContext reactContext) { - return Arrays.asList(); - } -} diff --git a/android/settings.gradle b/android/settings.gradle index a07602e25..d1a5881e5 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -25,8 +25,6 @@ include ':react-native-navigation' project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/') include ':react-native-image-picker' project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android') -include ':react-native-bottom-sheet' -project(':react-native-bottom-sheet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bottom-sheet/android') include ':react-native-device-info' project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android') include ':react-native-cookies' diff --git a/app/screens/options_modal/options_modal.js b/app/screens/options_modal/options_modal.js index d39a62f29..58595ef4d 100644 --- a/app/screens/options_modal/options_modal.js +++ b/app/screens/options_modal/options_modal.js @@ -74,8 +74,8 @@ export default class OptionsModal extends PureComponent { }; onItemPress = () => { - this.props.actions.dismissModal(); - } + this.close(); + }; render() { const { diff --git a/app/utils/bottom_sheet/bottom_sheet.android.js b/app/utils/bottom_sheet/bottom_sheet.android.js index 890420ff0..e45100b26 100644 --- a/app/utils/bottom_sheet/bottom_sheet.android.js +++ b/app/utils/bottom_sheet/bottom_sheet.android.js @@ -1,5 +1,20 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -import RNBottomSheet from 'react-native-bottom-sheet'; -export default RNBottomSheet; +import {store} from 'app/mattermost'; +import {showModalOverCurrentContext} from 'app/actions/navigation'; + +export default { + showBottomSheetWithOptions: (options, callback) => { + function itemAction(index) { + callback(index); + } + + const items = options.options.splice(0, options.cancelButtonIndex).map((o, index) => ({ + action: () => itemAction(index), + text: o, + })); + + store.dispatch(showModalOverCurrentContext('OptionsModal', {title: '', items})); + }, +}; diff --git a/app/utils/bottom_sheet/bottom_sheet.ios.js b/app/utils/bottom_sheet/bottom_sheet.ios.js index 0ba3abc9e..e4d946266 100644 --- a/app/utils/bottom_sheet/bottom_sheet.ios.js +++ b/app/utils/bottom_sheet/bottom_sheet.ios.js @@ -7,8 +7,4 @@ export default { showBottomSheetWithOptions: (options, callback) => { return ActionSheetIOS.showActionSheetWithOptions(options, callback); }, - - showShareBottomSheetWithOptions: (options, failureCallback, successCallback) => { - return ActionSheetIOS.showShareActionSheetWithOptions(options, failureCallback, successCallback); - }, }; diff --git a/package-lock.json b/package-lock.json index bd8d22566..611383daa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3550,9 +3550,9 @@ "integrity": "sha512-Aksg16keqrxaluFRZwmo8O8ppP9TFylyCEwBElmxeZ+a6DQAvyMn5nS3n+lgSpkYsrwU2ZGVjDluhkjtBrkEqQ==" }, "@react-native-community/cli": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-1.9.4.tgz", - "integrity": "sha512-7XjgqCdi23g6V7RV4tsYvqVqOBtNjAsWe5Oj2dR5KxDi3YqUyIyPjDWzyFkIxiO9XTGp9Al4QSmRwtOERvHO8A==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-1.10.0.tgz", + "integrity": "sha512-48tIWsMKhwbDsKhe5tYcsspsAy7aR3J/yRjdsVh+M2qkKEASe66Xbhiw5RK2nhfzd1IdOdlIxNMiC+9uad6NMQ==", "requires": { "chalk": "^1.1.1", "commander": "^2.19.0", @@ -3613,9 +3613,9 @@ } }, "node-fetch": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", - "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" }, "semver": { "version": "5.7.0", @@ -5238,6 +5238,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -5282,7 +5283,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true + "dev": true, + "optional": true }, "is-glob": { "version": "4.0.1", @@ -5534,13 +5536,13 @@ } }, "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", "requires": { "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", "utils-merge": "1.0.1" } }, @@ -5594,13 +5596,13 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cosmiconfig": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz", - "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "requires": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", - "js-yaml": "^3.13.0", + "js-yaml": "^3.13.1", "parse-json": "^4.0.0" } }, @@ -7174,16 +7176,16 @@ } }, "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "requires": { "debug": "2.6.9", - "encodeurl": "~1.0.1", + "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", "unpipe": "~1.0.0" } }, @@ -7674,7 +7676,8 @@ "ansi-regex": { "version": "2.1.1", "resolved": false, - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "optional": true }, "aproba": { "version": "1.2.0", @@ -7695,12 +7698,14 @@ "balanced-match": { "version": "1.0.0", "resolved": false, - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7715,17 +7720,20 @@ "code-point-at": { "version": "1.1.0", "resolved": false, - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "optional": true }, "concat-map": { "version": "0.0.1", "resolved": false, - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": false, - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -7842,7 +7850,8 @@ "inherits": { "version": "2.0.3", "resolved": false, - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "optional": true }, "ini": { "version": "1.3.5", @@ -7854,6 +7863,7 @@ "version": "1.0.0", "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7868,6 +7878,7 @@ "version": "3.0.4", "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7875,12 +7886,14 @@ "minimist": { "version": "0.0.8", "resolved": false, - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "optional": true }, "minipass": { "version": "2.3.5", "resolved": false, "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7899,6 +7912,7 @@ "version": "0.5.1", "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "optional": true, "requires": { "minimist": "0.0.8" } @@ -7979,7 +7993,8 @@ "number-is-nan": { "version": "1.0.1", "resolved": false, - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "optional": true }, "object-assign": { "version": "4.1.1", @@ -7991,6 +8006,7 @@ "version": "1.4.0", "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "optional": true, "requires": { "wrappy": "1" } @@ -8076,7 +8092,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": false, - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -8112,6 +8129,7 @@ "version": "1.0.2", "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8131,6 +8149,7 @@ "version": "3.0.1", "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -8174,12 +8193,14 @@ "wrappy": { "version": "1.0.2", "resolved": false, - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "optional": true }, "yallist": { "version": "3.0.3", "resolved": false, - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "optional": true } } }, @@ -8570,21 +8591,21 @@ } }, "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", "requires": { "depd": "~1.1.2", - "inherits": "2.0.3", + "inherits": "2.0.4", "setprototypeof": "1.1.1", "statuses": ">= 1.5.0 < 2", "toidentifier": "1.0.0" }, "dependencies": { - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" } } }, @@ -12830,7 +12851,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "requires": { "graceful-fs": "^4.1.2", @@ -12881,9 +12902,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==" }, "lodash-es": { "version": "4.17.11", @@ -13348,9 +13369,9 @@ } }, "node-fetch": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", - "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" } } }, @@ -13647,9 +13668,9 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -14651,7 +14672,7 @@ }, "get-stream": { "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" } } @@ -14866,7 +14887,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" }, "pirates": { @@ -15233,9 +15254,9 @@ } }, "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raven-js": { "version": "3.27.1", @@ -15344,9 +15365,9 @@ } }, "react-native": { - "version": "0.59.8", - "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.59.8.tgz", - "integrity": "sha512-x1T+/pEXrjgdH9uDzd5doJy5aFlBqW04j7ljDKIGALchhnvdFbtXXrUZ/1PfWHMrIdZxtaDt4tkSttp662GSQA==", + "version": "0.59.9", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.59.9.tgz", + "integrity": "sha512-/+8EgIZwFpYHyyJ7Zav7B6LHNrytwUQ+EKGT/QV7HSrgpf2Y5NZNeUYUHKiVKLYpBip1G32/LcAECQj37YRwGQ==", "requires": { "@babel/runtime": "^7.0.0", "@react-native-community/cli": "^1.2.1", @@ -15401,9 +15422,9 @@ }, "dependencies": { "node-fetch": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", - "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" }, "semver": { "version": "5.7.0", @@ -15420,11 +15441,6 @@ "prop-types": "^15.5.10" } }, - "react-native-bottom-sheet": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/react-native-bottom-sheet/-/react-native-bottom-sheet-1.0.3.tgz", - "integrity": "sha512-FG02lkWYVS5HyqzsQF8edsfWkbjHa01hd8g/eNqrc+sBH1fCoi8GZTS8trHMsLdSGY2lZajb7MYSpM2Ltb3ZsA==" - }, "react-native-button": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/react-native-button/-/react-native-button-2.4.0.tgz", @@ -16035,7 +16051,8 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true + "dev": true, + "optional": true }, "braces": { "version": "2.3.2", @@ -16298,7 +16315,8 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true + "dev": true, + "optional": true }, "micromatch": { "version": "3.1.10", @@ -17232,9 +17250,9 @@ "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==" }, "send": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.0.tgz", - "integrity": "sha512-NYR0jCuwnBaGA2X5bO3+QDZmmJ+PUCvFCRTED5nx9l/BK3Pr8mD8Ryvk9bw08JJUdXxt2u+tVIGoqJPrHWGqSA==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -17247,7 +17265,7 @@ "mime": "1.6.0", "ms": "2.1.1", "on-finished": "~2.3.0", - "range-parser": "~1.2.0", + "range-parser": "~1.2.1", "statuses": "~1.5.0" }, "dependencies": { @@ -17255,11 +17273,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -17269,14 +17282,14 @@ "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=" }, "serve-static": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.0.tgz", - "integrity": "sha512-Kg15ayeXWLhAE5T9adD3xGcEHchIZsDUExIIfSTOzg6kgmIa86NP8NpuOAYKLbPEYU1OQ+KCQrtKh8AG3h7KAQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.0" + "send": "0.17.1" } }, "set-blocking": { @@ -17285,9 +17298,9 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -17903,9 +17916,9 @@ } }, "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, "stealthy-require": { "version": "1.1.1", @@ -18427,9 +18440,9 @@ } }, "ua-parser-js": { - "version": "0.7.19", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz", - "integrity": "sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ==" + "version": "0.7.20", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.20.tgz", + "integrity": "sha512-8OaIKfzL5cpx8eCMAhhvTlft8GYF8b2eQr6JkCyVdrgjcytyOmPCXrqXFcUnhonRpLlh5yxEZVohm6mzaowUOw==" }, "uglify-es": { "version": "3.3.9", @@ -18494,39 +18507,20 @@ "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==" }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "set-value": "^2.0.1" }, "dependencies": { "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } } } }, @@ -19092,9 +19086,9 @@ "integrity": "sha1-Wfod4gHzby80cNysX1jMwoMLCpo=" }, "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { "version": "3.2.1", diff --git a/package.json b/package.json index 37ebd7714..8a326c0b2 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,8 @@ "prop-types": "15.7.2", "react": "16.8.6", "react-intl": "2.8.0", - "react-native": "0.59.8", + "react-native": "0.59.9", "react-native-animatable": "1.3.2", - "react-native-bottom-sheet": "1.0.3", "react-native-button": "2.4.0", "react-native-calendars": "github:mattermost/react-native-calendars#4937ec5a3bf7e86f9f35fcd85eb4aa6133f45b58", "react-native-circular-progress": "1.1.0",