@react-native-firebase/firestore 23.5.0 → 23.7.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,17 @@
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
+ ## [23.7.0](https://github.com/invertase/react-native-firebase/compare/v23.6.0...v23.7.0) (2025-12-08)
7
+
8
+ **Note:** Version bump only for package @react-native-firebase/firestore
9
+
10
+ ## [23.6.0](https://github.com/invertase/react-native-firebase/compare/v23.5.0...v23.6.0) (2025-12-08)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **firestore:** remove inequality filter with orderBy limitation ([b388022](https://github.com/invertase/react-native-firebase/commit/b38802203086d30f5bb98e76892e5023e02b010e))
15
+ - **firestore:** set firestore client language attribution to react-native ([4fa5141](https://github.com/invertase/react-native-firebase/commit/4fa5141be0049941de2fbe35d2569624f7b884d1))
16
+
6
17
  ## [23.5.0](https://github.com/invertase/react-native-firebase/compare/v23.4.1...v23.5.0) (2025-10-30)
7
18
 
8
19
  **Note:** Version bump only for package @react-native-firebase/firestore
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
27
27
  s.ios.deployment_target = firebase_ios_target
28
28
  s.macos.deployment_target = firebase_macos_target
29
29
  s.tvos.deployment_target = firebase_tvos_target
30
- s.source_files = 'ios/**/*.{h,m}'
30
+ s.source_files = 'ios/**/*.{h,m,mm}'
31
31
 
32
32
  # React Native dependencies
33
33
  s.dependency 'React-Core'
@@ -1,3 +1,4 @@
1
+ import com.android.Version
1
2
  import io.invertase.gradle.common.PackageJson
2
3
 
3
4
  buildscript {
@@ -36,11 +37,8 @@ def jsonTargetSdk = appPackageJson['sdkVersions']['android']['targetSdk']
36
37
  def jsonCompileSdk = appPackageJson['sdkVersions']['android']['compileSdk']
37
38
  def coreVersionDetected = appPackageJson['version']
38
39
  def coreVersionRequired = packageJson['peerDependencies'][appPackageJson['name']]
39
- // Only log after build completed so log warning appears at the end
40
40
  if (coreVersionDetected != coreVersionRequired) {
41
- gradle.buildFinished {
42
- project.logger.warn("ReactNativeFirebase WARNING: NPM package '${packageJson['name']}' depends on '${appPackageJson['name']}' v${coreVersionRequired} but found v${coreVersionDetected}, this might cause build issues or runtime crashes.")
43
- }
41
+ project.logger.warn("ReactNativeFirebase WARNING: NPM package '${packageJson['name']}' depends on '${appPackageJson['name']}' v${coreVersionRequired} but found v${coreVersionDetected}, this might cause build issues or runtime crashes.")
44
42
  }
45
43
 
46
44
  project.ext {
@@ -60,7 +58,7 @@ project.ext {
60
58
  }
61
59
 
62
60
  android {
63
- def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
61
+ def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64
62
  if (agpVersion >= 7) {
65
63
  namespace = 'io.invertase.firebase.firestore'
66
64
  }
@@ -22,6 +22,8 @@ import com.google.firebase.firestore.DocumentReference;
22
22
  import com.google.firebase.firestore.FirebaseFirestore;
23
23
  import com.google.firebase.firestore.FirebaseFirestoreSettings;
24
24
  import com.google.firebase.firestore.Query;
25
+ import com.google.firebase.firestore.remote.FirestoreChannel;
26
+ import io.invertase.firebase.app.ReactNativeFirebaseVersion;
25
27
  import io.invertase.firebase.common.UniversalFirebasePreferences;
26
28
  import java.lang.ref.WeakReference;
27
29
  import java.util.WeakHashMap;
@@ -42,6 +44,7 @@ public class UniversalFirebaseFirestoreCommon {
42
44
  }
43
45
 
44
46
  FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
47
+ FirestoreChannel.setClientLanguage("gl-rn/" + ReactNativeFirebaseVersion.VERSION);
45
48
 
46
49
  FirebaseFirestore instance = FirebaseFirestore.getInstance(firebaseApp, databaseId);
47
50
 
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) 2025-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ #import <Foundation/Foundation.h>
19
+ #import <string>
20
+
21
+ namespace firebase {
22
+ namespace firestore {
23
+ namespace api {
24
+
25
+ class Firestore {
26
+ public:
27
+ static void SetClientLanguage(std::string language_token);
28
+ };
29
+
30
+ } // namespace api
31
+ } // namespace firestore
32
+ } // namespace firebase
33
+
34
+ @interface RNFBFirestoreClientLanguage : NSObject
35
+ + (void)setClientLanguage:(NSString *)language;
36
+ @end
37
+
38
+ @implementation RNFBFirestoreClientLanguage
39
+ + (void)setClientLanguage:(NSString *)language {
40
+ if (language == nil) {
41
+ return;
42
+ }
43
+ std::string token = std::string([language UTF8String]);
44
+ firebase::firestore::api::Firestore::SetClientLanguage(token);
45
+ }
46
+ @end
@@ -17,6 +17,7 @@
17
17
 
18
18
  #import "RNFBFirestoreCommon.h"
19
19
  #import <RNFBApp/RNFBSharedUtils.h>
20
+ #import <RNFBApp/RNFBVersion.h>
20
21
  #import "RNFBPreferences.h"
21
22
 
22
23
  NSString *const FIRESTORE_CACHE_SIZE = @"firebase_firestore_cache_size";
@@ -28,6 +29,10 @@ NSString *const FIRESTORE_SERVER_TIMESTAMP_BEHAVIOR =
28
29
 
29
30
  NSMutableDictionary *instanceCache;
30
31
 
32
+ @interface RNFBFirestoreClientLanguage : NSObject
33
+ + (void)setClientLanguage:(NSString *)language;
34
+ @end
35
+
31
36
  @implementation RNFBFirestoreCommon
32
37
  + (FIRFirestore *)getFirestoreForApp:(FIRApp *)app databaseId:(NSString *)databaseId {
33
38
  if (instanceCache == nil) {
@@ -43,6 +48,11 @@ NSMutableDictionary *instanceCache;
43
48
 
44
49
  FIRFirestore *instance = [FIRFirestore firestoreForApp:app database:databaseId];
45
50
 
51
+ #if TARGET_OS_IPHONE
52
+ [RNFBFirestoreClientLanguage
53
+ setClientLanguage:[NSString stringWithFormat:@"gl-rn/%@", RNFBVersionString]];
54
+ #endif
55
+
46
56
  [self setFirestoreSettings:instance
47
57
  appName:[RNFBSharedUtils getAppJavaScriptName:app.name]
48
58
  databaseId:databaseId];
@@ -398,15 +398,6 @@ export default class FirestoreQueryModifiers {
398
398
  "Invalid query. Query.where() fieldPath parameter: 'FirestoreFieldPath' cannot be used in conjunction with a different Query.orderBy() parameter",
399
399
  );
400
400
  }
401
-
402
- if (INEQUALITY[filter.operator]) {
403
- // Initial orderBy() parameter has to match every where() fieldPath parameter when inequality operator is invoked
404
- if (filterFieldPath !== this._orders[0].fieldPath._toPath()) {
405
- throw new Error(
406
- `Invalid query. Initial Query.orderBy() parameter: ${orderFieldPath} has to be the same as the Query.where() fieldPath parameter(s): ${filterFieldPath} when an inequality operator is invoked `,
407
- );
408
- }
409
- }
410
401
  }
411
402
  }
412
403
  }
package/lib/index.d.ts CHANGED
@@ -599,8 +599,9 @@ export namespace FirebaseFirestoreTypes {
599
599
  * A QueryDocumentSnapshot offers the same API surface as a DocumentSnapshot.
600
600
  * Since query results contain only existing documents, the exists() method will always be true and data() will never return 'undefined'.
601
601
  */
602
- export interface QueryDocumentSnapshot<T extends DocumentData = DocumentData>
603
- extends DocumentSnapshot<T> {
602
+ export interface QueryDocumentSnapshot<
603
+ T extends DocumentData = DocumentData,
604
+ > extends DocumentSnapshot<T> {
604
605
  /**
605
606
  * A QueryDocumentSnapshot is always guaranteed to exist.
606
607
  */
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '23.5.0';
2
+ module.exports = '23.7.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/firestore",
3
- "version": "23.5.0",
3
+ "version": "23.7.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,14 +27,14 @@
27
27
  "firestore"
28
28
  ],
29
29
  "dependencies": {
30
- "react-native-url-polyfill": "2.0.0"
30
+ "react-native-url-polyfill": "3.0.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@react-native-firebase/app": "23.5.0"
33
+ "@react-native-firebase/app": "23.7.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public",
37
37
  "provenance": true
38
38
  },
39
- "gitHead": "5d27948f349d4d6c977c55036e2afd13df8d622f"
39
+ "gitHead": "2a30c0b1e41a2b239172afd167f98a03fd422f2c"
40
40
  }