@react-native-firebase/analytics 12.9.0 → 13.0.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,31 @@
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
+ # [13.0.0](https://github.com/invertase/react-native-firebase/compare/v12.9.3...v13.0.0) (2021-10-31)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **analytics:** allow custom event parameters for screen_view events ([#5811](https://github.com/invertase/react-native-firebase/issues/5811)) ([02e888e](https://github.com/invertase/react-native-firebase/commit/02e888e782f2b0243f0324f63018ea8b27a68abc)), closes [#4594](https://github.com/invertase/react-native-firebase/issues/4594)
11
+ - rename default branch to main ([25e1d3d](https://github.com/invertase/react-native-firebase/commit/25e1d3d5a1a8311588938dc9d8fdf71d11cd9963))
12
+
13
+ - fix(analytics)!: add missing reserved event names (#5630) ([2c1958e](https://github.com/invertase/react-native-firebase/commit/2c1958e7eec13afe47d7d46a4bf003258e4c0c26)), closes [#5630](https://github.com/invertase/react-native-firebase/issues/5630)
14
+
15
+ ### BREAKING CHANGES
16
+
17
+ - some reserved words that were accepted before will throw exceptions now that the list is complete - do not use reserved words for analytics events
18
+
19
+ ## [12.9.3](https://github.com/invertase/react-native-firebase/compare/v12.9.2...v12.9.3) (2021-10-22)
20
+
21
+ **Note:** Version bump only for package @react-native-firebase/analytics
22
+
23
+ ## [12.9.2](https://github.com/invertase/react-native-firebase/compare/v12.9.1...v12.9.2) (2021-10-17)
24
+
25
+ **Note:** Version bump only for package @react-native-firebase/analytics
26
+
27
+ ## [12.9.1](https://github.com/invertase/react-native-firebase/compare/v12.9.0...v12.9.1) (2021-10-10)
28
+
29
+ **Note:** Version bump only for package @react-native-firebase/analytics
30
+
6
31
  # [12.9.0](https://github.com/invertase/react-native-firebase/compare/v12.8.0...v12.9.0) (2021-10-03)
7
32
 
8
33
  **Note:** Version bump only for package @react-native-firebase/analytics
@@ -137,6 +137,13 @@ describe('Analytics', function () {
137
137
  'firebase.analytics().logScreenView(*):',
138
138
  );
139
139
  });
140
+ it('accepts arbitrary custom event parameters while rejecting defined parameters with wrong types', function () {
141
+ expect(() => firebase.analytics().logScreenView({ foo: 'bar' })).not.toThrow();
142
+ expect(() =>
143
+ // @ts-ignore test
144
+ firebase.analytics().logScreenView({ screen_name: 123, foo: 'bar' }),
145
+ ).toThrowError('firebase.analytics().logScreenView(*):');
146
+ });
140
147
  });
141
148
 
142
149
  describe('logAddPaymentInfo()', function () {
@@ -12,7 +12,7 @@ buildscript {
12
12
  }
13
13
 
14
14
  dependencies {
15
- classpath("com.android.tools.build:gradle:7.0.0")
15
+ classpath("com.android.tools.build:gradle:7.0.3")
16
16
  }
17
17
  }
18
18
  }
package/lib/index.d.ts CHANGED
@@ -344,6 +344,10 @@ export namespace FirebaseAnalyticsTypes {
344
344
  * Current class associated with the view the user is currently viewing.
345
345
  */
346
346
  screen_class?: string;
347
+ /**
348
+ * Custom event parameters.
349
+ */
350
+ [key: string]: any;
347
351
  }
348
352
 
349
353
  export interface RefundEventParameters {
package/lib/index.js CHANGED
@@ -37,7 +37,13 @@ import version from './version';
37
37
  import * as structs from './structs';
38
38
 
39
39
  const ReservedEventNames = [
40
+ 'ad_activeview',
41
+ 'ad_click',
42
+ 'ad_exposure',
43
+ 'ad_impression',
44
+ 'ad_query',
40
45
  'ad_reward',
46
+ 'adunit_exposure',
41
47
  'app_background',
42
48
  'app_clear_data',
43
49
  // 'app_exception',
@@ -53,6 +59,7 @@ const ReservedEventNames = [
53
59
  'dynamic_link_first_open',
54
60
  'error',
55
61
  'first_open',
62
+ 'first_visit',
56
63
  'in_app_purchase',
57
64
  'notification_dismiss',
58
65
  'notification_foreground',
package/lib/structs.js CHANGED
@@ -32,7 +32,7 @@ const Item = struct({
32
32
  price: 'number?',
33
33
  });
34
34
 
35
- export const ScreenView = struct({
35
+ export const ScreenView = struct.interface({
36
36
  screen_class: 'string?',
37
37
  screen_name: 'string?',
38
38
  });
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- module.exports = '12.9.0';
2
+ module.exports = '13.0.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/analytics",
3
- "version": "12.9.0",
3
+ "version": "13.0.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - The analytics module provides out of the box support with Google Analytics for Firebase. Integration with the Android & iOS allows for in-depth analytical insight reporting, such as device information, location, user actions and more.",
6
6
  "main": "lib/index.js",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "https://github.com/invertase/react-native-firebase/tree/master/packages/analytics"
15
+ "url": "https://github.com/invertase/react-native-firebase/tree/main/packages/analytics"
16
16
  },
17
17
  "license": "Apache-2.0",
18
18
  "keywords": [
@@ -22,10 +22,10 @@
22
22
  "analytics"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@react-native-firebase/app": "12.9.0"
25
+ "@react-native-firebase/app": "13.0.0"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "092cd33b56125eaa0bef47466697c0c7fb7ecb0f"
30
+ "gitHead": "4e8e81cca023023332dceeb590f886430ae59016"
31
31
  }