@snowplow/react-native-tracker 2.1.2 → 4.0.2-dev.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/LICENSE +29 -203
- package/README.md +59 -143
- package/dist/commonjs/event_store.js +150 -0
- package/dist/commonjs/event_store.js.map +1 -0
- package/dist/commonjs/events.js +42 -0
- package/dist/commonjs/events.js.map +1 -0
- package/dist/commonjs/index.js +29 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/subject.js +82 -0
- package/dist/commonjs/subject.js.map +1 -0
- package/dist/commonjs/tracker.js +77 -0
- package/dist/commonjs/tracker.js.map +1 -0
- package/dist/commonjs/types.js +223 -0
- package/dist/commonjs/types.js.map +1 -0
- package/dist/module/event_store.js +145 -0
- package/dist/module/event_store.js.map +1 -0
- package/dist/module/events.js +38 -0
- package/dist/module/events.js.map +1 -0
- package/dist/module/index.js +7 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/subject.js +78 -0
- package/dist/module/subject.js.map +1 -0
- package/dist/module/tracker.js +74 -0
- package/dist/module/tracker.js.map +1 -0
- package/dist/module/types.js +73 -0
- package/dist/module/types.js.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/src/event_store.d.ts +4 -0
- package/dist/typescript/commonjs/src/event_store.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/events.d.ts +10 -0
- package/dist/typescript/commonjs/src/events.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/subject.d.ts +19 -0
- package/dist/typescript/commonjs/src/subject.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/tracker.d.ts +9 -0
- package/dist/typescript/commonjs/src/tracker.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/types.d.ts +452 -0
- package/dist/typescript/commonjs/src/types.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/src/event_store.d.ts +4 -0
- package/dist/typescript/module/src/event_store.d.ts.map +1 -0
- package/dist/typescript/module/src/events.d.ts +10 -0
- package/dist/typescript/module/src/events.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +4 -0
- package/dist/typescript/module/src/index.d.ts.map +1 -0
- package/dist/typescript/module/src/subject.d.ts +19 -0
- package/dist/typescript/module/src/subject.d.ts.map +1 -0
- package/dist/typescript/module/src/tracker.d.ts +9 -0
- package/dist/typescript/module/src/tracker.d.ts.map +1 -0
- package/dist/typescript/module/src/types.d.ts +452 -0
- package/dist/typescript/module/src/types.d.ts.map +1 -0
- package/package.json +75 -147
- package/.editorconfig +0 -15
- package/.eslintignore +0 -6
- package/.gitattributes +0 -3
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/actions/setup/action.yml +0 -28
- package/.github/workflows/build.yml +0 -155
- package/.github/workflows/deploy.yml +0 -97
- package/.github/workflows/e2e-android.yml +0 -121
- package/.github/workflows/e2e-ios.yml +0 -95
- package/.github/workflows/snyk.yml +0 -21
- package/.gitignore +0 -70
- package/.npmignore +0 -60
- package/.nvmrc +0 -1
- package/.watchmanconfig +0 -1
- package/.yarnrc +0 -3
- package/CHANGELOG +0 -184
- package/CONTRIBUTING.md +0 -80
- package/android/build.gradle +0 -110
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradle.properties +0 -5
- package/android/gradlew +0 -234
- package/android/gradlew.bat +0 -89
- package/android/src/main/AndroidManifest.xml +0 -3
- package/android/src/main/AndroidManifestNew.xml +0 -2
- package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerModule.kt +0 -744
- package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerPackage.kt +0 -17
- package/android/src/main/java/com/snowplow/reactnativetracker/util/ConfigUtil.kt +0 -274
- package/android/src/main/java/com/snowplow/reactnativetracker/util/EventUtil.kt +0 -233
- package/android/src/main/java/com/snowplow/reactnativetracker/util/TrackerVersion.kt +0 -5
- package/babel.config.js +0 -3
- package/example/.watchmanconfig +0 -1
- package/example/Gemfile +0 -6
- package/example/android/app/build.gradle +0 -129
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTest.java +0 -36
- package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTestAppJUnitRunner.java +0 -21
- package/example/android/app/src/debug/AndroidManifest.xml +0 -13
- package/example/android/app/src/debug/java/com/reactnativetrackerexample/ReactNativeFlipper.java +0 -75
- package/example/android/app/src/main/AndroidManifest.xml +0 -26
- package/example/android/app/src/main/java/com/reactnativetrackerexample/MainActivity.java +0 -32
- package/example/android/app/src/main/java/com/reactnativetrackerexample/MainApplication.java +0 -62
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -9
- package/example/android/app/src/release/java/com/reactnativetrackerexample/ReactNativeFlipper.java +0 -20
- package/example/android/build.gradle +0 -31
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/example/android/gradle.properties +0 -44
- package/example/android/gradlew +0 -244
- package/example/android/gradlew.bat +0 -92
- package/example/android/settings.gradle +0 -4
- package/example/app.json +0 -4
- package/example/babel.config.js +0 -17
- package/example/detox.config.js +0 -92
- package/example/e2e/config.json +0 -10
- package/example/e2e/emitEvents.e2e.detox.js +0 -95
- package/example/e2e/environment.js +0 -23
- package/example/e2e/helpers/microCommands.js +0 -140
- package/example/e2e/helpers/microHelpers.js +0 -333
- package/example/e2e/helpers/microHelpers.test.js +0 -295
- package/example/e2e/helpers/schemas.js +0 -49
- package/example/e2e/jest.config.js +0 -16
- package/example/e2e/setup.js +0 -4
- package/example/e2e/testEvents.micro.test.js +0 -287
- package/example/index.js +0 -5
- package/example/ios/.xcode.env +0 -11
- package/example/ios/Podfile +0 -62
- package/example/ios/Podfile.lock +0 -730
- package/example/ios/ReactNativeTrackerExample/AppDelegate.h +0 -6
- package/example/ios/ReactNativeTrackerExample/AppDelegate.mm +0 -26
- package/example/ios/ReactNativeTrackerExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/example/ios/ReactNativeTrackerExample/Images.xcassets/Contents.json +0 -6
- package/example/ios/ReactNativeTrackerExample/Info.plist +0 -55
- package/example/ios/ReactNativeTrackerExample/LaunchScreen.storyboard +0 -47
- package/example/ios/ReactNativeTrackerExample/PrivacyInfo.xcprivacy +0 -37
- package/example/ios/ReactNativeTrackerExample/main.m +0 -10
- package/example/ios/ReactNativeTrackerExample-Bridging-Header.h +0 -3
- package/example/ios/ReactNativeTrackerExample.xcodeproj/project.pbxproj +0 -739
- package/example/ios/ReactNativeTrackerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeTrackerExample.xcscheme +0 -88
- package/example/ios/ReactNativeTrackerExample.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/ReactNativeTrackerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/ReactNativeTrackerExampleTests/Info.plist +0 -24
- package/example/ios/ReactNativeTrackerExampleTests/ReactNativeTrackerExampleTests.m +0 -66
- package/example/metro.config.js +0 -45
- package/example/package.json +0 -54
- package/example/react-native.config.js +0 -10
- package/example/src/App.js +0 -566
- package/example/tsconfig.json +0 -5
- package/example/yarn.lock +0 -7703
- package/ios/ReactNativeTracker-Bridging-Header.h +0 -2
- package/ios/ReactNativeTracker.mm +0 -171
- package/ios/ReactNativeTracker.swift +0 -822
- package/ios/ReactNativeTracker.xcodeproj/project.pbxproj +0 -301
- package/ios/Util/ConfigUtils.swift +0 -209
- package/ios/Util/TrackerVersion.swift +0 -3
- package/ios/Util/Utilities.swift +0 -37
- package/lefthook.yml +0 -11
- package/lib/commonjs/api.js +0 -490
- package/lib/commonjs/api.js.map +0 -1
- package/lib/commonjs/configurations.js +0 -196
- package/lib/commonjs/configurations.js.map +0 -1
- package/lib/commonjs/constants.js +0 -77
- package/lib/commonjs/constants.js.map +0 -1
- package/lib/commonjs/events.js +0 -277
- package/lib/commonjs/events.js.map +0 -1
- package/lib/commonjs/index.js +0 -132
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/jsCore.js +0 -427
- package/lib/commonjs/jsCore.js.map +0 -1
- package/lib/commonjs/native.js +0 -16
- package/lib/commonjs/native.js.map +0 -1
- package/lib/commonjs/subject.js +0 -235
- package/lib/commonjs/subject.js.map +0 -1
- package/lib/commonjs/tracker.js +0 -248
- package/lib/commonjs/tracker.js.map +0 -1
- package/lib/commonjs/types.js +0 -2
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/utils.js +0 -72
- package/lib/commonjs/utils.js.map +0 -1
- package/lib/commonjs/webViewInterface.js +0 -66
- package/lib/commonjs/webViewInterface.js.map +0 -1
- package/lib/module/api.js +0 -452
- package/lib/module/api.js.map +0 -1
- package/lib/module/configurations.js +0 -184
- package/lib/module/configurations.js.map +0 -1
- package/lib/module/constants.js +0 -72
- package/lib/module/constants.js.map +0 -1
- package/lib/module/events.js +0 -259
- package/lib/module/events.js.map +0 -1
- package/lib/module/index.js +0 -120
- package/lib/module/index.js.map +0 -1
- package/lib/module/jsCore.js +0 -424
- package/lib/module/jsCore.js.map +0 -1
- package/lib/module/native.js +0 -12
- package/lib/module/native.js.map +0 -1
- package/lib/module/subject.js +0 -222
- package/lib/module/subject.js.map +0 -1
- package/lib/module/tracker.js +0 -234
- package/lib/module/tracker.js.map +0 -1
- package/lib/module/types.js +0 -2
- package/lib/module/types.js.map +0 -1
- package/lib/module/utils.js +0 -66
- package/lib/module/utils.js.map +0 -1
- package/lib/module/webViewInterface.js +0 -62
- package/lib/module/webViewInterface.js.map +0 -1
- package/lib/typescript/__tests__/api.test.d.ts +0 -2
- package/lib/typescript/__tests__/api.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/configurations.test.d.ts +0 -2
- package/lib/typescript/__tests__/configurations.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/events.test.d.ts +0 -2
- package/lib/typescript/__tests__/events.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/index.test.d.ts +0 -2
- package/lib/typescript/__tests__/index.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/jsCore.test.d.ts +0 -2
- package/lib/typescript/__tests__/jsCore.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/utils.test.d.ts +0 -2
- package/lib/typescript/__tests__/utils.test.d.ts.map +0 -1
- package/lib/typescript/api.d.ts +0 -240
- package/lib/typescript/api.d.ts.map +0 -1
- package/lib/typescript/configurations.d.ts +0 -73
- package/lib/typescript/configurations.d.ts.map +0 -1
- package/lib/typescript/constants.d.ts +0 -64
- package/lib/typescript/constants.d.ts.map +0 -1
- package/lib/typescript/events.d.ts +0 -115
- package/lib/typescript/events.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -27
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/jsCore.d.ts +0 -152
- package/lib/typescript/jsCore.d.ts.map +0 -1
- package/lib/typescript/native.d.ts +0 -4
- package/lib/typescript/native.d.ts.map +0 -1
- package/lib/typescript/subject.d.ts +0 -91
- package/lib/typescript/subject.d.ts.map +0 -1
- package/lib/typescript/tracker.d.ts +0 -111
- package/lib/typescript/tracker.d.ts.map +0 -1
- package/lib/typescript/types.d.ts +0 -981
- package/lib/typescript/types.d.ts.map +0 -1
- package/lib/typescript/utils.d.ts +0 -35
- package/lib/typescript/utils.d.ts.map +0 -1
- package/lib/typescript/webViewInterface.d.ts +0 -15
- package/lib/typescript/webViewInterface.d.ts.map +0 -1
- package/scripts/bootstrap.js +0 -29
- package/snowplow-react-native-tracker.podspec +0 -42
- package/src/__mocks__/react-native.js +0 -7
- package/src/__tests__/api.test.ts +0 -21
- package/src/__tests__/configurations.test.ts +0 -608
- package/src/__tests__/events.test.ts +0 -736
- package/src/__tests__/index.test.ts +0 -14
- package/src/__tests__/jsCore.test.ts +0 -199
- package/src/__tests__/utils.test.ts +0 -10
- package/src/api.ts +0 -556
- package/src/configurations.ts +0 -325
- package/src/constants.ts +0 -97
- package/src/events.ts +0 -355
- package/src/index.ts +0 -184
- package/src/jsCore.ts +0 -603
- package/src/native.ts +0 -21
- package/src/subject.ts +0 -302
- package/src/tracker.ts +0 -377
- package/src/types.ts +0 -1162
- package/src/utils.ts +0 -65
- package/src/webViewInterface.ts +0 -92
- package/tsconfig.build.json +0 -5
- package/tsconfig.json +0 -28
- package/turbo.json +0 -34
- package/yarn.lock +0 -9398
package/package.json
CHANGED
|
@@ -1,171 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowplow/react-native-tracker",
|
|
3
|
-
"version": "2.1
|
|
4
|
-
"description": "
|
|
5
|
-
"homepage": "https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/react-native-tracker/",
|
|
6
|
-
"main": "lib/commonjs/index",
|
|
7
|
-
"module": "lib/module/index",
|
|
8
|
-
"types": "lib/typescript/index.d.ts",
|
|
9
|
-
"react-native": "src/index",
|
|
10
|
-
"source": "src/index",
|
|
11
|
-
"files": [
|
|
12
|
-
"src",
|
|
13
|
-
"lib",
|
|
14
|
-
"android",
|
|
15
|
-
"ios",
|
|
16
|
-
"cpp",
|
|
17
|
-
"*.podspec",
|
|
18
|
-
"!lib/typescript/example",
|
|
19
|
-
"!ios/build",
|
|
20
|
-
"!android/build",
|
|
21
|
-
"!android/gradle",
|
|
22
|
-
"!android/gradlew",
|
|
23
|
-
"!android/gradlew.bat",
|
|
24
|
-
"!android/local.properties",
|
|
25
|
-
"!**/__tests__",
|
|
26
|
-
"!**/__fixtures__",
|
|
27
|
-
"!**/__mocks__",
|
|
28
|
-
"!**/.*"
|
|
29
|
-
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"test": "jest --testPathPattern=src/__tests__",
|
|
32
|
-
"typecheck": "tsc --noEmit",
|
|
33
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
34
|
-
"prepack": "bob build",
|
|
35
|
-
"release": "release-it",
|
|
36
|
-
"example": "yarn --cwd example",
|
|
37
|
-
"build:android": "cd example/android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",
|
|
38
|
-
"build:ios": "cd example/ios && xcodebuild -workspace ReactNativeTrackerExample.xcworkspace -scheme ReactNativeTrackerExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO",
|
|
39
|
-
"e2e:android": "yarn example e2e:android",
|
|
40
|
-
"e2e:ios": "yarn example e2e:ios",
|
|
41
|
-
"bootstrap": "yarn example && yarn install && yarn example pods && yarn example rebuild-detox",
|
|
42
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
|
|
43
|
-
},
|
|
3
|
+
"version": "4.0.2-dev.1",
|
|
4
|
+
"description": "React Native tracker for Snowplow",
|
|
44
5
|
"keywords": [
|
|
45
|
-
"
|
|
46
|
-
"
|
|
6
|
+
"snowplow",
|
|
7
|
+
"analytics",
|
|
8
|
+
"tracking",
|
|
9
|
+
"events",
|
|
10
|
+
"open source"
|
|
47
11
|
],
|
|
48
|
-
"
|
|
49
|
-
"
|
|
12
|
+
"homepage": "https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/",
|
|
13
|
+
"bugs": "https://github.com/snowplow/snowplow-javascript-tracker/issues",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/snowplow/snowplow-javascript-tracker.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "BSD-3-Clause",
|
|
50
19
|
"contributors": [
|
|
51
|
-
"
|
|
52
|
-
"Colm O Griobhtha",
|
|
53
|
-
"James Munro",
|
|
54
|
-
"Max Bondarenko",
|
|
55
|
-
"Paul Boocock",
|
|
56
|
-
"Ada Tzereme",
|
|
57
|
-
"Matus Tomlein"
|
|
20
|
+
"Snowplow"
|
|
58
21
|
],
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"@types/jest": "^29.5.12",
|
|
75
|
-
"@types/react": "~18.3.3",
|
|
76
|
-
"@types/react-native": "0.71.3",
|
|
77
|
-
"@types/uuid": "~3.4.6",
|
|
78
|
-
"del-cli": "^5.1.0",
|
|
79
|
-
"eslint": "^8.57.0",
|
|
80
|
-
"eslint-config-prettier": "^8.10.0",
|
|
81
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
82
|
-
"jest": "^29.7.0",
|
|
83
|
-
"pod-install": "^0.2.2",
|
|
84
|
-
"prettier": "^2.8.8",
|
|
85
|
-
"react": "18.3.1",
|
|
86
|
-
"react-native": "0.72.15",
|
|
87
|
-
"react-native-builder-bob": "^0.21.3",
|
|
88
|
-
"release-it": "^16.3.0",
|
|
89
|
-
"turbo": "^1.13.4",
|
|
90
|
-
"typescript": "~5.1.6"
|
|
91
|
-
},
|
|
92
|
-
"resolutions": {
|
|
93
|
-
"@types/react": "18.3.3"
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"source": "./src/index.tsx",
|
|
24
|
+
"main": "./dist/commonjs/index.js",
|
|
25
|
+
"module": "./dist/module/index.js",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/typescript/module/src/index.d.ts",
|
|
30
|
+
"default": "./dist/module/index.js"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/typescript/commonjs/src/index.d.ts",
|
|
34
|
+
"default": "./dist/commonjs/index.js"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
94
37
|
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
],
|
|
95
41
|
"peerDependencies": {
|
|
96
42
|
"react": "*",
|
|
97
43
|
"react-native": "*"
|
|
98
44
|
},
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"preset": "react-native",
|
|
105
|
-
"modulePathIgnorePatterns": [
|
|
106
|
-
"<rootDir>/example/node_modules",
|
|
107
|
-
"<rootDir>/lib/"
|
|
108
|
-
]
|
|
109
|
-
},
|
|
110
|
-
"release-it": {
|
|
111
|
-
"git": {
|
|
112
|
-
"commitMessage": "chore: release ${version}",
|
|
113
|
-
"tagName": "v${version}"
|
|
114
|
-
},
|
|
115
|
-
"npm": {
|
|
116
|
-
"publish": true
|
|
117
|
-
},
|
|
118
|
-
"github": {
|
|
119
|
-
"release": true
|
|
120
|
-
},
|
|
121
|
-
"plugins": {
|
|
122
|
-
"@release-it/conventional-changelog": {
|
|
123
|
-
"preset": "angular"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@react-native-async-storage/async-storage": "~2.0.0",
|
|
47
|
+
"react-native-get-random-values": "~1.11.0",
|
|
48
|
+
"tslib": "^2.3.1",
|
|
49
|
+
"@snowplow/tracker-core": "4.0.2-dev.1"
|
|
126
50
|
},
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"useTabs": false
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
}
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "~5.15.0",
|
|
53
|
+
"@typescript-eslint/parser": "~5.15.0",
|
|
54
|
+
"eslint": "~8.11.0",
|
|
55
|
+
"typescript": "~4.6.2",
|
|
56
|
+
"@types/jest": "~28.1.1",
|
|
57
|
+
"@types/node": "~14.6.0",
|
|
58
|
+
"jest": "~28.1.3",
|
|
59
|
+
"react": "18.2.0",
|
|
60
|
+
"ts-jest": "~28.0.8",
|
|
61
|
+
"@types/react": "^18.2.44",
|
|
62
|
+
"react-native": "0.74.5",
|
|
63
|
+
"node-fetch": "~3.3.2",
|
|
64
|
+
"react-native-builder-bob": "^0.30.3"
|
|
145
65
|
},
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"lib/"
|
|
149
|
-
],
|
|
150
|
-
"prettier": {
|
|
151
|
-
"quoteProps": "consistent",
|
|
152
|
-
"singleQuote": true,
|
|
153
|
-
"tabWidth": 2,
|
|
154
|
-
"trailingComma": "es5",
|
|
155
|
-
"useTabs": false
|
|
66
|
+
"resolutions": {
|
|
67
|
+
"@types/react": "^18.2.44"
|
|
156
68
|
},
|
|
69
|
+
"browserslist": {},
|
|
157
70
|
"react-native-builder-bob": {
|
|
158
71
|
"source": "src",
|
|
159
|
-
"output": "
|
|
72
|
+
"output": "dist",
|
|
160
73
|
"targets": [
|
|
161
|
-
|
|
162
|
-
|
|
74
|
+
[
|
|
75
|
+
"commonjs",
|
|
76
|
+
{
|
|
77
|
+
"esm": true
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
"module",
|
|
82
|
+
{
|
|
83
|
+
"esm": true
|
|
84
|
+
}
|
|
85
|
+
],
|
|
163
86
|
[
|
|
164
87
|
"typescript",
|
|
165
88
|
{
|
|
166
|
-
"project": "tsconfig.build.json"
|
|
89
|
+
"project": "tsconfig.build.json",
|
|
90
|
+
"esm": true
|
|
167
91
|
}
|
|
168
92
|
]
|
|
169
93
|
]
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"build": "bob build",
|
|
97
|
+
"test": "jest"
|
|
170
98
|
}
|
|
171
|
-
}
|
|
99
|
+
}
|
package/.editorconfig
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
[*]
|
|
8
|
-
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
|
|
12
|
-
end_of_line = lf
|
|
13
|
-
charset = utf-8
|
|
14
|
-
trim_trailing_whitespace = true
|
|
15
|
-
insert_final_newline = true
|
package/.eslintignore
DELETED
package/.gitattributes
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: bug
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Describe the bug**
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
**To Reproduce**
|
|
14
|
-
Steps to reproduce the behavior or code snippets that produce the issue.
|
|
15
|
-
|
|
16
|
-
**Expected behavior**
|
|
17
|
-
A clear and concise description of what you expected to happen.
|
|
18
|
-
|
|
19
|
-
**Screenshots**
|
|
20
|
-
If applicable, add screenshots to help explain your problem.
|
|
21
|
-
|
|
22
|
-
**Smartphone (please complete the following information):**
|
|
23
|
-
- Device: [e.g. iPhone6]
|
|
24
|
-
- OS: [e.g. iOS8.1]
|
|
25
|
-
- Browser [e.g. stock browser, safari]
|
|
26
|
-
- Version [e.g. 22]
|
|
27
|
-
|
|
28
|
-
**Additional context**
|
|
29
|
-
Add any other context about the problem here.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an idea for this project
|
|
4
|
-
title: ''
|
|
5
|
-
labels: enhancement
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Is your feature request related to a problem? Please describe.**
|
|
11
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
-
|
|
13
|
-
**Describe the solution you'd like**
|
|
14
|
-
A clear and concise description of what you want to happen.
|
|
15
|
-
|
|
16
|
-
**Describe alternatives you've considered**
|
|
17
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
-
|
|
19
|
-
**Additional context**
|
|
20
|
-
Add any other context or screenshots about the feature request here.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: Setup
|
|
2
|
-
description: Setup Node.js and install dependencies
|
|
3
|
-
|
|
4
|
-
runs:
|
|
5
|
-
using: composite
|
|
6
|
-
steps:
|
|
7
|
-
- name: Setup Node.js
|
|
8
|
-
uses: actions/setup-node@v3
|
|
9
|
-
with:
|
|
10
|
-
node-version-file: .nvmrc
|
|
11
|
-
|
|
12
|
-
- name: Cache dependencies
|
|
13
|
-
id: yarn-cache
|
|
14
|
-
uses: actions/cache@v3
|
|
15
|
-
with:
|
|
16
|
-
path: |
|
|
17
|
-
**/node_modules
|
|
18
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
|
|
19
|
-
restore-keys: |
|
|
20
|
-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
21
|
-
${{ runner.os }}-yarn-
|
|
22
|
-
|
|
23
|
-
- name: Install dependencies
|
|
24
|
-
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
25
|
-
run: |
|
|
26
|
-
yarn install --cwd example --frozen-lockfile
|
|
27
|
-
yarn install --frozen-lockfile
|
|
28
|
-
shell: bash
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
name: Build
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- '*.*.*'
|
|
7
|
-
pull_request:
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
lint:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout
|
|
14
|
-
uses: actions/checkout@v4
|
|
15
|
-
|
|
16
|
-
- name: Setup
|
|
17
|
-
uses: ./.github/actions/setup
|
|
18
|
-
|
|
19
|
-
- name: Lint files
|
|
20
|
-
run: yarn lint
|
|
21
|
-
|
|
22
|
-
- name: Typecheck files
|
|
23
|
-
run: yarn typecheck
|
|
24
|
-
|
|
25
|
-
test:
|
|
26
|
-
runs-on: ubuntu-latest
|
|
27
|
-
steps:
|
|
28
|
-
- name: Checkout
|
|
29
|
-
uses: actions/checkout@v4
|
|
30
|
-
|
|
31
|
-
- name: Setup
|
|
32
|
-
uses: ./.github/actions/setup
|
|
33
|
-
|
|
34
|
-
- name: Run unit tests
|
|
35
|
-
run: yarn test --maxWorkers=2 --coverage
|
|
36
|
-
|
|
37
|
-
build-library:
|
|
38
|
-
runs-on: ubuntu-latest
|
|
39
|
-
steps:
|
|
40
|
-
- name: Checkout
|
|
41
|
-
uses: actions/checkout@v4
|
|
42
|
-
|
|
43
|
-
- name: Setup
|
|
44
|
-
uses: ./.github/actions/setup
|
|
45
|
-
|
|
46
|
-
- name: Build package
|
|
47
|
-
run: yarn prepack
|
|
48
|
-
|
|
49
|
-
build-android:
|
|
50
|
-
runs-on: ubuntu-latest
|
|
51
|
-
env:
|
|
52
|
-
TURBO_CACHE_DIR: .turbo/android
|
|
53
|
-
steps:
|
|
54
|
-
- name: Checkout
|
|
55
|
-
uses: actions/checkout@v4
|
|
56
|
-
|
|
57
|
-
- name: Setup
|
|
58
|
-
uses: ./.github/actions/setup
|
|
59
|
-
|
|
60
|
-
- name: Cache turborepo for Android
|
|
61
|
-
uses: actions/cache@v3
|
|
62
|
-
with:
|
|
63
|
-
path: ${{ env.TURBO_CACHE_DIR }}
|
|
64
|
-
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
|
|
65
|
-
restore-keys: |
|
|
66
|
-
${{ runner.os }}-turborepo-android-
|
|
67
|
-
|
|
68
|
-
- name: Check turborepo cache for Android
|
|
69
|
-
run: |
|
|
70
|
-
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
|
|
71
|
-
|
|
72
|
-
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
|
|
73
|
-
echo "turbo_cache_hit=1" >> $GITHUB_ENV
|
|
74
|
-
fi
|
|
75
|
-
|
|
76
|
-
- name: Install JDK
|
|
77
|
-
if: env.turbo_cache_hit != 1
|
|
78
|
-
uses: actions/setup-java@v3
|
|
79
|
-
with:
|
|
80
|
-
distribution: 'zulu'
|
|
81
|
-
java-version: '11'
|
|
82
|
-
|
|
83
|
-
- name: Finalize Android SDK
|
|
84
|
-
if: env.turbo_cache_hit != 1
|
|
85
|
-
run: |
|
|
86
|
-
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
|
|
87
|
-
|
|
88
|
-
- name: Cache Gradle
|
|
89
|
-
if: env.turbo_cache_hit != 1
|
|
90
|
-
uses: actions/cache@v3
|
|
91
|
-
with:
|
|
92
|
-
path: |
|
|
93
|
-
~/.gradle/wrapper
|
|
94
|
-
~/.gradle/caches
|
|
95
|
-
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
|
|
96
|
-
restore-keys: |
|
|
97
|
-
${{ runner.os }}-gradle-
|
|
98
|
-
|
|
99
|
-
- name: Build example for Android
|
|
100
|
-
run: |
|
|
101
|
-
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
|
|
102
|
-
|
|
103
|
-
build-ios:
|
|
104
|
-
runs-on: macos-latest
|
|
105
|
-
env:
|
|
106
|
-
TURBO_CACHE_DIR: .turbo/ios
|
|
107
|
-
steps:
|
|
108
|
-
- name: Checkout
|
|
109
|
-
uses: actions/checkout@v4
|
|
110
|
-
|
|
111
|
-
- name: setup-cocoapods
|
|
112
|
-
uses: maxim-lobanov/setup-cocoapods@v1
|
|
113
|
-
with:
|
|
114
|
-
version: 1.15.2
|
|
115
|
-
|
|
116
|
-
- name: Setup
|
|
117
|
-
uses: ./.github/actions/setup
|
|
118
|
-
|
|
119
|
-
- name: Cache turborepo for iOS
|
|
120
|
-
uses: actions/cache@v3
|
|
121
|
-
with:
|
|
122
|
-
path: ${{ env.TURBO_CACHE_DIR }}
|
|
123
|
-
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
|
|
124
|
-
restore-keys: |
|
|
125
|
-
${{ runner.os }}-turborepo-ios-
|
|
126
|
-
|
|
127
|
-
- name: Check turborepo cache for iOS
|
|
128
|
-
run: |
|
|
129
|
-
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
|
|
130
|
-
|
|
131
|
-
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
|
|
132
|
-
echo "turbo_cache_hit=1" >> $GITHUB_ENV
|
|
133
|
-
fi
|
|
134
|
-
|
|
135
|
-
- name: Cache cocoapods
|
|
136
|
-
if: env.turbo_cache_hit != 1
|
|
137
|
-
id: cocoapods-cache
|
|
138
|
-
uses: actions/cache@v3
|
|
139
|
-
with:
|
|
140
|
-
path: |
|
|
141
|
-
**/ios/Pods
|
|
142
|
-
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
|
|
143
|
-
restore-keys: |
|
|
144
|
-
${{ runner.os }}-cocoapods-
|
|
145
|
-
|
|
146
|
-
- name: Install cocoapods
|
|
147
|
-
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
|
|
148
|
-
run: |
|
|
149
|
-
yarn example pods
|
|
150
|
-
env:
|
|
151
|
-
NO_FLIPPER: 1
|
|
152
|
-
|
|
153
|
-
- name: Build example for iOS
|
|
154
|
-
run: |
|
|
155
|
-
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
name: Deploy
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- '[0-9]+.[0-9]+.[0-9]+*'
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
|
|
10
|
-
version_check:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
outputs:
|
|
13
|
-
v_tracker: ${{ steps.version.outputs.RN_TRACKER_VERSION}}
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout code
|
|
17
|
-
uses: actions/checkout@v4
|
|
18
|
-
|
|
19
|
-
- name: Get tag and tracker versions
|
|
20
|
-
id: version
|
|
21
|
-
env:
|
|
22
|
-
IOS_VER_FILEPATH: 'ios/Util/TrackerVersion.swift'
|
|
23
|
-
ANDR_VER_FILEPATH: 'android/src/main/java/com/snowplow/reactnativetracker/util/TrackerVersion.kt'
|
|
24
|
-
JS_VER_FILEPATH: 'src/jsCore.ts'
|
|
25
|
-
run: |
|
|
26
|
-
echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
|
27
|
-
echo "RN_TRACKER_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
28
|
-
echo "RN_IOS_TRACKER_VERSION=$(cat "${IOS_VER_FILEPATH}" | sed -n -e 's/^.*kRNTrackerVersion = "rn-\(.*\)"/\1/p')" >> $GITHUB_OUTPUT
|
|
29
|
-
echo "RN_ANDROID_TRACKER_VERSION=$(cat "${ANDR_VER_FILEPATH}" | sed -n -e 's/^.*RN_TRACKER_VERSION = "rn-\(.*\)"/\1/p')" >> $GITHUB_OUTPUT
|
|
30
|
-
echo "RN_JS_TRACKER_VERSION=$(cat "${JS_VER_FILEPATH}" | sed -n -e 's/^.*trackerVersion = '\''rn-\(.*\)'\'';/\1/p')" >> $GITHUB_OUTPUT
|
|
31
|
-
|
|
32
|
-
- name: Fail if version mismatch
|
|
33
|
-
run: |
|
|
34
|
-
if [ "${{ steps.version.outputs.TAG_VERSION }}" != "${{ steps.version.outputs.RN_TRACKER_VERSION }}" ] ; then
|
|
35
|
-
echo "Tag version (${{ steps.version.outputs.TAG_VERSION }}) doesn't match version in project (${{ steps.version.outputs.RN_TRACKER_VERSION }})"
|
|
36
|
-
exit 1
|
|
37
|
-
fi
|
|
38
|
-
if [ "${{ steps.version.outputs.TAG_VERSION }}" != "${{ steps.version.outputs.RN_IOS_TRACKER_VERSION }}" ] ; then
|
|
39
|
-
echo "Tag version (${{ steps.version.outputs.TAG_VERSION }}) doesn't match version in project(ios) (${{ steps.version.outputs.RN_IOS_TRACKER_VERSION }})"
|
|
40
|
-
exit 1
|
|
41
|
-
fi
|
|
42
|
-
if [ "${{ steps.version.outputs.TAG_VERSION }}" != "${{ steps.version.outputs.RN_ANDROID_TRACKER_VERSION }}" ] ; then
|
|
43
|
-
echo "Tag version (${{ steps.version.outputs.TAG_VERSION }}) doesn't match version in project(android) (${{ steps.version.outputs.RN_ANDROID_TRACKER_VERSION }})"
|
|
44
|
-
exit 1
|
|
45
|
-
fi
|
|
46
|
-
if [ "${{ steps.version.outputs.TAG_VERSION }}" != "${{ steps.version.outputs.RN_JS_TRACKER_VERSION }}" ] ; then
|
|
47
|
-
echo "Tag version (${{ steps.version.outputs.TAG_VERSION }}) doesn't match version in project(js) (${{ steps.version.outputs.RN_JS_TRACKER_VERSION }})"
|
|
48
|
-
exit 1
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
publish_npm:
|
|
52
|
-
needs: ["version_check"]
|
|
53
|
-
runs-on: ubuntu-latest
|
|
54
|
-
|
|
55
|
-
steps:
|
|
56
|
-
- name: Checkout
|
|
57
|
-
uses: actions/checkout@v4
|
|
58
|
-
|
|
59
|
-
- name: Setup
|
|
60
|
-
uses: ./.github/actions/setup
|
|
61
|
-
|
|
62
|
-
- name: Run unit tests
|
|
63
|
-
run: yarn test
|
|
64
|
-
|
|
65
|
-
- name: Build dist files
|
|
66
|
-
run: |
|
|
67
|
-
yarn
|
|
68
|
-
yarn prepack
|
|
69
|
-
|
|
70
|
-
- name: NPM Publish
|
|
71
|
-
run: |
|
|
72
|
-
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
|
|
73
|
-
if [[ "${{ needs.version_check.outputs.v_tracker }}" = *-* ]] ; then
|
|
74
|
-
yarn publish --access public --tag next
|
|
75
|
-
else
|
|
76
|
-
yarn publish --access public
|
|
77
|
-
fi
|
|
78
|
-
env:
|
|
79
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
80
|
-
|
|
81
|
-
release:
|
|
82
|
-
needs: ["publish_npm", "version_check"]
|
|
83
|
-
runs-on: ubuntu-latest
|
|
84
|
-
|
|
85
|
-
steps:
|
|
86
|
-
- name: Checkout code
|
|
87
|
-
uses: actions/checkout@v2
|
|
88
|
-
|
|
89
|
-
- name: Release
|
|
90
|
-
uses: softprops/action-gh-release@v0.1.7
|
|
91
|
-
env:
|
|
92
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
93
|
-
with:
|
|
94
|
-
tag_name: ${{ github.event.workflow_run.head_branch }}
|
|
95
|
-
name: Version ${{ needs.version_check.outputs.v_tracker }}
|
|
96
|
-
draft: false
|
|
97
|
-
prerelease: ${{ contains(needs.version_check.outputs.v_tracker, '-') }}
|