From 81e83bfd368402b0bed3ecdc947e982710734ee8 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Thu, 31 Jul 2025 10:46:08 +0100 Subject: [PATCH 1/5] chore: remove `MultiFactorUser.enrolledFactor` --- docs/migrating-to-v23.md | 16 ++++++++++++++-- packages/auth/lib/multiFactor.js | 2 -- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/migrating-to-v23.md b/docs/migrating-to-v23.md index 4b672c3682..27b896daf3 100644 --- a/docs/migrating-to-v23.md +++ b/docs/migrating-to-v23.md @@ -5,9 +5,21 @@ previous: /migrate-to-v22 next: /typescript --- -⚠️ **REMOVED** ⚠️ +# Firebase Auth + +`MultiFactorUser.enrolledFactor` has been removed, please use `MultiFactorUser.enrolledFactors`. See example: + +```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 has been Removed +``` + +# 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() { From 8b2625748bed3d105c6989aaa939f1d9725587e6 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Thu, 31 Jul 2025 10:51:58 +0100 Subject: [PATCH 2/5] chore: remove deprecated `isCrashlyticsCollectionEnabled()` --- docs/migrating-to-v23.md | 5 +++++ packages/crashlytics/lib/modular/index.d.ts | 11 ----------- packages/crashlytics/lib/modular/index.js | 21 --------------------- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/docs/migrating-to-v23.md b/docs/migrating-to-v23.md index 27b896daf3..7616ba33ab 100644 --- a/docs/migrating-to-v23.md +++ b/docs/migrating-to-v23.md @@ -5,6 +5,11 @@ previous: /migrate-to-v22 next: /typescript --- +# 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: 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. From 5afdfcde190bfaa7e4878f8cbc3672b920a61da1 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Thu, 31 Jul 2025 12:45:54 +0100 Subject: [PATCH 3/5] docs: fix formatting --- docs/migrating-to-v23.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/migrating-to-v23.md b/docs/migrating-to-v23.md index 7616ba33ab..46016299c6 100644 --- a/docs/migrating-to-v23.md +++ b/docs/migrating-to-v23.md @@ -18,8 +18,7 @@ Modular API method `isCrashlyticsCollectionEnabled(crashlytics)` has been remove 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) - +console.log(multiFactorUser.enrolledFactors); ``` # Firebase Dynamic Links From a7a148eee97817822ca278cf3673cb6fe1977729 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Thu, 31 Jul 2025 13:06:21 +0100 Subject: [PATCH 4/5] test: rm dead tests --- .../crashlytics/__tests__/crashlytics.test.ts | 16 ---------------- 1 file changed, 16 deletions(-) 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', - ); - }); }); }); From 2b5a691889f238291f2fa5da5c21c4ad5a4b8b1e Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Mon, 4 Aug 2025 10:22:57 +0100 Subject: [PATCH 5/5] chore: rm console.warn --- packages/firestore/lib/index.js | 4 ---- 1 file changed, 4 deletions(-) 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."),