@react-native-firebase/app 21.7.4 → 21.8.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
+ ## [21.8.0](https://github.com/invertase/react-native-firebase/compare/v21.7.4...v21.8.0) (2025-02-10)
7
+
8
+ ### Bug Fixes
9
+
10
+ - do not ship unit tests in released packages ([e71dadf](https://github.com/invertase/react-native-firebase/commit/e71dadfc1c0cad2e89c94100913af31ddf7d9c91))
11
+
6
12
  ## [21.7.4](https://github.com/invertase/react-native-firebase/compare/v21.7.3...v21.7.4) (2025-02-08)
7
13
 
8
14
  **Note:** Version bump only for package @react-native-firebase/app
@@ -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.7.4";
21
+ public static String VERSION = "21.8.0";
22
22
  }
@@ -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.7.4";
21
+ NSString* const RNFBVersionString = @"21.8.0";
@@ -37,24 +37,24 @@ class RNFBNativeEventEmitter extends NativeEventEmitter {
37
37
  this.ready = true;
38
38
  }
39
39
  RNFBAppModule.eventsAddListener(eventType);
40
- if (global.RNFBDebug) {
40
+ if (globalThis.RNFBDebug) {
41
41
  // eslint-disable-next-line no-console
42
42
  console.debug(`[RNFB-->Event][👂] ${eventType} -> listening`);
43
43
  }
44
44
  const listenerDebugger = (...args) => {
45
- if (global.RNFBDebug) {
45
+ if (globalThis.RNFBDebug) {
46
46
  // eslint-disable-next-line no-console
47
47
  console.debug(`[RNFB<--Event][📣] ${eventType} <-`, JSON.stringify(args[0]));
48
48
  // Possible leaking test if events are still being received after the test.
49
49
  // This is not super accurate but it's better than nothing, e.g. if doing setup/teardown
50
50
  // logic outside of a test this may cause false positives.
51
- if (global.RNFBTest && !global.RNFBDebugInTestLeakDetection) {
51
+ if (globalThis.RNFBTest && !globalThis.RNFBDebugInTestLeakDetection) {
52
52
  // eslint-disable-next-line no-console
53
53
  console.debug(
54
54
  `[TEST--->Leak][💡] Possible leaking test detected! An event (☝️) ` +
55
55
  `was received outside of any running tests which may indicates that some ` +
56
56
  `listeners/event subscriptions that have not been unsubscribed from in your ` +
57
- `test code. The last test that ran was: "${global.RNFBDebugLastTest}".`,
57
+ `test code. The last test that ran was: "${globalThis.RNFBDebugLastTest}".`,
58
58
  );
59
59
  }
60
60
  }
@@ -9,7 +9,7 @@ import { NativeModules } from 'react-native';
9
9
  */
10
10
  export function getReactNativeModule(moduleName) {
11
11
  const nativeModule = NativeModules[moduleName];
12
- if (!global.RNFBDebug) {
12
+ if (!globalThis.RNFBDebug) {
13
13
  return nativeModule;
14
14
  }
15
15
  return new Proxy(nativeModule, {
@@ -10,11 +10,12 @@ export function getReactNativeModule(moduleName) {
10
10
  if (!nativeModule) {
11
11
  throw new Error(`Native module ${moduleName} is not registered.`);
12
12
  }
13
- if (!global.RNFBDebug) {
13
+ if (!globalThis.RNFBDebug) {
14
14
  return nativeModule;
15
15
  }
16
16
  return new Proxy(nativeModule, {
17
17
  ownKeys(target) {
18
+ // FIXME - test in new arch context - I don't think Object.keys works
18
19
  return Object.keys(target);
19
20
  },
20
21
  get: (_, name) => {
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '21.7.4';
2
+ module.exports = '21.8.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/app",
3
- "version": "21.7.4",
3
+ "version": "21.8.0",
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",
@@ -90,5 +90,5 @@
90
90
  "firebaseAppDistributionGradle": "5.1.0"
91
91
  }
92
92
  },
93
- "gitHead": "82c4c7391fee6597726e5363d78400f11a644e47"
93
+ "gitHead": "14ebd5c2d2e0f284397c331f909e533c47f2ec62"
94
94
  }
@@ -1,96 +0,0 @@
1
- import { describe, expect, it, jest } from '@jest/globals';
2
- import { checkV9Deprecation } from '../lib/common/unitTestUtils';
3
- import firebase, {
4
- deleteApp,
5
- registerVersion,
6
- onLog,
7
- getApps,
8
- initializeApp,
9
- getApp,
10
- setLogLevel,
11
- } from '../lib';
12
-
13
- describe('App', function () {
14
- describe('modular', function () {
15
- it('`deleteApp` function is properly exposed to end user', function () {
16
- expect(deleteApp).toBeDefined();
17
- });
18
-
19
- it('`registerVersion` function is properly exposed to end user', function () {
20
- expect(registerVersion).toBeDefined();
21
- });
22
-
23
- it('`onLog` function is properly exposed to end user', function () {
24
- expect(onLog).toBeDefined();
25
- });
26
-
27
- it('`getApps` function is properly exposed to end user', function () {
28
- expect(getApps).toBeDefined();
29
- });
30
-
31
- it('`initializeApp` function is properly exposed to end user', function () {
32
- expect(initializeApp).toBeDefined();
33
- });
34
-
35
- it('`getApp` function is properly exposed to end user', function () {
36
- expect(getApp).toBeDefined();
37
- });
38
-
39
- it('`setLogLevel` function is properly exposed to end user', function () {
40
- expect(setLogLevel).toBeDefined();
41
- });
42
- });
43
-
44
- describe('`console.warn` only called for non-modular API', function () {
45
- it('deleteApp', function () {
46
- // this test has a slightly special setup
47
- // @ts-ignore test
48
- jest.spyOn(getApp(), '_deleteApp').mockImplementation(() => Promise.resolve(null));
49
- checkV9Deprecation(
50
- () => {}, // no modular replacement
51
- () => getApp().delete(), // modular getApp(), then non-modular to check
52
- );
53
- });
54
-
55
- it('getApps', function () {
56
- checkV9Deprecation(
57
- () => getApps(),
58
- () => firebase.apps,
59
- );
60
- });
61
-
62
- it('getApp', function () {
63
- checkV9Deprecation(
64
- () => getApp(),
65
- () => firebase.app(),
66
- );
67
- });
68
-
69
- it('setLogLevel', function () {
70
- checkV9Deprecation(
71
- () => setLogLevel('debug'),
72
- () => firebase.setLogLevel('debug'),
73
- );
74
- });
75
-
76
- it('FirebaseApp.toString()', function () {
77
- checkV9Deprecation(
78
- () => {}, // no modular replacement
79
- () => getApp().toString(), // modular getApp(), then non-modular to check
80
- );
81
- });
82
-
83
- it('FirebaseApp.extendApp()', function () {
84
- checkV9Deprecation(
85
- // no modular replacement for this one so no modular func to send in
86
- () => {},
87
- // modular getApp(), then non-modular to check
88
- () => {
89
- const app = getApp();
90
- (app as any).extendApp({ some: 'property' });
91
- return;
92
- },
93
- );
94
- });
95
- });
96
- });