@react-native-firebase/firestore 21.14.0 → 22.1.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 +18 -0
- package/android/build.gradle +5 -5
- package/lib/FirestoreDocumentSnapshot.js +5 -5
- package/lib/FirestoreQuery.js +1 -1
- package/lib/index.d.ts +5 -5
- package/lib/version.js +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.1.0](https://github.com/invertase/react-native-firebase/compare/v22.0.0...v22.1.0) (2025-04-30)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **firestore, types:** exist -> exists() change reflected in types ([339834d](https://github.com/invertase/react-native-firebase/commit/339834d940f1260ddd9a142cc17def1e876ff0fa))
|
|
11
|
+
|
|
12
|
+
## [22.0.0](https://github.com/invertase/react-native-firebase/compare/v21.14.0...v22.0.0) (2025-04-25)
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
- **firestore:** alter all use of DocumentSnapshot `exists` to `exists()` - should be a method not a property
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- **android:** use `=` assignment vs deprecated space-assignment ([39c2ecb](https://github.com/invertase/react-native-firebase/commit/39c2ecb0069a8a5a65b04fb7f86ccecf83273868))
|
|
21
|
+
- enable provenance signing during publish ([4535f0d](https://github.com/invertase/react-native-firebase/commit/4535f0d5756c89aeb8f8e772348c71d8176348be))
|
|
22
|
+
- **firestore:** DocumentSnapshot.exists() should be a method not a property ([#8483](https://github.com/invertase/react-native-firebase/issues/8483)) ([346272c](https://github.com/invertase/react-native-firebase/commit/346272cf9d6545ab5c1a2c30127bc4079700c2d1))
|
|
23
|
+
|
|
6
24
|
## [21.14.0](https://github.com/invertase/react-native-firebase/compare/v21.13.0...v21.14.0) (2025-04-14)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @react-native-firebase/firestore
|
package/android/build.gradle
CHANGED
|
@@ -62,20 +62,20 @@ project.ext {
|
|
|
62
62
|
android {
|
|
63
63
|
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
|
|
64
64
|
if (agpVersion >= 7) {
|
|
65
|
-
namespace 'io.invertase.firebase.firestore'
|
|
65
|
+
namespace = 'io.invertase.firebase.firestore'
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
defaultConfig {
|
|
69
|
-
multiDexEnabled true
|
|
69
|
+
multiDexEnabled = true
|
|
70
70
|
}
|
|
71
71
|
lintOptions {
|
|
72
72
|
disable 'GradleCompatible'
|
|
73
|
-
abortOnError false
|
|
73
|
+
abortOnError = false
|
|
74
74
|
}
|
|
75
75
|
if (agpVersion < 8) {
|
|
76
76
|
compileOptions {
|
|
77
|
-
sourceCompatibility JavaVersion.VERSION_11
|
|
78
|
-
targetCompatibility JavaVersion.VERSION_11
|
|
77
|
+
sourceCompatibility = JavaVersion.VERSION_11
|
|
78
|
+
targetCompatibility = JavaVersion.VERSION_11
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
sourceSets {
|
|
@@ -33,10 +33,6 @@ export default class FirestoreDocumentSnapshot {
|
|
|
33
33
|
this._exists = nativeData.exists;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
get exists() {
|
|
37
|
-
return this._exists;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
36
|
get id() {
|
|
41
37
|
return this._ref.id;
|
|
42
38
|
}
|
|
@@ -49,6 +45,10 @@ export default class FirestoreDocumentSnapshot {
|
|
|
49
45
|
return this._ref;
|
|
50
46
|
}
|
|
51
47
|
|
|
48
|
+
exists() {
|
|
49
|
+
return this._exists;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
52
|
data() {
|
|
53
53
|
// TODO: ehesp: Figure out how to handle this.
|
|
54
54
|
// const snapshotOptions = {};
|
|
@@ -114,7 +114,7 @@ export default class FirestoreDocumentSnapshot {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
if (
|
|
117
|
-
this.exists !== other.exists ||
|
|
117
|
+
this.exists() !== other.exists() ||
|
|
118
118
|
!this.metadata.isEqual(other.metadata) ||
|
|
119
119
|
!this.ref.isEqual(other.ref)
|
|
120
120
|
) {
|
package/lib/FirestoreQuery.js
CHANGED
|
@@ -65,7 +65,7 @@ export default class FirestoreQuery {
|
|
|
65
65
|
|
|
66
66
|
const documentSnapshot = docOrField;
|
|
67
67
|
|
|
68
|
-
if (!documentSnapshot.exists) {
|
|
68
|
+
if (!documentSnapshot.exists()) {
|
|
69
69
|
throw new Error(
|
|
70
70
|
`firebase.firestore().collection().${cursor}(*) Can't use a DocumentSnapshot that doesn't exist.`,
|
|
71
71
|
);
|
package/lib/index.d.ts
CHANGED
|
@@ -523,13 +523,13 @@ export namespace FirebaseFirestoreTypes {
|
|
|
523
523
|
* .`data()` or `.get(:field)` to get a specific field.
|
|
524
524
|
*
|
|
525
525
|
* For a DocumentSnapshot that points to a non-existing document, any data access will return 'undefined'.
|
|
526
|
-
* You can use the `exists`
|
|
526
|
+
* You can use the `exists()` method to explicitly verify a document's existence.
|
|
527
527
|
*/
|
|
528
528
|
export interface DocumentSnapshot<T extends DocumentData = DocumentData> {
|
|
529
529
|
/**
|
|
530
|
-
*
|
|
530
|
+
* Method of the `DocumentSnapshot` that signals whether or not the data exists. True if the document exists.
|
|
531
531
|
*/
|
|
532
|
-
exists: boolean;
|
|
532
|
+
exists(): boolean;
|
|
533
533
|
|
|
534
534
|
/**
|
|
535
535
|
* Property of the `DocumentSnapshot` that provides the document's ID.
|
|
@@ -597,14 +597,14 @@ export namespace FirebaseFirestoreTypes {
|
|
|
597
597
|
* The document is guaranteed to exist and its data can be extracted with .data() or .get(:field) to get a specific field.
|
|
598
598
|
*
|
|
599
599
|
* A QueryDocumentSnapshot offers the same API surface as a DocumentSnapshot.
|
|
600
|
-
* Since query results contain only existing documents, the exists
|
|
600
|
+
* Since query results contain only existing documents, the exists() method will always be true and data() will never return 'undefined'.
|
|
601
601
|
*/
|
|
602
602
|
export interface QueryDocumentSnapshot<T extends DocumentData = DocumentData>
|
|
603
603
|
extends DocumentSnapshot<T> {
|
|
604
604
|
/**
|
|
605
605
|
* A QueryDocumentSnapshot is always guaranteed to exist.
|
|
606
606
|
*/
|
|
607
|
-
exists: true;
|
|
607
|
+
exists(): true;
|
|
608
608
|
|
|
609
609
|
/**
|
|
610
610
|
* Retrieves all fields in the document as an Object.
|
package/lib/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
module.exports = '
|
|
2
|
+
module.exports = '22.1.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/firestore",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.1.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",
|
|
@@ -27,10 +27,11 @@
|
|
|
27
27
|
"firestore"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@react-native-firebase/app": "
|
|
30
|
+
"@react-native-firebase/app": "22.1.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
|
-
"access": "public"
|
|
33
|
+
"access": "public",
|
|
34
|
+
"provenance": true
|
|
34
35
|
},
|
|
35
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "af6096ed9df878f0f169e899564b0aab68d396e5"
|
|
36
37
|
}
|