@react-native-firebase/firestore 22.3.0 → 22.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [22.4.0](https://github.com/invertase/react-native-firebase/compare/v22.3.0...v22.4.0) (2025-07-10)
7
+
8
+ ### Features
9
+
10
+ - **firestore:** add support for non-default databases [#8489](https://github.com/invertase/react-native-firebase/issues/8489) ([422badb](https://github.com/invertase/react-native-firebase/commit/422badbf9aed4f97cf2d4fc18ce1739759cc1ac1))
11
+
6
12
  ## [22.3.0](https://github.com/invertase/react-native-firebase/compare/v22.2.1...v22.3.0) (2025-07-08)
7
13
 
8
14
  ### Features
package/lib/index.js CHANGED
@@ -103,6 +103,11 @@ class FirebaseFirestoreModule extends FirebaseModule {
103
103
  persistence: true,
104
104
  };
105
105
  }
106
+
107
+ get customUrlOrRegion() {
108
+ return this._customUrlOrRegion;
109
+ }
110
+
106
111
  // We override the FirebaseModule's `eventNameForApp()` method to include the customUrlOrRegion
107
112
  eventNameForApp(...args) {
108
113
  return `${this.app.name}-${this._customUrlOrRegion}-${args.join('-')}`;
@@ -210,10 +210,9 @@ export function waitForPendingWrites(firestore) {
210
210
  * @param {string?} databaseId
211
211
  * @returns {Promise<Firestore>}
212
212
  */
213
- export async function initializeFirestore(app, settings /* databaseId */) {
214
- // TODO(exaby73): implement 2nd database once it's supported
213
+ export async function initializeFirestore(app, settings, databaseId) {
215
214
  const firebase = getApp(app.name);
216
- const firestore = firebase.firestore();
215
+ const firestore = firebase.firestore(databaseId);
217
216
  await firestore.settings.call(firestore, settings, MODULAR_DEPRECATION_ARG);
218
217
  return firestore;
219
218
  }
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '22.3.0';
2
+ module.exports = '22.4.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/firestore",
3
- "version": "22.3.0",
3
+ "version": "22.4.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - Cloud Firestore is a NoSQL cloud database to store and sync data between your React Native application and Firebase's database. The API matches the Firebase Web SDK whilst taking advantage of the native SDKs performance and offline capabilities.",
6
6
  "main": "lib/index.js",
@@ -30,11 +30,11 @@
30
30
  "react-native-url-polyfill": "2.0.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@react-native-firebase/app": "22.3.0"
33
+ "@react-native-firebase/app": "22.4.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public",
37
37
  "provenance": true
38
38
  },
39
- "gitHead": "c04f2a3b681460edde5518812646cf5e0dd86627"
39
+ "gitHead": "7eaaf185aab15c7e4fc3c218af9be609fe7e0030"
40
40
  }