@snowplow/react-native-tracker 2.0.0 → 2.1.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/.github/workflows/build.yml +10 -5
- package/.github/workflows/deploy.yml +9 -10
- package/.github/workflows/e2e-android.yml +2 -2
- package/.github/workflows/e2e-ios.yml +6 -1
- package/.github/workflows/snyk.yml +1 -1
- package/CHANGELOG +14 -0
- package/CONTRIBUTING.md +2 -2
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerModule.kt +50 -10
- package/android/src/main/java/com/snowplow/reactnativetracker/util/ConfigUtil.kt +5 -2
- package/android/src/main/java/com/snowplow/reactnativetracker/util/EventUtil.kt +20 -0
- package/android/src/main/java/com/snowplow/reactnativetracker/util/TrackerVersion.kt +1 -1
- package/example/Gemfile +1 -1
- package/example/e2e/emitEvents.e2e.detox.js +0 -13
- package/example/e2e/helpers/microCommands.js +0 -13
- package/example/e2e/helpers/microHelpers.js +0 -13
- package/example/e2e/helpers/microHelpers.test.js +0 -13
- package/example/e2e/helpers/schemas.js +0 -13
- package/example/e2e/testEvents.micro.test.js +1 -14
- package/example/ios/Podfile +0 -2
- package/example/ios/Podfile.lock +194 -201
- package/example/ios/ReactNativeTrackerExample/PrivacyInfo.xcprivacy +37 -0
- package/example/ios/ReactNativeTrackerExample.xcodeproj/project.pbxproj +17 -0
- package/example/package.json +13 -13
- package/example/src/App.js +9 -0
- package/example/yarn.lock +1599 -1275
- package/ios/ReactNativeTracker.mm +10 -0
- package/ios/ReactNativeTracker.swift +71 -6
- package/ios/Util/ConfigUtils.swift +5 -2
- package/ios/Util/TrackerVersion.swift +1 -1
- package/lib/commonjs/api.js +28 -13
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/configurations.js +1 -14
- package/lib/commonjs/configurations.js.map +1 -1
- package/lib/commonjs/constants.js +6 -14
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/events.js +34 -13
- package/lib/commonjs/events.js.map +1 -1
- package/lib/commonjs/index.js +4 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/jsCore.js +49 -15
- package/lib/commonjs/jsCore.js.map +1 -1
- package/lib/commonjs/native.js +0 -13
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/subject.js +0 -13
- package/lib/commonjs/subject.js.map +1 -1
- package/lib/commonjs/tracker.js +40 -13
- package/lib/commonjs/tracker.js.map +1 -1
- package/lib/commonjs/utils.js +0 -13
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/webViewInterface.js +0 -13
- package/lib/commonjs/webViewInterface.js.map +1 -1
- package/lib/module/api.js +27 -14
- package/lib/module/api.js.map +1 -1
- package/lib/module/configurations.js +1 -14
- package/lib/module/configurations.js.map +1 -1
- package/lib/module/constants.js +6 -14
- package/lib/module/constants.js.map +1 -1
- package/lib/module/events.js +33 -14
- package/lib/module/events.js.map +1 -1
- package/lib/module/index.js +4 -13
- package/lib/module/index.js.map +1 -1
- package/lib/module/jsCore.js +49 -15
- package/lib/module/jsCore.js.map +1 -1
- package/lib/module/native.js +0 -13
- package/lib/module/native.js.map +1 -1
- package/lib/module/subject.js +0 -13
- package/lib/module/subject.js.map +1 -1
- package/lib/module/tracker.js +40 -15
- package/lib/module/tracker.js.map +1 -1
- package/lib/module/utils.js +0 -13
- package/lib/module/utils.js.map +1 -1
- package/lib/module/webViewInterface.js +0 -13
- package/lib/module/webViewInterface.js.map +1 -1
- package/lib/typescript/api.d.ts +16 -2
- package/lib/typescript/api.d.ts.map +1 -1
- package/lib/typescript/configurations.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +5 -0
- package/lib/typescript/constants.d.ts.map +1 -1
- package/lib/typescript/events.d.ts +16 -2
- package/lib/typescript/events.d.ts.map +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/jsCore.d.ts +13 -1
- package/lib/typescript/jsCore.d.ts.map +1 -1
- package/lib/typescript/native.d.ts.map +1 -1
- package/lib/typescript/subject.d.ts.map +1 -1
- package/lib/typescript/tracker.d.ts +20 -2
- package/lib/typescript/tracker.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +83 -5
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts.map +1 -1
- package/lib/typescript/webViewInterface.d.ts.map +1 -1
- package/package.json +22 -22
- package/snowplow-react-native-tracker.podspec +1 -1
- package/src/__tests__/api.test.ts +0 -13
- package/src/__tests__/configurations.test.ts +3 -15
- package/src/__tests__/events.test.ts +0 -13
- package/src/__tests__/index.test.ts +0 -13
- package/src/__tests__/jsCore.test.ts +43 -13
- package/src/__tests__/utils.test.ts +0 -13
- package/src/api.ts +34 -13
- package/src/configurations.ts +1 -13
- package/src/constants.ts +8 -13
- package/src/events.ts +38 -13
- package/src/index.ts +8 -13
- package/src/jsCore.ts +65 -15
- package/src/native.ts +0 -13
- package/src/subject.ts +0 -13
- package/src/tracker.ts +60 -13
- package/src/types.ts +93 -18
- package/src/utils.ts +0 -13
- package/src/webViewInterface.ts +0 -13
- package/yarn.lock +1600 -1535
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
|
12
12
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
|
13
13
|
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
|
14
|
+
76816C09C970822F3096A069 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = AE4057086852DE5BD6D2B6AB /* PrivacyInfo.xcprivacy */; };
|
|
14
15
|
7C4E2212DE08CD76E12DAE64 /* libPods-ReactNativeTrackerExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DE86CCD7F3F68711D41708D /* libPods-ReactNativeTrackerExample.a */; };
|
|
15
16
|
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
|
16
17
|
EB71204E8032F6AA4406EA65 /* libPods-ReactNativeTrackerExample-ReactNativeTrackerExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 544ECAEADD0E2F7107C6A03D /* libPods-ReactNativeTrackerExample-ReactNativeTrackerExampleTests.a */; };
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
7DE86CCD7F3F68711D41708D /* libPods-ReactNativeTrackerExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeTrackerExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
44
45
|
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeTrackerExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
|
45
46
|
89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeTrackerExample-ReactNativeTrackerExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeTrackerExample-ReactNativeTrackerExampleTests.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeTrackerExample-ReactNativeTrackerExampleTests/Pods-ReactNativeTrackerExample-ReactNativeTrackerExampleTests.release.xcconfig"; sourceTree = "<group>"; };
|
|
47
|
+
AE4057086852DE5BD6D2B6AB /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = ReactNativeTrackerExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
|
46
48
|
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
|
47
49
|
/* End PBXFileReference section */
|
|
48
50
|
|
|
@@ -92,6 +94,7 @@
|
|
|
92
94
|
13B07FB61A68108700A75B9A /* Info.plist */,
|
|
93
95
|
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
|
|
94
96
|
13B07FB71A68108700A75B9A /* main.m */,
|
|
97
|
+
AE4057086852DE5BD6D2B6AB /* PrivacyInfo.xcprivacy */,
|
|
95
98
|
);
|
|
96
99
|
name = ReactNativeTrackerExample;
|
|
97
100
|
sourceTree = "<group>";
|
|
@@ -244,6 +247,7 @@
|
|
|
244
247
|
files = (
|
|
245
248
|
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
|
|
246
249
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
|
250
|
+
76816C09C970822F3096A069 /* PrivacyInfo.xcprivacy in Resources */,
|
|
247
251
|
);
|
|
248
252
|
runOnlyForDeploymentPostprocessing = 0;
|
|
249
253
|
};
|
|
@@ -572,6 +576,7 @@
|
|
|
572
576
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
573
577
|
"DEBUG=1",
|
|
574
578
|
"$(inherited)",
|
|
579
|
+
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
|
|
575
580
|
);
|
|
576
581
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
577
582
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
@@ -607,6 +612,10 @@
|
|
|
607
612
|
"-DFOLLY_MOBILE=1",
|
|
608
613
|
"-DFOLLY_USE_LIBCPP=1",
|
|
609
614
|
);
|
|
615
|
+
OTHER_LDFLAGS = (
|
|
616
|
+
"$(inherited)",
|
|
617
|
+
" ",
|
|
618
|
+
);
|
|
610
619
|
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
|
611
620
|
SDKROOT = iphoneos;
|
|
612
621
|
};
|
|
@@ -648,6 +657,10 @@
|
|
|
648
657
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
|
|
649
658
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
650
659
|
GCC_NO_COMMON_BLOCKS = YES;
|
|
660
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
661
|
+
"$(inherited)",
|
|
662
|
+
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
|
|
663
|
+
);
|
|
651
664
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
652
665
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
653
666
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
@@ -680,6 +693,10 @@
|
|
|
680
693
|
"-DFOLLY_MOBILE=1",
|
|
681
694
|
"-DFOLLY_USE_LIBCPP=1",
|
|
682
695
|
);
|
|
696
|
+
OTHER_LDFLAGS = (
|
|
697
|
+
"$(inherited)",
|
|
698
|
+
" ",
|
|
699
|
+
);
|
|
683
700
|
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
|
684
701
|
SDKROOT = iphoneos;
|
|
685
702
|
VALIDATE_PRODUCT = YES;
|
package/example/package.json
CHANGED
|
@@ -23,23 +23,23 @@
|
|
|
23
23
|
"e2e:android": "npm-run-all build:android-release test:android-release test"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"react": "18.
|
|
27
|
-
"react-native": "0.72.
|
|
28
|
-
"react-native-webview": "^13.
|
|
26
|
+
"react": "18.3.1",
|
|
27
|
+
"react-native": "0.72.15",
|
|
28
|
+
"react-native-webview": "^13.10.4"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@babel/core": "^7.
|
|
32
|
-
"@babel/preset-env": "^7.
|
|
33
|
-
"@babel/runtime": "^7.
|
|
31
|
+
"@babel/core": "^7.24.7",
|
|
32
|
+
"@babel/preset-env": "^7.24.7",
|
|
33
|
+
"@babel/runtime": "^7.24.7",
|
|
34
34
|
"@react-native/eslint-config": "^0.72.2",
|
|
35
|
-
"
|
|
36
|
-
"@
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"jest": "^
|
|
35
|
+
"detox": "~20.11.4",
|
|
36
|
+
"@react-native/metro-config": "^0.72.12",
|
|
37
|
+
"@types/jest": "^29.5.12",
|
|
38
|
+
"babel-plugin-module-resolver": "^5.0.2",
|
|
39
|
+
"metro-react-native-babel-preset": "0.76.9",
|
|
40
|
+
"jest": "^29.7.0",
|
|
41
41
|
"npm-run-all": "^4.1.5",
|
|
42
|
-
"ts-jest": "^29.
|
|
42
|
+
"ts-jest": "^29.1.5"
|
|
43
43
|
},
|
|
44
44
|
"jest": {
|
|
45
45
|
"preset": "react-native",
|
package/example/src/App.js
CHANGED
|
@@ -155,6 +155,15 @@ const App = () => {
|
|
|
155
155
|
|
|
156
156
|
const onPressTrackScreenViewEvent = () => {
|
|
157
157
|
tracker.trackScreenViewEvent({ name: 'onlyRequired' });
|
|
158
|
+
tracker.trackScrollChangedEvent({
|
|
159
|
+
yOffset: 20,
|
|
160
|
+
contentHeight: 100,
|
|
161
|
+
viewHeight: 50,
|
|
162
|
+
});
|
|
163
|
+
tracker.trackListItemViewEvent({
|
|
164
|
+
index: 1,
|
|
165
|
+
itemsCount: 10,
|
|
166
|
+
});
|
|
158
167
|
tracker.trackScreenViewEvent({
|
|
159
168
|
name: 'allPopulated',
|
|
160
169
|
type: 'allPopulated',
|