diff --git a/docs/migrating-to-v23.md b/docs/migrating-to-v23.md index 4b672c3682..46016299c6 100644 --- a/docs/migrating-to-v23.md +++ b/docs/migrating-to-v23.md @@ -5,9 +5,25 @@ previous: /migrate-to-v22 next: /typescript --- -⚠️ **REMOVED** ⚠️ +# Firebase Crashlytics + +Modular API method `isCrashlyticsCollectionEnabled(crashlytics)` has been removed, please use the property on Crashlytics instance +`getCrashlytics().isCrashlyticsCollectionEnabled` instead. + +# Firebase Auth + +`MultiFactorUser.enrolledFactor` has been removed, please use `MultiFactorUser.enrolledFactors`. See example: -# Firebase Dynamic Links has been Removed +```js +const credential = await signInWithEmailAndPassword(getAuth(), 'dummy@example.com', 'password'); +const multiFactorUser = credential.user.multiFactor; +// Use below - remove any instances of `multiFactorUser.enrolledFactor` +console.log(multiFactorUser.enrolledFactors); +``` + +# Firebase Dynamic Links + +⚠️ **REMOVED** ⚠️ This package has been deprecated and removed from the React Native Firebase repository. diff --git a/packages/auth/lib/multiFactor.js b/packages/auth/lib/multiFactor.js index 4f6b1a6313..1c8c1369db 100644 --- a/packages/auth/lib/multiFactor.js +++ b/packages/auth/lib/multiFactor.js @@ -14,8 +14,6 @@ export class MultiFactorUser { } this._user = user; this.enrolledFactors = user.multiFactor.enrolledFactors; - // @deprecated kept for backwards compatibility, please use enrolledFactors - this.enrolledFactor = user.multiFactor.enrolledFactors; } getSession() { diff --git a/packages/crashlytics/__tests__/crashlytics.test.ts b/packages/crashlytics/__tests__/crashlytics.test.ts index d1afd600bf..0f23492890 100644 --- a/packages/crashlytics/__tests__/crashlytics.test.ts +++ b/packages/crashlytics/__tests__/crashlytics.test.ts @@ -8,7 +8,6 @@ import { import { firebase, getCrashlytics, - isCrashlyticsCollectionEnabled, checkForUnsentReports, deleteUnsentReports, didCrashOnPreviousExecution, @@ -46,10 +45,6 @@ describe('Crashlytics', function () { expect(getCrashlytics).toBeDefined(); }); - it('`isCrashlyticsCollectionEnabled` function is properly exposed to end user', function () { - expect(isCrashlyticsCollectionEnabled).toBeDefined(); - }); - it('`checkForUnsentReports` function is properly exposed to end user', function () { expect(checkForUnsentReports).toBeDefined(); }); @@ -210,16 +205,5 @@ describe('Crashlytics', function () { 'setCrashlyticsCollectionEnabled', ); }); - - it('isCrashlyticsCollectionEnabled', function () { - const crashlytics = getCrashlytics(); - checkV9Deprecation( - // swapped order here because we're deprecating the modular method and keeping the property on Crashlytics instance - () => crashlytics.isCrashlyticsCollectionEnabled, - () => isCrashlyticsCollectionEnabled(crashlytics), - '', - '`isCrashlyticsCollectionEnabled()` is deprecated, please use `Crashlytics.isCrashlyticsCollectionEnabled` property instead', - ); - }); }); }); diff --git a/packages/crashlytics/lib/modular/index.d.ts b/packages/crashlytics/lib/modular/index.d.ts index e580bc319f..02d7a71e4a 100644 --- a/packages/crashlytics/lib/modular/index.d.ts +++ b/packages/crashlytics/lib/modular/index.d.ts @@ -11,17 +11,6 @@ type FirebaseCrashlytics = FirebaseCrashlyticsTypes.Module; */ export declare function getCrashlytics(): FirebaseCrashlytics; -/** - * Whether Crashlytics reporting is enabled. - * - * #### Example - * - * ```js - * const crashlytics = getCrashlytics(); - * const isEnabled = isCrashlyticsCollectionEnabled(crashlytics); - * ``` - */ -export declare function isCrashlyticsCollectionEnabled(crashlytics: FirebaseCrashlytics): boolean; /** * Determines whether there are any unsent crash reports cached on the device. The callback only executes * if automatic data collection is disabled. diff --git a/packages/crashlytics/lib/modular/index.js b/packages/crashlytics/lib/modular/index.js index 2e3983d6b4..7c62383a15 100644 --- a/packages/crashlytics/lib/modular/index.js +++ b/packages/crashlytics/lib/modular/index.js @@ -19,27 +19,6 @@ export function getCrashlytics() { return getApp().crashlytics(); } -/** - * Whether Crashlytics reporting is enabled. - * - * #### Example - * - * ```js - * const crashlytics = getCrashlytics(); - * const isEnabled = isCrashlyticsCollectionEnabled(crashlytics); - * ``` - * @param {FirebaseCrashlytics} crashlytics - * @returns {boolean} - */ -export function isCrashlyticsCollectionEnabled(crashlytics) { - // Unique. Deprecating modular method and allow it as a property on Crashlytics instance. - // eslint-disable-next-line no-console - console.warn( - '`isCrashlyticsCollectionEnabled()` is deprecated, please use `Crashlytics.isCrashlyticsCollectionEnabled` property instead', - ); - return crashlytics.isCrashlyticsCollectionEnabled; -} - /** * Determines whether there are any unsent crash reports cached on the device. The callback only executes * if automatic data collection is disabled. diff --git a/packages/firestore/lib/index.js b/packages/firestore/lib/index.js index ffada604b0..0786c0b975 100644 --- a/packages/firestore/lib/index.js +++ b/packages/firestore/lib/index.js @@ -314,10 +314,6 @@ class FirebaseFirestoreModule extends FirebaseModule { } if (!isUndefined(settings.host)) { - // eslint-disable-next-line no-console - console.warn( - 'host in settings to connect with firestore emulator is deprecated. Use useEmulator instead.', - ); if (!isString(settings.host)) { return Promise.reject( new Error("firebase.firestore().settings(*) 'settings.host' must be a string value."),