@react-native-firebase/firestore 21.7.2 → 21.7.4
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 +10 -0
- package/__tests__/firestore.test.ts +2 -2
- package/lib/modular/index.js +8 -7
- package/lib/version.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
## [21.7.4](https://github.com/invertase/react-native-firebase/compare/v21.7.3...v21.7.4) (2025-02-08)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- the init calls for modular should use modular getApp() ([79da98b](https://github.com/invertase/react-native-firebase/commit/79da98bf4ecf7860db61b2813b87673f1cd0adfd))
|
|
11
|
+
|
|
12
|
+
## [21.7.3](https://github.com/invertase/react-native-firebase/compare/v21.7.2...v21.7.3) (2025-02-08)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @react-native-firebase/firestore
|
|
15
|
+
|
|
6
16
|
## [21.7.2](https://github.com/invertase/react-native-firebase/compare/v21.7.1...v21.7.2) (2025-02-05)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
CheckV9DeprecationFunction,
|
|
16
16
|
} from '../../app/lib/common/unitTestUtils';
|
|
17
17
|
|
|
18
|
+
import { getApp } from '../../app/lib/modular';
|
|
18
19
|
import firestore, {
|
|
19
20
|
firebase,
|
|
20
21
|
connectFirestoreEmulator,
|
|
@@ -895,10 +896,9 @@ describe('Firestore', function () {
|
|
|
895
896
|
|
|
896
897
|
it('firestore.settings()', function () {
|
|
897
898
|
const firestore = getFirestore();
|
|
898
|
-
const app = firebase.app();
|
|
899
899
|
firestoreRefV9Deprecation(
|
|
900
900
|
// no equivalent settings method for firebase-js-sdk
|
|
901
|
-
() => initializeFirestore(
|
|
901
|
+
() => initializeFirestore(getApp(), {}),
|
|
902
902
|
() => firestore.settings({}),
|
|
903
903
|
'settings',
|
|
904
904
|
);
|
package/lib/modular/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @typedef {import('@firebase/app').FirebaseApp} FirebaseApp
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { getApp, setLogLevel as appSetLogLevel } from '@react-native-firebase/app';
|
|
16
16
|
import { isObject } from '@react-native-firebase/app/lib/common';
|
|
17
17
|
import {
|
|
18
18
|
FirestoreAggregateQuerySnapshot,
|
|
@@ -31,16 +31,16 @@ import { MODULAR_DEPRECATION_ARG } from '../../../app/lib/common';
|
|
|
31
31
|
export function getFirestore(app, databaseId) {
|
|
32
32
|
if (app) {
|
|
33
33
|
if (databaseId) {
|
|
34
|
-
return
|
|
34
|
+
return getApp(app.name).firestore(databaseId);
|
|
35
35
|
} else {
|
|
36
|
-
return
|
|
36
|
+
return getApp(app.name).firestore();
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
if (databaseId) {
|
|
40
|
-
return
|
|
40
|
+
return getApp().firestore(databaseId);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
return
|
|
43
|
+
return getApp().firestore();
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -185,7 +185,8 @@ export function waitForPendingWrites(firestore) {
|
|
|
185
185
|
*/
|
|
186
186
|
export async function initializeFirestore(app, settings /* databaseId */) {
|
|
187
187
|
// TODO(exaby73): implement 2nd database once it's supported
|
|
188
|
-
const
|
|
188
|
+
const firebase = getApp(app.name);
|
|
189
|
+
const firestore = firebase.firestore();
|
|
189
190
|
await firestore.settings.call(firestore, settings, MODULAR_DEPRECATION_ARG);
|
|
190
191
|
return firestore;
|
|
191
192
|
}
|
|
@@ -199,7 +200,7 @@ export function connectFirestoreEmulator(firestore, host, port, options) {
|
|
|
199
200
|
* @returns {void}
|
|
200
201
|
*/
|
|
201
202
|
export function setLogLevel(logLevel) {
|
|
202
|
-
return
|
|
203
|
+
return appSetLogLevel(logLevel);
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
/**
|
package/lib/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
module.exports = '21.7.
|
|
2
|
+
module.exports = '21.7.4';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/firestore",
|
|
3
|
-
"version": "21.7.
|
|
3
|
+
"version": "21.7.4",
|
|
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",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"firestore"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@react-native-firebase/app": "21.7.
|
|
30
|
+
"@react-native-firebase/app": "21.7.4"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "82c4c7391fee6597726e5363d78400f11a644e47"
|
|
36
36
|
}
|