@react-native-firebase/database 15.3.0 → 15.5.0

Sign up to get free protection for your applications and to get access to all the features.
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
+ # [15.5.0](https://github.com/invertase/react-native-firebase/compare/v15.4.0...v15.5.0) (2022-09-16)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **database:** support new `EventEmitter.js` logic of RN 0.70.0 ([#6539](https://github.com/invertase/react-native-firebase/issues/6539)) ([3371727](https://github.com/invertase/react-native-firebase/commit/3371727dd23976ce769696c71865460740502d80))
11
+
12
+ # [15.4.0](https://github.com/invertase/react-native-firebase/compare/v15.3.0...v15.4.0) (2022-08-27)
13
+
14
+ **Note:** Version bump only for package @react-native-firebase/database
15
+
6
16
  # [15.3.0](https://github.com/invertase/react-native-firebase/compare/v15.2.0...v15.3.0) (2022-08-07)
7
17
 
8
18
  **Note:** Version bump only for package @react-native-firebase/database
@@ -161,7 +161,18 @@ class DatabaseSyncTree {
161
161
 
162
162
  for (let i = 0, len = registrations.length; i < len; i++) {
163
163
  const registration = registrations[i];
164
- const subscriptions = SharedEventEmitter._subscriber.getSubscriptionsForType(registration);
164
+ let subscriptions;
165
+
166
+ // EventEmitter in react-native < 0.70 had a `_subscriber` property with a method for subscriptions by type...
167
+ if (SharedEventEmitter._subscriber) {
168
+ subscriptions = SharedEventEmitter._subscriber.getSubscriptionsForType(registration);
169
+ } else {
170
+ // ...react-native 0.70 now stores subscribers as a map of Sets by type in `_registry`
171
+ const registrySubscriptionsSet = SharedEventEmitter._registry[registration];
172
+ if (registrySubscriptionsSet) {
173
+ subscriptions = Array.from(registrySubscriptionsSet);
174
+ }
175
+ }
165
176
 
166
177
  if (subscriptions) {
167
178
  for (let j = 0, l = subscriptions.length; j < l; j++) {
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '15.3.0';
2
+ module.exports = '15.5.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/database",
3
- "version": "15.3.0",
3
+ "version": "15.5.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. React Native Firebase provides native integration with the Android & iOS Firebase SDKs, supporting both realtime data sync and offline capabilities.",
6
6
  "main": "lib/index.js",
@@ -25,10 +25,10 @@
25
25
  "realtome database"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@react-native-firebase/app": "15.3.0"
28
+ "@react-native-firebase/app": "15.5.0"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "gitHead": "97f6e273efaac64d8a62eae4be390289e69d506b"
33
+ "gitHead": "af2dd9e79a62ab370c6370a3d741d04542d50b24"
34
34
  }