Page MenuHomePhabricator

D6414.id21604.diff
No OneTemporary

D6414.id21604.diff

diff --git a/native/.flowconfig b/native/.flowconfig
--- a/native/.flowconfig
+++ b/native/.flowconfig
@@ -23,7 +23,6 @@
[declarations]
.*/node_modules/react-native-camera/*
-.*/node_modules/react-native-firebase/*
[include]
../node_modules
diff --git a/native/android/app/src/main/java/app/comm/android/MainApplication.java b/native/android/app/src/main/java/app/comm/android/MainApplication.java
--- a/native/android/app/src/main/java/app/comm/android/MainApplication.java
+++ b/native/android/app/src/main/java/app/comm/android/MainApplication.java
@@ -18,8 +18,6 @@
import com.wix.reactnativekeyboardinput.KeyboardInputPackage;
import expo.modules.ApplicationLifecycleDispatcher;
import expo.modules.ReactNativeHostWrapper;
-import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
-import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.security.Security;
@@ -43,8 +41,6 @@
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
- packages.add(new RNFirebaseMessagingPackage());
- packages.add(new RNFirebaseNotificationsPackage());
packages.add(new KeyboardInputPackage(this.getApplication()));
packages.add(new CommAndroidNotificationsPackage());
return packages;
diff --git a/native/package.json b/native/package.json
--- a/native/package.json
+++ b/native/package.json
@@ -94,7 +94,6 @@
"react-native-fast-image": "^8.3.0",
"react-native-ffmpeg": "^0.4.4",
"react-native-figma-squircle": "^0.1.2",
- "react-native-firebase": "^5.6.0",
"react-native-floating-action": "^1.22.0",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.8.0",
diff --git a/native/push/firebase.js b/native/push/firebase.js
deleted file mode 100644
--- a/native/push/firebase.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// @flow
-
-import invariant from 'invariant';
-import { Platform } from 'react-native';
-import type { App as FirebaseModule } from 'react-native-firebase';
-
-// Will crash if not Android
-let cachedFirebase: FirebaseModule | null = null;
-function getFirebase(): FirebaseModule {
- if (cachedFirebase !== null) {
- return cachedFirebase;
- }
- invariant(
- Platform.OS === 'android',
- 'react-native-firebase only used on Android at the moment',
- );
- const module: FirebaseModule = (require('react-native-firebase'): any);
- cachedFirebase = module;
- return cachedFirebase;
-}
-
-export { getFirebase };
diff --git a/native/react-native.config.js b/native/react-native.config.js
deleted file mode 100644
--- a/native/react-native.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable flowtype/require-valid-file-annotation */
-
-module.exports = {
- dependencies: {
- 'react-native-firebase': { platforms: { ios: null } },
- },
-};
diff --git a/patches/react-native-firebase+5.6.0.patch b/patches/react-native-firebase+5.6.0.patch
deleted file mode 100644
--- a/patches/react-native-firebase+5.6.0.patch
+++ /dev/null
@@ -1,878 +0,0 @@
-diff --git a/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/messaging/RNFirebaseMessaging.java b/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/messaging/RNFirebaseMessaging.java
-index d0836e2..5917d97 100644
---- a/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/messaging/RNFirebaseMessaging.java
-+++ b/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/messaging/RNFirebaseMessaging.java
-@@ -213,4 +213,14 @@ public class RNFirebaseMessaging extends ReactContextBaseJavaModule {
- }
- }
- }
-+
-+ @ReactMethod
-+ public void addListener(String eventName) {
-+ // Required by NativeEventEmitter
-+ }
-+
-+ @ReactMethod
-+ public void removeListeners(Integer count) {
-+ // Required by NativeEventEmitter
-+ }
- }
-diff --git a/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java b/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java
-index c9d63ff..ef725ad 100644
---- a/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java
-+++ b/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java
-@@ -475,7 +475,7 @@ public class DisplayNotificationTask extends AsyncTask<Void, Void, Void> {
- context,
- notificationId.hashCode(),
- intent,
-- PendingIntent.FLAG_UPDATE_CURRENT
-+ PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE
- );
- }
-
-diff --git a/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotifications.java b/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotifications.java
-index 7115b38..9f72acf 100644
---- a/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotifications.java
-+++ b/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotifications.java
-@@ -480,4 +480,14 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
- }
- }
- }
-+
-+ @ReactMethod
-+ public void addListener(String eventName) {
-+ // Required by NativeEventEmitter
-+ }
-+
-+ @ReactMethod
-+ public void removeListeners(Integer count) {
-+ // Required by NativeEventEmitter
-+ }
- }
-diff --git a/node_modules/react-native-firebase/dist/common/commonTypes.flow.js.flow b/node_modules/react-native-firebase/dist/common/commonTypes.flow.js.flow
-index 228a72d..982a997 100644
---- a/node_modules/react-native-firebase/dist/common/commonTypes.flow.js.flow
-+++ b/node_modules/react-native-firebase/dist/common/commonTypes.flow.js.flow
-@@ -1,3 +1,5 @@
-+// @flow
-+
- export type NativeErrorObject = {
- code: string,
- message: string,
-@@ -11,9 +13,9 @@ export type NativeErrorResponse = {
- [key: string]: ?any,
- };
-
--export interface NativeErrorInterface extends Error {
-+export interface NativeErrorInterface {
- +code: string;
-- +message: string;
-+ message: string;
- +nativeErrorCode: string | number;
- +nativeErrorMessage: string;
- }
-diff --git a/node_modules/react-native-firebase/dist/index.js.flow b/node_modules/react-native-firebase/dist/index.js.flow
-index 04ee2d9..ba9fdcf 100644
---- a/node_modules/react-native-firebase/dist/index.js.flow
-+++ b/node_modules/react-native-firebase/dist/index.js.flow
-@@ -9,7 +9,8 @@ export * from './modules/core/firebase';
- /*
- * Export App types
- */
--export type { default as App } from './modules/core/app';
-+import type AppModule from './modules/core/app';
-+export type App = AppModule;
-
- /*
- * Export Auth types
-diff --git a/node_modules/react-native-firebase/dist/modules/admob/AdMobComponent.js b/node_modules/react-native-firebase/dist/modules/admob/AdMobComponent.js
-index 1c40468..66e191c 100644
---- a/node_modules/react-native-firebase/dist/modules/admob/AdMobComponent.js
-+++ b/node_modules/react-native-firebase/dist/modules/admob/AdMobComponent.js
-@@ -1,26 +1,10 @@
- import React from 'react';
--import { ViewPropTypes, requireNativeComponent, Platform } from 'react-native';
-+import { requireNativeComponent, Platform } from 'react-native';
- import PropTypes from 'prop-types';
- import EventTypes, { NativeExpressEventTypes } from './EventTypes';
- import { nativeToJSError } from '../../utils';
- import AdRequest from './AdRequest';
- import VideoOptions from './VideoOptions';
--const adMobPropTypes = { ...ViewPropTypes,
-- size: PropTypes.string.isRequired,
-- unitId: PropTypes.string.isRequired,
--
-- /* eslint-disable react/forbid-prop-types */
-- request: PropTypes.object,
-- video: PropTypes.object
-- /* eslint-enable react/forbid-prop-types */
--
--};
--Object.keys(EventTypes).forEach(eventType => {
-- adMobPropTypes[eventType] = PropTypes.func;
--});
--Object.keys(NativeExpressEventTypes).forEach(eventType => {
-- adMobPropTypes[eventType] = PropTypes.func;
--});
- const nativeComponents = {};
-
- function getNativeComponent(name) {
-@@ -35,7 +19,6 @@ function getNativeComponent(name) {
- }
-
- class AdMobComponent extends React.Component {
-- static propTypes = adMobPropTypes;
- static defaultProps = {
- request: new AdRequest().addTestDevice().build(),
- video: new VideoOptions().build()
-diff --git a/node_modules/react-native-firebase/dist/modules/admob/AdMobComponent.js.flow b/node_modules/react-native-firebase/dist/modules/admob/AdMobComponent.js.flow
-index 4162bb1..f37c353 100644
---- a/node_modules/react-native-firebase/dist/modules/admob/AdMobComponent.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/admob/AdMobComponent.js.flow
-@@ -1,5 +1,5 @@
- import React from 'react';
--import { ViewPropTypes, requireNativeComponent, Platform } from 'react-native';
-+import { requireNativeComponent, Platform } from 'react-native';
- import PropTypes from 'prop-types';
- import EventTypes, { NativeExpressEventTypes } from './EventTypes';
- import { nativeToJSError } from '../../utils';
-@@ -7,22 +7,6 @@ import { nativeToJSError } from '../../utils';
- import AdRequest from './AdRequest';
- import VideoOptions from './VideoOptions';
-
--const adMobPropTypes = {
-- ...ViewPropTypes,
-- size: PropTypes.string.isRequired,
-- unitId: PropTypes.string.isRequired,
-- /* eslint-disable react/forbid-prop-types */
-- request: PropTypes.object,
-- video: PropTypes.object,
-- /* eslint-enable react/forbid-prop-types */
--};
--Object.keys(EventTypes).forEach(eventType => {
-- adMobPropTypes[eventType] = PropTypes.func;
--});
--Object.keys(NativeExpressEventTypes).forEach(eventType => {
-- adMobPropTypes[eventType] = PropTypes.func;
--});
--
- const nativeComponents = {};
-
- function getNativeComponent(name) {
-@@ -37,8 +21,6 @@ function getNativeComponent(name) {
- }
-
- class AdMobComponent extends React.Component {
-- static propTypes = adMobPropTypes;
--
- static defaultProps = {
- request: new AdRequest().addTestDevice().build(),
- video: new VideoOptions().build(),
-diff --git a/node_modules/react-native-firebase/dist/modules/admob/AdRequest.js.flow b/node_modules/react-native-firebase/dist/modules/admob/AdRequest.js.flow
-index 41d2d5d..c2f5e0a 100644
---- a/node_modules/react-native-firebase/dist/modules/admob/AdRequest.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/admob/AdRequest.js.flow
-@@ -1,4 +1,18 @@
-+// @flow
-+
-+type AdRequestProps = {|
-+ keywords: string[],
-+ testDevices: string[],
-+ contentUrl?: string,
-+ gender?: Gender,
-+ requestAgent?: string,
-+ isDesignedForFamilies?: boolean,
-+ tagForChildDirectedTreatment?: boolean,
-+|};
-+type Gender = 'male | female | unknown';
- export default class AdRequest {
-+ _props: AdRequestProps;
-+
- constructor() {
- this._props = {
- keywords: [],
-@@ -6,30 +20,30 @@ export default class AdRequest {
- };
- }
-
-- build() {
-+ build(): AdRequestProps {
- return this._props;
- }
-
-- addTestDevice(deviceId?: string) {
-+ addTestDevice(deviceId?: string): AdRequest {
- this._props.testDevices.push(deviceId || 'DEVICE_ID_EMULATOR');
- return this;
- }
-
-- addKeyword(keyword: string) {
-+ addKeyword(keyword: string): AdRequest {
- this._props.keywords.push(keyword);
- return this;
- }
-
-- setBirthday() {
-+ setBirthday(): void {
- // TODO
- }
-
-- setContentUrl(url: string) {
-+ setContentUrl(url: string): AdRequest {
- this._props.contentUrl = url;
- return this;
- }
-
-- setGender(gender: 'male | female | unknown') {
-+ setGender(gender: Gender): AdRequest {
- const genders = ['male', 'female', 'unknown'];
- if (genders.includes(gender)) {
- this._props.gender = gender;
-@@ -37,21 +51,21 @@ export default class AdRequest {
- return this;
- }
-
-- setLocation() {
-+ setLocation(): void {
- // TODO
- }
-
-- setRequestAgent(requestAgent: string) {
-+ setRequestAgent(requestAgent: string): AdRequest {
- this._props.requestAgent = requestAgent;
- return this;
- }
-
-- setIsDesignedForFamilies(isDesignedForFamilies: boolean) {
-+ setIsDesignedForFamilies(isDesignedForFamilies: boolean): AdRequest {
- this._props.isDesignedForFamilies = isDesignedForFamilies;
- return this;
- }
-
-- tagForChildDirectedTreatment(tagForChildDirectedTreatment: boolean) {
-+ tagForChildDirectedTreatment(tagForChildDirectedTreatment: boolean): AdRequest {
- this._props.tagForChildDirectedTreatment = tagForChildDirectedTreatment;
- return this;
- }
-diff --git a/node_modules/react-native-firebase/dist/modules/admob/Interstitial.js.flow b/node_modules/react-native-firebase/dist/modules/admob/Interstitial.js.flow
-index a2f4c82..db795d7 100644
---- a/node_modules/react-native-firebase/dist/modules/admob/Interstitial.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/admob/Interstitial.js.flow
-@@ -1,3 +1,5 @@
-+// @flow
-+
- import { Platform } from 'react-native';
- import { statics } from './';
- import AdRequest from './AdRequest';
-@@ -8,8 +10,10 @@ import type AdMob from './';
-
- let subscriptions = [];
-
--export default class Interstitial {
-+class Interstitial {
- _admob: AdMob;
-+ adUnit: string;
-+ loaded: boolean;
-
- constructor(admob: AdMob, adUnit: string) {
- // Interstitials on iOS require a new instance each time
-@@ -79,7 +83,7 @@ export default class Interstitial {
- * Return a local instance of isLoaded
- * @returns {boolean}
- */
-- isLoaded() {
-+ isLoaded(): boolean {
- return this.loaded;
- }
-
-@@ -87,7 +91,7 @@ export default class Interstitial {
- * Show the advert - will only show if loaded
- * @returns {*}
- */
-- show() {
-+ show(): void {
- if (this.loaded) {
- getNativeModule(this._admob).interstitialShowAd(this.adUnit);
- }
-@@ -99,7 +103,7 @@ export default class Interstitial {
- * @param listenerCb
- * @returns {null}
- */
-- on(eventType, listenerCb) {
-+ on(eventType: string, listenerCb: Function) {
- if (!statics.EventTypes[eventType]) {
- console.warn(
- `Invalid event type provided, must be one of: ${Object.keys(
-@@ -117,3 +121,5 @@ export default class Interstitial {
- return sub;
- }
- }
-+
-+export default Interstitial;
-diff --git a/node_modules/react-native-firebase/dist/modules/admob/RewardedVideo.js.flow b/node_modules/react-native-firebase/dist/modules/admob/RewardedVideo.js.flow
-index d89df42..ab3bc43 100644
---- a/node_modules/react-native-firebase/dist/modules/admob/RewardedVideo.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/admob/RewardedVideo.js.flow
-@@ -1,3 +1,5 @@
-+// @flow
-+
- import { statics } from './';
- import AdRequest from './AdRequest';
- import { SharedEventEmitter } from '../../utils/events';
-@@ -9,6 +11,8 @@ let subscriptions = [];
-
- export default class RewardedVideo {
- _admob: AdMob;
-+ adUnit: string;
-+ loaded: boolean;
-
- constructor(admob: AdMob, adUnit: string) {
- for (let i = 0, len = subscriptions.length; i < len; i++) {
-@@ -106,7 +110,7 @@ export default class RewardedVideo {
- * @param listenerCb
- * @returns {null}
- */
-- on(eventType, listenerCb) {
-+ on(eventType: string, listenerCb: Function) {
- const types = {
- ...statics.EventTypes,
- ...statics.RewardedVideoEventTypes,
-diff --git a/node_modules/react-native-firebase/dist/modules/auth/AuthSettings.js.flow b/node_modules/react-native-firebase/dist/modules/auth/AuthSettings.js.flow
-index 997efc7..7b84def 100644
---- a/node_modules/react-native-firebase/dist/modules/auth/AuthSettings.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/auth/AuthSettings.js.flow
-@@ -1,3 +1,5 @@
-+// @flow
-+
- import { getNativeModule } from '../../utils/native';
- import { isAndroid, isIOS } from '../../utils';
-
-diff --git a/node_modules/react-native-firebase/dist/modules/auth/User.js.flow b/node_modules/react-native-firebase/dist/modules/auth/User.js.flow
-index 96026b6..86c9b24 100644
---- a/node_modules/react-native-firebase/dist/modules/auth/User.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/auth/User.js.flow
-@@ -16,10 +16,10 @@ import type {
- IdTokenResult,
- } from './types';
-
--type UpdateProfile = {
-- displayName?: string,
-- photoURL?: string,
--};
-+type UpdateProfile = $Shape<{|
-+ +displayName?: string,
-+ +photoURL?: string,
-+|}>;
-
- export default class User {
- _auth: Auth;
-diff --git a/node_modules/react-native-firebase/dist/modules/core/app.js.flow b/node_modules/react-native-firebase/dist/modules/core/app.js.flow
-index 6e27c61..0b0b492 100644
---- a/node_modules/react-native-firebase/dist/modules/core/app.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/core/app.js.flow
-@@ -21,7 +21,9 @@ import Links, { NAMESPACE as LinksNamespace } from '../links';
- import Messaging, { NAMESPACE as MessagingNamespace } from '../messaging';
- import Notifications, {
- NAMESPACE as NotificationsNamespace,
-+ statics as NotificationsStatics,
- } from '../notifications';
-+import type { NativeNotification } from '../notifications/types';
- import Performance, { NAMESPACE as PerfNamespace } from '../perf';
- import Storage, { NAMESPACE as StorageNamespace } from '../storage';
- import Utils, { NAMESPACE as UtilsNamespace } from '../utils';
-@@ -63,7 +65,12 @@ export default class App {
-
- messaging: () => Messaging;
-
-- notifications: () => Notifications;
-+ notifications:
-+ & ((): Notifications)
-+ & {
-+ +Android: NotificationsStatics.Android,
-+ +Notification: NotificationsStatics.Notification,
-+ };
-
- perf: () => Performance;
-
-@@ -77,7 +84,7 @@ export default class App {
- fromNative: boolean = false
- ) {
- this._name = name;
-- this._options = Object.assign({}, options);
-+ this._options = { ...options };
-
- if (fromNative) {
- this._initialized = true;
-@@ -129,7 +136,7 @@ export default class App {
- * @return {*}
- */
- get options(): FirebaseOptions {
-- return Object.assign({}, this._options);
-+ return { ...this._options };
- }
-
- /**
-diff --git a/node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js.flow b/node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js.flow
-index b8ef7c2..37fe40e 100644
---- a/node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js.flow
-@@ -8,7 +8,7 @@ import CollectionReference from './CollectionReference';
- import { parseUpdateArgs } from './utils';
- import { buildNativeMap } from './utils/serialize';
- import { getNativeModule } from '../../utils/native';
--import { firestoreAutoId, isFunction, isObject } from '../../utils';
-+import { firestoreAutoId, isObject } from '../../utils';
- import { getAppEventName, SharedEventEmitter } from '../../utils/events';
-
- import type Firestore from './';
-@@ -137,8 +137,8 @@ export default class DocumentReference {
- let observer: Observer;
- let docListenOptions = {};
- // Called with: onNext, ?onError
-- if (isFunction(optionsOrObserverOrOnNext)) {
-- if (observerOrOnNextOrOnError && !isFunction(observerOrOnNextOrOnError)) {
-+ if (typeof optionsOrObserverOrOnNext === 'function') {
-+ if (observerOrOnNextOrOnError && typeof observerOrOnNextOrOnError !== 'function') {
- throw new Error(
- 'DocumentReference.onSnapshot failed: Second argument must be a valid function.'
- );
-@@ -150,14 +150,14 @@ export default class DocumentReference {
- };
- } else if (
- optionsOrObserverOrOnNext &&
-- isObject(optionsOrObserverOrOnNext)
-+ typeof optionsOrObserverOrOnNext === 'object'
- ) {
- // Called with: Observer
- if (optionsOrObserverOrOnNext.next) {
-- if (isFunction(optionsOrObserverOrOnNext.next)) {
-+ if (typeof optionsOrObserverOrOnNext.next === 'function') {
- if (
- optionsOrObserverOrOnNext.error &&
-- !isFunction(optionsOrObserverOrOnNext.error)
-+ typeof optionsOrObserverOrOnNext.error !== 'function'
- ) {
- throw new Error(
- 'DocumentReference.onSnapshot failed: Observer.error must be a valid function.'
-@@ -181,27 +181,27 @@ export default class DocumentReference {
- ) {
- docListenOptions = optionsOrObserverOrOnNext;
- // Called with: Options, onNext, ?onError
-- if (isFunction(observerOrOnNextOrOnError)) {
-- if (onError && !isFunction(onError)) {
-+ if (typeof observerOrOnNextOrOnError === 'function') {
-+ if (onError && typeof onError !== 'function') {
- throw new Error(
- 'DocumentReference.onSnapshot failed: Third argument must be a valid function.'
- );
- }
-- // $FlowExpectedError: Not coping with the overloaded method signature
- observer = {
-+ // $FlowExpectedError: Not coping with the overloaded method signature
- next: observerOrOnNextOrOnError,
- error: onError,
- };
- // Called with Options, Observer
- } else if (
- observerOrOnNextOrOnError &&
-- isObject(observerOrOnNextOrOnError) &&
-+ typeof observerOrOnNextOrOnError === 'object' &&
- observerOrOnNextOrOnError.next
- ) {
-- if (isFunction(observerOrOnNextOrOnError.next)) {
-+ if (typeof observerOrOnNextOrOnError.next === 'function') {
- if (
- observerOrOnNextOrOnError.error &&
-- !isFunction(observerOrOnNextOrOnError.error)
-+ typeof observerOrOnNextOrOnError.error !== 'function'
- ) {
- throw new Error(
- 'DocumentReference.onSnapshot failed: Observer.error must be a valid function.'
-diff --git a/node_modules/react-native-firebase/dist/modules/firestore/FieldValue.js.flow b/node_modules/react-native-firebase/dist/modules/firestore/FieldValue.js.flow
-index edbd9dc..c4e2598 100644
---- a/node_modules/react-native-firebase/dist/modules/firestore/FieldValue.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/firestore/FieldValue.js.flow
-@@ -2,7 +2,7 @@
- * @flow
- * FieldValue representation wrapper
- */
--import AnyJs from './utils/any';
-+import type { AnyJs } from './utils/any';
- import { buildNativeArray } from './utils/serialize';
-
- // TODO: Salakar: Refactor in v6
-diff --git a/node_modules/react-native-firebase/dist/modules/firestore/Query.js.flow b/node_modules/react-native-firebase/dist/modules/firestore/Query.js.flow
-index 1716dbe..80df382 100644
---- a/node_modules/react-native-firebase/dist/modules/firestore/Query.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/firestore/Query.js.flow
-@@ -8,7 +8,7 @@ import SnapshotError from './SnapshotError';
- import DocumentSnapshot from './DocumentSnapshot';
- import { getNativeModule } from '../../utils/native';
- import { buildNativeArray, buildTypeMap } from './utils/serialize';
--import { firestoreAutoId, isFunction, isObject } from '../../utils';
-+import { firestoreAutoId, isObject } from '../../utils';
- import { getAppEventName, SharedEventEmitter } from '../../utils/events';
-
- import type Firestore from './';
-@@ -55,7 +55,7 @@ type FieldOrder = {|
- fieldPath: NativeFieldPath,
- |};
-
--type QueryOptions = {
-+type QueryOptions = $Shape<{|
- endAt?: any[],
- endBefore?: any[],
- limit?: number,
-@@ -63,7 +63,7 @@ type QueryOptions = {
- selectFields?: string[],
- startAfter?: any[],
- startAt?: any[],
--};
-+|}>;
-
- export type ObserverOnError = SnapshotError => void;
- export type ObserverOnNext = QuerySnapshot => void;
-@@ -274,8 +274,8 @@ export default class Query {
- let observer: Observer;
- let metadataChanges = {};
- // Called with: onNext, ?onError
-- if (isFunction(optionsOrObserverOrOnNext)) {
-- if (observerOrOnNextOrOnError && !isFunction(observerOrOnNextOrOnError)) {
-+ if (typeof optionsOrObserverOrOnNext === 'function') {
-+ if (observerOrOnNextOrOnError && typeof observerOrOnNextOrOnError !== 'function') {
- throw new Error(
- 'Query.onSnapshot failed: Second argument must be a valid function.'
- );
-@@ -287,14 +287,14 @@ export default class Query {
- };
- } else if (
- optionsOrObserverOrOnNext &&
-- isObject(optionsOrObserverOrOnNext)
-+ typeof optionsOrObserverOrOnNext === 'object'
- ) {
- // Called with: Observer
- if (optionsOrObserverOrOnNext.next) {
-- if (isFunction(optionsOrObserverOrOnNext.next)) {
-+ if (typeof optionsOrObserverOrOnNext.next === 'function') {
- if (
- optionsOrObserverOrOnNext.error &&
-- !isFunction(optionsOrObserverOrOnNext.error)
-+ typeof optionsOrObserverOrOnNext.error !== 'function'
- ) {
- throw new Error(
- 'Query.onSnapshot failed: Observer.error must be a valid function.'
-@@ -318,27 +318,27 @@ export default class Query {
- ) {
- metadataChanges = optionsOrObserverOrOnNext;
- // Called with: Options, onNext, ?onError
-- if (isFunction(observerOrOnNextOrOnError)) {
-- if (onError && !isFunction(onError)) {
-+ if (typeof observerOrOnNextOrOnError === 'function') {
-+ if (onError && typeof onError !== 'function') {
- throw new Error(
- 'Query.onSnapshot failed: Third argument must be a valid function.'
- );
- }
-- // $FlowExpectedError: Not coping with the overloaded method signature
- observer = {
-+ // $FlowExpectedError: Not coping with the overloaded method signature
- next: observerOrOnNextOrOnError,
- error: onError,
- };
- // Called with Options, Observer
- } else if (
- observerOrOnNextOrOnError &&
-- isObject(observerOrOnNextOrOnError) &&
-+ typeof observerOrOnNextOrOnError === 'object' &&
- observerOrOnNextOrOnError.next
- ) {
-- if (isFunction(observerOrOnNextOrOnError.next)) {
-+ if (typeof observerOrOnNextOrOnError.next === 'function') {
- if (
- observerOrOnNextOrOnError.error &&
-- !isFunction(observerOrOnNextOrOnError.error)
-+ typeof observerOrOnNextOrOnError.error !== 'function'
- ) {
- throw new Error(
- 'Query.onSnapshot failed: Observer.error must be a valid function.'
-diff --git a/node_modules/react-native-firebase/dist/modules/firestore/SnapshotError.js.flow b/node_modules/react-native-firebase/dist/modules/firestore/SnapshotError.js.flow
-index 105574d..c34819e 100644
---- a/node_modules/react-native-firebase/dist/modules/firestore/SnapshotError.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/firestore/SnapshotError.js.flow
-@@ -1,3 +1,5 @@
-+// @flow
-+
- import NativeError from '../../common/NativeError';
- import type { SnapshotErrorInterface } from './firestoreTypes.flow';
- import type { NativeErrorResponse } from '../../common/commonTypes.flow';
-diff --git a/node_modules/react-native-firebase/dist/modules/firestore/Transaction.js.flow b/node_modules/react-native-firebase/dist/modules/firestore/Transaction.js.flow
-index 0f96640..b564830 100644
---- a/node_modules/react-native-firebase/dist/modules/firestore/Transaction.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/firestore/Transaction.js.flow
-@@ -18,9 +18,9 @@ type Command = {
- options?: SetOptions | {},
- };
-
--type SetOptions = {
-+type SetOptions = $Shape<{|
- merge: boolean,
--};
-+|}>;
-
- // TODO docs state all get requests must be made FIRST before any modifications
- // TODO so need to validate that
-diff --git a/node_modules/react-native-firebase/dist/modules/firestore/TransactionHandler.js.flow b/node_modules/react-native-firebase/dist/modules/firestore/TransactionHandler.js.flow
-index 624acf0..f4b3039 100644
---- a/node_modules/react-native-firebase/dist/modules/firestore/TransactionHandler.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/firestore/TransactionHandler.js.flow
-@@ -18,7 +18,7 @@ const generateTransactionId = (): number => transactionId++;
-
- export type TransactionMeta = {
- id: number,
-- stack: string[],
-+ stack: string,
- reject?: Function,
- resolve?: Function,
- transaction: Transaction,
-diff --git a/node_modules/react-native-firebase/dist/modules/firestore/utils/any.js.flow b/node_modules/react-native-firebase/dist/modules/firestore/utils/any.js.flow
-index af9d484..caf587e 100644
---- a/node_modules/react-native-firebase/dist/modules/firestore/utils/any.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/firestore/utils/any.js.flow
-@@ -1,4 +1,7 @@
-+// @flow
-+
- /**
- * @url https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore/src/util/misc.ts#L26
- */
--export type AnyJs = null | undefined | boolean | number | string | object;
-+//export type AnyJs = null | void | boolean | number | string | Object;
-+export type AnyJs = any;
-diff --git a/node_modules/react-native-firebase/dist/modules/firestore/utils/serialize.js.flow b/node_modules/react-native-firebase/dist/modules/firestore/utils/serialize.js.flow
-index 0c87d1d..fcf97f0 100644
---- a/node_modules/react-native-firebase/dist/modules/firestore/utils/serialize.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/firestore/utils/serialize.js.flow
-@@ -33,7 +33,7 @@ export const buildNativeMap = (data: Object): { [string]: NativeTypeMap } => {
- return nativeData;
- };
-
--export const buildNativeArray = (array: Object[]): NativeTypeMap[] => {
-+export const buildNativeArray = (array: any[]): NativeTypeMap[] => {
- const nativeArray = [];
- if (array) {
- array.forEach(value => {
-diff --git a/node_modules/react-native-firebase/dist/modules/functions/HttpsError.js.flow b/node_modules/react-native-firebase/dist/modules/functions/HttpsError.js.flow
-index e2c7ed3..2c00aa6 100644
---- a/node_modules/react-native-firebase/dist/modules/functions/HttpsError.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/functions/HttpsError.js.flow
-@@ -1,9 +1,11 @@
-+// @flow
-+
- import type { FunctionsErrorCode } from './types.flow';
-
- export default class HttpsError extends Error {
- +details: ?any;
-
-- +message: string;
-+ message: string;
-
- +code: FunctionsErrorCode;
-
-@@ -11,6 +13,8 @@ export default class HttpsError extends Error {
- super(message);
- this.code = code;
- this.details = details;
-- this.message = message;
-+ if (message) {
-+ this.message = message;
-+ }
- }
- }
-diff --git a/node_modules/react-native-firebase/dist/modules/functions/types.flow.js.flow b/node_modules/react-native-firebase/dist/modules/functions/types.flow.js.flow
-index 8660827..0ef93c8 100644
---- a/node_modules/react-native-firebase/dist/modules/functions/types.flow.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/functions/types.flow.js.flow
-@@ -1,3 +1,7 @@
-+// @flow
-+
-+import HttpsError from './HttpsError';
-+
- export type HttpsCallableResult = {
- data: Object,
- };
-diff --git a/node_modules/react-native-firebase/dist/modules/messaging/IOSMessaging.js.flow b/node_modules/react-native-firebase/dist/modules/messaging/IOSMessaging.js.flow
-index a97bf75..305b5bc 100644
---- a/node_modules/react-native-firebase/dist/modules/messaging/IOSMessaging.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/messaging/IOSMessaging.js.flow
-@@ -1,3 +1,5 @@
-+// @flow
-+
- import { getNativeModule } from '../../utils/native';
-
- import { isIOS } from '../../utils';
-@@ -5,18 +7,20 @@ import { isIOS } from '../../utils';
- import type Messaging from './';
-
- export default class IOSMessaging {
-+ _messaging: Messaging;
-+
- constructor(messaging: Messaging) {
- this._messaging = messaging;
- }
-
-- getAPNSToken(): Promise<string | null> {
-+ getAPNSToken(): null | Promise<string | null> {
- if (!isIOS) {
- return null;
- }
- return getNativeModule(this._messaging).getAPNSToken();
- }
-
-- registerForRemoteNotifications(): Promise<void> {
-+ registerForRemoteNotifications(): void | Promise<void> {
- if (!isIOS) {
- return undefined;
- }
-diff --git a/node_modules/react-native-firebase/dist/modules/messaging/RemoteMessage.js.flow b/node_modules/react-native-firebase/dist/modules/messaging/RemoteMessage.js.flow
-index d076e23..3388775 100644
---- a/node_modules/react-native-firebase/dist/modules/messaging/RemoteMessage.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/messaging/RemoteMessage.js.flow
-@@ -89,7 +89,7 @@ export default class RemoteMessage {
- * @param data
- * @returns {RemoteMessage}
- */
-- setData(data: { [string]: string } = {}) {
-+ setData(data: { [string]: string } = {}): RemoteMessage {
- if (!isObject(data)) {
- throw new Error(
- `RemoteMessage:setData expects an object but got type '${typeof data}'.`
-diff --git a/node_modules/react-native-firebase/dist/modules/messaging/index.js.flow b/node_modules/react-native-firebase/dist/modules/messaging/index.js.flow
-index 988be94..a030db8 100644
---- a/node_modules/react-native-firebase/dist/modules/messaging/index.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/messaging/index.js.flow
-@@ -8,7 +8,6 @@ import INTERNALS from '../../utils/internals';
- import { getLogger } from '../../utils/log';
- import ModuleBase from '../../utils/ModuleBase';
- import { getNativeModule } from '../../utils/native';
--import { isFunction, isObject } from '../../utils';
- import IOSMessaging from './IOSMessaging';
- import RemoteMessage from './RemoteMessage';
-
-@@ -89,10 +88,10 @@ export default class Messaging extends ModuleBase {
-
- onMessage(nextOrObserver: OnMessage | OnMessageObserver): () => any {
- let listener: RemoteMessage => any;
-- if (isFunction(nextOrObserver)) {
-+ if (typeof nextOrObserver === "function") {
- // $FlowExpectedError: Not coping with the overloaded method signature
- listener = nextOrObserver;
-- } else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
-+ } else if (typeof nextOrObserver === "object" && typeof nextOrObserver.next === "function") {
- listener = nextOrObserver.next;
- } else {
- throw new Error(
-@@ -114,10 +113,10 @@ export default class Messaging extends ModuleBase {
- nextOrObserver: OnTokenRefresh | OnTokenRefreshObserver
- ): () => any {
- let listener: string => any;
-- if (isFunction(nextOrObserver)) {
-+ if (typeof nextOrObserver === "function") {
- // $FlowExpectedError: Not coping with the overloaded method signature
- listener = nextOrObserver;
-- } else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
-+ } else if (typeof nextOrObserver === "object" && typeof nextOrObserver.next === "function") {
- listener = nextOrObserver.next;
- } else {
- throw new Error(
-diff --git a/node_modules/react-native-firebase/dist/modules/notifications/IOSNotifications.js.flow b/node_modules/react-native-firebase/dist/modules/notifications/IOSNotifications.js.flow
-index f2ea8ca..5058f52 100644
---- a/node_modules/react-native-firebase/dist/modules/notifications/IOSNotifications.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/notifications/IOSNotifications.js.flow
-@@ -1,3 +1,5 @@
-+// @flow
-+
- import { getNativeModule } from '../../utils/native';
-
- import type Notifications from './';
-diff --git a/node_modules/react-native-firebase/dist/modules/notifications/index.js.flow b/node_modules/react-native-firebase/dist/modules/notifications/index.js.flow
-index 34e4ee3..22d5dbe 100644
---- a/node_modules/react-native-firebase/dist/modules/notifications/index.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/notifications/index.js.flow
-@@ -7,7 +7,6 @@ import { SharedEventEmitter } from '../../utils/events';
- import { getLogger } from '../../utils/log';
- import ModuleBase from '../../utils/ModuleBase';
- import { getNativeModule } from '../../utils/native';
--import { isFunction, isObject } from '../../utils';
- import AndroidAction from './AndroidAction';
- import AndroidChannel from './AndroidChannel';
- import AndroidChannelGroup from './AndroidChannelGroup';
-@@ -212,9 +211,9 @@ export default class Notifications extends ModuleBase {
- nextOrObserver: OnNotification | OnNotificationObserver
- ): () => any {
- let listener;
-- if (isFunction(nextOrObserver)) {
-+ if (typeof nextOrObserver === "function") {
- listener = nextOrObserver;
-- } else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
-+ } else if (typeof nextOrObserver === "object" && typeof nextOrObserver.next === "function") {
- listener = nextOrObserver.next;
- } else {
- throw new Error(
-@@ -235,9 +234,9 @@ export default class Notifications extends ModuleBase {
- nextOrObserver: OnNotification | OnNotificationObserver
- ): () => any {
- let listener;
-- if (isFunction(nextOrObserver)) {
-+ if (typeof nextOrObserver === "function") {
- listener = nextOrObserver;
-- } else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
-+ } else if (typeof nextOrObserver === "object" && typeof nextOrObserver.next === "function") {
- listener = nextOrObserver.next;
- } else {
- throw new Error(
-@@ -258,9 +257,9 @@ export default class Notifications extends ModuleBase {
- nextOrObserver: OnNotificationOpened | OnNotificationOpenedObserver
- ): () => any {
- let listener;
-- if (isFunction(nextOrObserver)) {
-+ if (typeof nextOrObserver === "function") {
- listener = nextOrObserver;
-- } else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
-+ } else if (typeof nextOrObserver === "object" && typeof nextOrObserver.next === "function") {
- listener = nextOrObserver.next;
- } else {
- throw new Error(
-diff --git a/node_modules/react-native-firebase/dist/modules/utils/database.js.flow b/node_modules/react-native-firebase/dist/modules/utils/database.js.flow
-index 12fda54..d25b305 100644
---- a/node_modules/react-native-firebase/dist/modules/utils/database.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/utils/database.js.flow
-@@ -1,3 +1,5 @@
-+// @flow
-+
- import SyncTree from '../../utils/SyncTree';
-
- export default {
-diff --git a/node_modules/react-native-firebase/dist/modules/utils/index.js.flow b/node_modules/react-native-firebase/dist/modules/utils/index.js.flow
-index 463de92..84f24cf 100644
---- a/node_modules/react-native-firebase/dist/modules/utils/index.js.flow
-+++ b/node_modules/react-native-firebase/dist/modules/utils/index.js.flow
-@@ -29,7 +29,7 @@ export default class RNFirebaseUtils extends ModuleBase {
- });
- }
-
-- get database(): DatabaseUtils {
-+ get database(): typeof DatabaseUtils {
- return DatabaseUtils;
- }
-
-diff --git a/node_modules/react-native-firebase/dist/utils/SyncTree.js.flow b/node_modules/react-native-firebase/dist/utils/SyncTree.js.flow
-index 58d0300..ca6edba 100644
---- a/node_modules/react-native-firebase/dist/utils/SyncTree.js.flow
-+++ b/node_modules/react-native-firebase/dist/utils/SyncTree.js.flow
-@@ -19,6 +19,7 @@ type Registration = {
- listener: Listener,
- eventRegistrationKey: string,
- ref: DatabaseReference,
-+ ...
- };
-
- /**
diff --git a/yarn.lock b/yarn.lock
--- a/yarn.lock
+++ b/yarn.lock
@@ -17231,11 +17231,6 @@
is-docker "^2.1.1"
is-wsl "^2.2.0"
-opencollective-postinstall@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89"
- integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==
-
opn@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc"
@@ -18959,14 +18954,6 @@
dependencies:
figma-squircle "^0.1.2"
-react-native-firebase@^5.6.0:
- version "5.6.0"
- resolved "https://registry.yarnpkg.com/react-native-firebase/-/react-native-firebase-5.6.0.tgz#6f6123f53cb73477915dd55c55f3e1de91db38d2"
- integrity sha512-I+o3zNLdIz4pxWTCSZH70M1BcPl+SdqKQfurOT0sWcaMSL2ecDqVy0PCTmN7ORt7/Z879Er6PLgA/psjArQlmw==
- dependencies:
- opencollective-postinstall "^2.0.0"
- prop-types "^15.7.2"
-
react-native-flipper@^0.164.0, "react-native-flipper@https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz#f8cae15d883ffc0abc663b5eaaa711fcc64bb5c2"

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 5:51 PM (20 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2498154
Default Alt Text
D6414.id21604.diff (40 KB)

Event Timeline