@react-native-firebase/app 21.5.0 → 21.6.1

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,22 @@
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.6.1](https://github.com/invertase/react-native-firebase/compare/v21.6.0...v21.6.1) (2024-11-25)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **android, app:** fix hot-reload on react-native <= 0.73 ([81e5fc2](https://github.com/invertase/react-native-firebase/commit/81e5fc2b6c89fdb4aa5f0f5aa95e1e90dae5f2e4))
11
+
12
+ ## [21.6.0](https://github.com/invertase/react-native-firebase/compare/v21.5.0...v21.6.0) (2024-11-20)
13
+
14
+ ### Features
15
+
16
+ - **ios, sdk:** allow FIREBASE_SDK_VERSION override ([8cbe59f](https://github.com/invertase/react-native-firebase/commit/8cbe59fbf771df6ba932832c9d4fd17bf500ea91))
17
+
18
+ ### Bug Fixes
19
+
20
+ - **analytics:** update superstruct dependency / forward-port to new API ([#8153](https://github.com/invertase/react-native-firebase/issues/8153)) ([6db1fb4](https://github.com/invertase/react-native-firebase/commit/6db1fb471e62e2c7e434719f2616c76349f345be))
21
+
6
22
  ## [21.5.0](https://github.com/invertase/react-native-firebase/compare/v21.4.1...v21.5.0) (2024-11-16)
7
23
 
8
24
  ### Bug Fixes
package/RNFBApp.podspec CHANGED
@@ -27,6 +27,11 @@ Pod::Spec.new do |s|
27
27
  # React Native dependencies
28
28
  s.dependency 'React-Core'
29
29
 
30
+ if (ENV.include?('FIREBASE_SDK_VERSION'))
31
+ Pod::UI.puts "#{s.name}: Found Firebase SDK version in environment '#{ENV['FIREBASE_SDK_VERSION']}'"
32
+ $FirebaseSDKVersion = ENV['FIREBASE_SDK_VERSION']
33
+ end
34
+
30
35
  if defined?($FirebaseSDKVersion)
31
36
  Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
32
37
  firebase_sdk_version = $FirebaseSDKVersion
@@ -18,5 +18,5 @@ package io.invertase.firebase.app;
18
18
  */
19
19
  // generated file - do not modify or commit
20
20
  public class ReactNativeFirebaseVersion {
21
- public static String VERSION = "21.5.0";
21
+ public static String VERSION = "21.6.1";
22
22
  }
@@ -92,12 +92,13 @@ public class ReactNativeFirebaseModule extends ReactContextBaseJavaModule
92
92
  return executorService.getTransactionalExecutor(identifier);
93
93
  }
94
94
 
95
-
96
- // This is no longer called as of react-native 0.74 and is only here for
97
- // compatibility with older versions. It delegates to thew new `invalidate`
95
+ // On react-native 0.73 this is called, but simply calls `invalidate()`
96
+ // https://github.com/facebook/react-native/blob/0.73-stable/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/BaseJavaModule.java#L65-L72
97
+ // This is no longer called ever for react-native >= 0.74 and is only here for
98
+ // compatibility with older versions. We delegate to the new `invalidate`
98
99
  // method, which all modules should implement now
99
100
  // Remove this method when minimum supported react-native is 0.74
100
- /** @noinspection removal*/
101
+ // @noinspection removal
101
102
  @SuppressWarnings({"deprecation", "removal"})
102
103
  @Deprecated
103
104
  public void onCatalystInstanceDestroy() {
@@ -107,11 +108,14 @@ public class ReactNativeFirebaseModule extends ReactContextBaseJavaModule
107
108
  }
108
109
 
109
110
  // This should have an @Override annotation but we cannot do
110
- // that until our minimum supported react-native version is 0.74, since the
111
- // method did not exist before then
111
+ // that until our minimum supported react-native version is 0.74
112
+ //
113
+ // No need to call super.invalidate and in fact it is dangerous to do so:
114
+ // - did not exist before react-native 0.73
115
+ // - on 0.74 it calls onCatalystInstanceDestroy which would infinite loop here
116
+ // - on 0.75+ it is empty - meant as sub-class hook only
112
117
  @CallSuper
113
118
  public void invalidate() {
114
- super.invalidate();
115
119
  executorService.shutdown();
116
120
  }
117
121
 
@@ -18,4 +18,4 @@
18
18
  #import <React/RCTVersion.h>
19
19
 
20
20
  // generated file - do not modify or commit
21
- NSString* const RNFBVersionString = @"21.5.0";
21
+ NSString* const RNFBVersionString = @"21.6.1";
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '21.5.0';
2
+ module.exports = '21.6.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/app",
3
- "version": "21.5.0",
3
+ "version": "21.6.1",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Storage and more.",
6
6
  "main": "lib/index.js",
@@ -57,8 +57,7 @@
57
57
  "react-native": "*"
58
58
  },
59
59
  "dependencies": {
60
- "firebase": "10.13.2",
61
- "superstruct": "^0.6.2"
60
+ "firebase": "10.13.2"
62
61
  },
63
62
  "devDependencies": {
64
63
  "@react-native-async-storage/async-storage": "^1.24.0",
@@ -90,5 +89,5 @@
90
89
  "playServicesAuth": "21.2.0"
91
90
  }
92
91
  },
93
- "gitHead": "ca6b846408d5f1773adb84b94c6dcb8c6a7c658a"
92
+ "gitHead": "3623a504a6d07fa148390bd3f97d6c06fea8955d"
94
93
  }
@@ -1,52 +0,0 @@
1
- /*
2
- * Copyright (c) 2016-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
- import { superstruct } from 'superstruct/lib/index';
18
- import { isUndefined } from './validate';
19
-
20
- export default superstruct({
21
- types: {
22
- shortDate: value => typeof value === 'string' && !!value.match(/^\d{4}-\d{2}-\d{2}$/),
23
- },
24
- });
25
-
26
- export const validateStruct = (value = {}, struct, prefix = '') => {
27
- try {
28
- return struct(value);
29
- } catch (e) {
30
- const { path, reason } = e;
31
- const key = path[0];
32
-
33
- if (reason === undefined) {
34
- throw new Error(`${prefix} unknown property '${key}'.`);
35
- }
36
-
37
- e.message = `${prefix} ${e.message}`;
38
-
39
- throw e;
40
- }
41
- };
42
-
43
- export const validateCompound = (source = {}, a, b, prefix = '') => {
44
- if (
45
- (isUndefined(source[a]) && !isUndefined(source[b])) ||
46
- (!isUndefined(source[a]) && isUndefined(source[b]))
47
- ) {
48
- throw new Error(
49
- `${prefix} if you supply the '${a}' parameter, you must also supply the '${b}' parameter.`,
50
- );
51
- }
52
- };