@jmartins-tillster/analytics-react-native 2.21.3

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.
Files changed (602) hide show
  1. package/.editorconfig +10 -0
  2. package/.eslintignore +11 -0
  3. package/.eslintrc.js +60 -0
  4. package/.gitattributes +4 -0
  5. package/.github/ISSUE_TEMPLATE/BUG_REPORT.md +23 -0
  6. package/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +18 -0
  7. package/.github/workflows/ci.yml +158 -0
  8. package/.github/workflows/create_jira.yml +41 -0
  9. package/.github/workflows/publish.yml +57 -0
  10. package/.husky/commit-msg +4 -0
  11. package/.husky/pre-commit +4 -0
  12. package/.prettierrc.js +7 -0
  13. package/.yarnrc.yml +2 -0
  14. package/CODE_OF_CONDUCT.md +84 -0
  15. package/CONTRIBUTING.md +141 -0
  16. package/LICENSE +21 -0
  17. package/MIGRATION_GUIDE.md +185 -0
  18. package/README.md +944 -0
  19. package/babel.config.js +3 -0
  20. package/commitlint.config.js +13 -0
  21. package/examples/AnalyticsReactNativeExample/.bundle/config +2 -0
  22. package/examples/AnalyticsReactNativeExample/.eslintrc.js +4 -0
  23. package/examples/AnalyticsReactNativeExample/.prettierrc.js +7 -0
  24. package/examples/AnalyticsReactNativeExample/.watchmanconfig +1 -0
  25. package/examples/AnalyticsReactNativeExample/App.tsx +164 -0
  26. package/examples/AnalyticsReactNativeExample/Gemfile +9 -0
  27. package/examples/AnalyticsReactNativeExample/Gemfile.lock +106 -0
  28. package/examples/AnalyticsReactNativeExample/Home.tsx +206 -0
  29. package/examples/AnalyticsReactNativeExample/Modal.tsx +25 -0
  30. package/examples/AnalyticsReactNativeExample/README.md +79 -0
  31. package/examples/AnalyticsReactNativeExample/SecondPage.tsx +25 -0
  32. package/examples/AnalyticsReactNativeExample/android/app/build.gradle +119 -0
  33. package/examples/AnalyticsReactNativeExample/android/app/debug.keystore +0 -0
  34. package/examples/AnalyticsReactNativeExample/android/app/proguard-rules.pro +10 -0
  35. package/examples/AnalyticsReactNativeExample/android/app/src/debug/AndroidManifest.xml +9 -0
  36. package/examples/AnalyticsReactNativeExample/android/app/src/main/AndroidManifest.xml +26 -0
  37. package/examples/AnalyticsReactNativeExample/android/app/src/main/java/com/analyticsreactnativeexample/MainActivity.kt +22 -0
  38. package/examples/AnalyticsReactNativeExample/android/app/src/main/java/com/analyticsreactnativeexample/MainApplication.kt +44 -0
  39. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  40. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  41. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  42. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  43. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  44. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  45. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  46. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  47. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  48. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  49. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  50. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/values/strings.xml +3 -0
  51. package/examples/AnalyticsReactNativeExample/android/app/src/main/res/values/styles.xml +9 -0
  52. package/examples/AnalyticsReactNativeExample/android/build.gradle +21 -0
  53. package/examples/AnalyticsReactNativeExample/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  54. package/examples/AnalyticsReactNativeExample/android/gradle/wrapper/gradle-wrapper.properties +8 -0
  55. package/examples/AnalyticsReactNativeExample/android/gradle.properties +39 -0
  56. package/examples/AnalyticsReactNativeExample/android/gradlew +252 -0
  57. package/examples/AnalyticsReactNativeExample/android/gradlew.bat +94 -0
  58. package/examples/AnalyticsReactNativeExample/android/settings.gradle +6 -0
  59. package/examples/AnalyticsReactNativeExample/app.json +4 -0
  60. package/examples/AnalyticsReactNativeExample/babel.config.js +3 -0
  61. package/examples/AnalyticsReactNativeExample/index.js +9 -0
  62. package/examples/AnalyticsReactNativeExample/ios/.xcode.env +11 -0
  63. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample/AppDelegate.h +6 -0
  64. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample/AppDelegate.mm +31 -0
  65. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  66. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample/Images.xcassets/Contents.json +6 -0
  67. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample/Info.plist +52 -0
  68. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample/LaunchScreen.storyboard +47 -0
  69. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample/PrivacyInfo.xcprivacy +37 -0
  70. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample/main.m +10 -0
  71. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj +705 -0
  72. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcodeproj/xcshareddata/xcschemes/AnalyticsReactNativeExample.xcscheme +88 -0
  73. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -0
  74. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  75. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExampleTests/AnalyticsReactNativeExampleTests.m +66 -0
  76. package/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExampleTests/Info.plist +24 -0
  77. package/examples/AnalyticsReactNativeExample/ios/Podfile +40 -0
  78. package/examples/AnalyticsReactNativeExample/ios/Podfile.lock +1961 -0
  79. package/examples/AnalyticsReactNativeExample/metro.config.js +11 -0
  80. package/examples/AnalyticsReactNativeExample/package.json +55 -0
  81. package/examples/AnalyticsReactNativeExample/plugins/ConsentManager.tsx +75 -0
  82. package/examples/AnalyticsReactNativeExample/plugins/Logger.ts +16 -0
  83. package/examples/AnalyticsReactNativeExample/react-native.config.js +9 -0
  84. package/examples/AnalyticsReactNativeExample/tsconfig.json +3 -0
  85. package/examples/AnalyticsReactNativeExample/workspace.js +5 -0
  86. package/examples/AnalyticsReactNativeExample/yarn.lock +11110 -0
  87. package/examples/E2E/.bundle/config +2 -0
  88. package/examples/E2E/.detoxrc.js +96 -0
  89. package/examples/E2E/.mise.toml +5 -0
  90. package/examples/E2E/.prettierrc.js +7 -0
  91. package/examples/E2E/.watchmanconfig +1 -0
  92. package/examples/E2E/App.tsx +176 -0
  93. package/examples/E2E/Gemfile +7 -0
  94. package/examples/E2E/Gemfile.lock +101 -0
  95. package/examples/E2E/Home.tsx +206 -0
  96. package/examples/E2E/Modal.tsx +25 -0
  97. package/examples/E2E/README.md +79 -0
  98. package/examples/E2E/SecondPage.tsx +25 -0
  99. package/examples/E2E/android/app/build.gradle +128 -0
  100. package/examples/E2E/android/app/debug.keystore +0 -0
  101. package/examples/E2E/android/app/proguard-rules.pro +10 -0
  102. package/examples/E2E/android/app/src/androidTest/java/com/segmentanalyticsreactnativeexample/DetoxTest.java +29 -0
  103. package/examples/E2E/android/app/src/debug/AndroidManifest.xml +13 -0
  104. package/examples/E2E/android/app/src/debug/java/com/analyticsreactnativeexample/ReactNativeFlipper.java +75 -0
  105. package/examples/E2E/android/app/src/main/AndroidManifest.xml +26 -0
  106. package/examples/E2E/android/app/src/main/java/com/analyticsreactnativeexample/MainActivity.java +32 -0
  107. package/examples/E2E/android/app/src/main/java/com/analyticsreactnativeexample/MainApplication.java +62 -0
  108. package/examples/E2E/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  109. package/examples/E2E/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  110. package/examples/E2E/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  111. package/examples/E2E/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  112. package/examples/E2E/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  113. package/examples/E2E/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  114. package/examples/E2E/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  115. package/examples/E2E/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  116. package/examples/E2E/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  117. package/examples/E2E/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  118. package/examples/E2E/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  119. package/examples/E2E/android/app/src/main/res/values/strings.xml +3 -0
  120. package/examples/E2E/android/app/src/main/res/values/styles.xml +9 -0
  121. package/examples/E2E/android/app/src/main/res/xml/network_security_config.xml +7 -0
  122. package/examples/E2E/android/app/src/release/java/com/analyticsreactnativeexample/ReactNativeFlipper.java +20 -0
  123. package/examples/E2E/android/build.gradle +37 -0
  124. package/examples/E2E/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  125. package/examples/E2E/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  126. package/examples/E2E/android/gradle.properties +44 -0
  127. package/examples/E2E/android/gradlew +244 -0
  128. package/examples/E2E/android/gradlew.bat +92 -0
  129. package/examples/E2E/android/settings.gradle +4 -0
  130. package/examples/E2E/app.json +4 -0
  131. package/examples/E2E/babel.config.js +14 -0
  132. package/examples/E2E/e2e/jest.config.js +13 -0
  133. package/examples/E2E/e2e/main.e2e.js +192 -0
  134. package/examples/E2E/e2e/matchers.js +34 -0
  135. package/examples/E2E/e2e/mockServer.js +56 -0
  136. package/examples/E2E/index.js +11 -0
  137. package/examples/E2E/ios/.xcode.env +11 -0
  138. package/examples/E2E/ios/AnalyticsReactNativeE2E/AppDelegate.h +6 -0
  139. package/examples/E2E/ios/AnalyticsReactNativeE2E/AppDelegate.mm +26 -0
  140. package/examples/E2E/ios/AnalyticsReactNativeE2E/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  141. package/examples/E2E/ios/AnalyticsReactNativeE2E/Images.xcassets/Contents.json +6 -0
  142. package/examples/E2E/ios/AnalyticsReactNativeE2E/Info.plist +55 -0
  143. package/examples/E2E/ios/AnalyticsReactNativeE2E/LaunchScreen.storyboard +47 -0
  144. package/examples/E2E/ios/AnalyticsReactNativeE2E/main.m +10 -0
  145. package/examples/E2E/ios/AnalyticsReactNativeE2E.xcodeproj/project.pbxproj +721 -0
  146. package/examples/E2E/ios/AnalyticsReactNativeE2E.xcworkspace/contents.xcworkspacedata +10 -0
  147. package/examples/E2E/ios/AnalyticsReactNativeE2E.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  148. package/examples/E2E/ios/AnalyticsReactNativeE2ETests/AnalyticsReactNativeExampleTests.m +66 -0
  149. package/examples/E2E/ios/AnalyticsReactNativeE2ETests/Info.plist +24 -0
  150. package/examples/E2E/ios/Podfile +62 -0
  151. package/examples/E2E/ios/Podfile.lock +763 -0
  152. package/examples/E2E/jest.config.js +3 -0
  153. package/examples/E2E/metro.config.js +45 -0
  154. package/examples/E2E/package.json +65 -0
  155. package/examples/E2E/plugins/Logger.ts +16 -0
  156. package/examples/E2E/react-native.config.js +7 -0
  157. package/examples/E2E/workspace.js +5 -0
  158. package/examples/E2E/yarn.lock +10898 -0
  159. package/examples/E2E-73/.bundle/config +2 -0
  160. package/examples/E2E-73/.detoxrc.js +96 -0
  161. package/examples/E2E-73/.eslintrc.js +4 -0
  162. package/examples/E2E-73/.mise.toml +5 -0
  163. package/examples/E2E-73/.prettierrc.js +7 -0
  164. package/examples/E2E-73/.watchmanconfig +1 -0
  165. package/examples/E2E-73/App.tsx +175 -0
  166. package/examples/E2E-73/Gemfile +7 -0
  167. package/examples/E2E-73/Gemfile.lock +99 -0
  168. package/examples/E2E-73/Home.tsx +206 -0
  169. package/examples/E2E-73/Modal.tsx +25 -0
  170. package/examples/E2E-73/README.md +79 -0
  171. package/examples/E2E-73/SecondPage.tsx +25 -0
  172. package/examples/E2E-73/android/app/build.gradle +119 -0
  173. package/examples/E2E-73/android/app/debug.keystore +0 -0
  174. package/examples/E2E-73/android/app/proguard-rules.pro +10 -0
  175. package/examples/E2E-73/android/app/src/debug/AndroidManifest.xml +9 -0
  176. package/examples/E2E-73/android/app/src/main/AndroidManifest.xml +25 -0
  177. package/examples/E2E-73/android/app/src/main/java/com/analyticsreactnativee2e73/MainActivity.kt +22 -0
  178. package/examples/E2E-73/android/app/src/main/java/com/analyticsreactnativee2e73/MainApplication.kt +45 -0
  179. package/examples/E2E-73/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  180. package/examples/E2E-73/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  181. package/examples/E2E-73/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  182. package/examples/E2E-73/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  183. package/examples/E2E-73/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  184. package/examples/E2E-73/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  185. package/examples/E2E-73/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  186. package/examples/E2E-73/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  187. package/examples/E2E-73/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  188. package/examples/E2E-73/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  189. package/examples/E2E-73/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  190. package/examples/E2E-73/android/app/src/main/res/values/strings.xml +3 -0
  191. package/examples/E2E-73/android/app/src/main/res/values/styles.xml +9 -0
  192. package/examples/E2E-73/android/build.gradle +21 -0
  193. package/examples/E2E-73/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  194. package/examples/E2E-73/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  195. package/examples/E2E-73/android/gradle.properties +41 -0
  196. package/examples/E2E-73/android/gradlew +249 -0
  197. package/examples/E2E-73/android/gradlew.bat +92 -0
  198. package/examples/E2E-73/android/settings.gradle +4 -0
  199. package/examples/E2E-73/app.json +4 -0
  200. package/examples/E2E-73/babel.config.js +14 -0
  201. package/examples/E2E-73/e2e/jest.config.js +13 -0
  202. package/examples/E2E-73/e2e/main.e2e.js +192 -0
  203. package/examples/E2E-73/e2e/matchers.js +34 -0
  204. package/examples/E2E-73/e2e/mockServer.js +56 -0
  205. package/examples/E2E-73/index.js +9 -0
  206. package/examples/E2E-73/ios/.xcode.env +11 -0
  207. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73/AppDelegate.h +6 -0
  208. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73/AppDelegate.mm +31 -0
  209. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  210. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73/Images.xcassets/Contents.json +6 -0
  211. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73/Info.plist +51 -0
  212. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73/LaunchScreen.storyboard +47 -0
  213. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73/main.m +10 -0
  214. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73.xcodeproj/project.pbxproj +700 -0
  215. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73.xcodeproj/xcshareddata/xcschemes/AnalyticsReactNativeE2E73.xcscheme +88 -0
  216. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73.xcworkspace/contents.xcworkspacedata +10 -0
  217. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73Tests/AnalyticsReactNativeE2E73Tests.m +66 -0
  218. package/examples/E2E-73/ios/AnalyticsReactNativeE2E73Tests/Info.plist +24 -0
  219. package/examples/E2E-73/ios/Podfile +55 -0
  220. package/examples/E2E-73/ios/Podfile.lock +1425 -0
  221. package/examples/E2E-73/jest.config.js +3 -0
  222. package/examples/E2E-73/metro.config.js +45 -0
  223. package/examples/E2E-73/package.json +62 -0
  224. package/examples/E2E-73/plugins/Logger.ts +16 -0
  225. package/examples/E2E-73/react-native.config.js +12 -0
  226. package/examples/E2E-73/tsconfig.json +3 -0
  227. package/examples/E2E-73/workspace.js +5 -0
  228. package/examples/E2E-73/yarn.lock +10789 -0
  229. package/examples/README.md +142 -0
  230. package/examples/linkHelper.js +45 -0
  231. package/jest.config.js +7 -0
  232. package/multi-release.config.js +7 -0
  233. package/package.json +79 -0
  234. package/packages/core/CHANGELOG.md +274 -0
  235. package/packages/core/LICENSE +21 -0
  236. package/packages/core/README.md +3 -0
  237. package/packages/core/android/build.gradle +96 -0
  238. package/packages/core/android/gradle.properties +5 -0
  239. package/packages/core/android/src/main/AndroidManifest.xml +4 -0
  240. package/packages/core/android/src/main/AndroidManifestNew.xml +3 -0
  241. package/packages/core/android/src/main/java/com/segmentanalyticsreactnative/AnalyticsReactNativeModule.kt +265 -0
  242. package/packages/core/android/src/main/java/com/segmentanalyticsreactnative/AnalyticsReactNativePackage.kt +43 -0
  243. package/packages/core/babel.config.js +3 -0
  244. package/packages/core/constants-generator.js +17 -0
  245. package/packages/core/ios/AnalyticsReactNative-Bridging-Header.h +1 -0
  246. package/packages/core/ios/AnalyticsReactNative.m +7 -0
  247. package/packages/core/ios/AnalyticsReactNative.swift +142 -0
  248. package/packages/core/ios/AnalyticsReactNative.xcodeproj/project.pbxproj +281 -0
  249. package/packages/core/ios/PrivacyInfo.xcprivacy +70 -0
  250. package/packages/core/jest.config.js +5 -0
  251. package/packages/core/package.json +85 -0
  252. package/packages/core/release.config.js +3 -0
  253. package/packages/core/segment-analytics-react-native.podspec +35 -0
  254. package/packages/core/src/__tests__/__snapshots__/mapTransform.test.ts.snap +20 -0
  255. package/packages/core/src/__tests__/analytics.test.ts +252 -0
  256. package/packages/core/src/__tests__/api.test.ts +91 -0
  257. package/packages/core/src/__tests__/client.test.ts +27 -0
  258. package/packages/core/src/__tests__/context.test.ts +122 -0
  259. package/packages/core/src/__tests__/events.test.ts +234 -0
  260. package/packages/core/src/__tests__/internal/checkInstalledVersion.test.ts +221 -0
  261. package/packages/core/src/__tests__/internal/fetchSettings.test.ts +438 -0
  262. package/packages/core/src/__tests__/internal/handleAppStateChange.test.ts +178 -0
  263. package/packages/core/src/__tests__/internal/trackDeepLinks.test.ts +121 -0
  264. package/packages/core/src/__tests__/logger.test.ts +83 -0
  265. package/packages/core/src/__tests__/mapTransform.test.ts +63 -0
  266. package/packages/core/src/__tests__/methods/alias.test.ts +89 -0
  267. package/packages/core/src/__tests__/methods/flush.test.ts +120 -0
  268. package/packages/core/src/__tests__/methods/group.test.ts +48 -0
  269. package/packages/core/src/__tests__/methods/identify.test.ts +132 -0
  270. package/packages/core/src/__tests__/methods/process.test.ts +162 -0
  271. package/packages/core/src/__tests__/methods/screen.test.ts +48 -0
  272. package/packages/core/src/__tests__/methods/track.test.ts +49 -0
  273. package/packages/core/src/__tests__/timeline.test.ts +130 -0
  274. package/packages/core/src/__tests__/util.test.ts +200 -0
  275. package/packages/core/src/analytics.ts +1030 -0
  276. package/packages/core/src/api.ts +23 -0
  277. package/packages/core/src/client.tsx +76 -0
  278. package/packages/core/src/constants.ts +18 -0
  279. package/packages/core/src/context.ts +107 -0
  280. package/packages/core/src/errors.ts +123 -0
  281. package/packages/core/src/events.ts +75 -0
  282. package/packages/core/src/flushPolicies/__tests__/background-flush-policy.test.ts +39 -0
  283. package/packages/core/src/flushPolicies/__tests__/count-flush-policy.test.ts +28 -0
  284. package/packages/core/src/flushPolicies/__tests__/flush-policy-executer.test.ts +85 -0
  285. package/packages/core/src/flushPolicies/__tests__/timer-flush-policy.test.ts +30 -0
  286. package/packages/core/src/flushPolicies/background-flush-policy.ts +21 -0
  287. package/packages/core/src/flushPolicies/count-flush-policy.ts +31 -0
  288. package/packages/core/src/flushPolicies/flush-policy-executer.ts +100 -0
  289. package/packages/core/src/flushPolicies/index.ts +5 -0
  290. package/packages/core/src/flushPolicies/startup-flush-policy.ts +20 -0
  291. package/packages/core/src/flushPolicies/timer-flush-policy.ts +45 -0
  292. package/packages/core/src/flushPolicies/types.ts +93 -0
  293. package/packages/core/src/index.ts +28 -0
  294. package/packages/core/src/logger.ts +37 -0
  295. package/packages/core/src/mapTransform.ts +48 -0
  296. package/packages/core/src/plugin.ts +212 -0
  297. package/packages/core/src/plugins/ConsentPlugin.ts +200 -0
  298. package/packages/core/src/plugins/DestinationMetadataEnrichment.ts +67 -0
  299. package/packages/core/src/plugins/QueueFlushingPlugin.ts +149 -0
  300. package/packages/core/src/plugins/SegmentDestination.ts +153 -0
  301. package/packages/core/src/plugins/__tests__/QueueFlushingPlugin.test.ts +143 -0
  302. package/packages/core/src/plugins/__tests__/SegmentDestination.test.ts +549 -0
  303. package/packages/core/src/plugins/__tests__/consent/consentNotEnabledAtSegment.test.ts +123 -0
  304. package/packages/core/src/plugins/__tests__/consent/destinationMultipleCategories.test.ts +147 -0
  305. package/packages/core/src/plugins/__tests__/consent/idfa.test.ts +101 -0
  306. package/packages/core/src/plugins/__tests__/consent/mockSettings/ConsentNotEnabledAtSegment.json +70 -0
  307. package/packages/core/src/plugins/__tests__/consent/mockSettings/DestinationsMultipleCategories.json +73 -0
  308. package/packages/core/src/plugins/__tests__/consent/mockSettings/NoUnmappedDestinations.json +105 -0
  309. package/packages/core/src/plugins/__tests__/consent/mockSettings/UnmappedDestinations.json +101 -0
  310. package/packages/core/src/plugins/__tests__/consent/noUnmapped.test.ts +234 -0
  311. package/packages/core/src/plugins/__tests__/consent/unmapped.test.ts +265 -0
  312. package/packages/core/src/plugins/__tests__/consent/utils.ts +75 -0
  313. package/packages/core/src/storage/__tests__/sovranStorage.test.ts +153 -0
  314. package/packages/core/src/storage/helpers.ts +25 -0
  315. package/packages/core/src/storage/index.ts +3 -0
  316. package/packages/core/src/storage/sovranStorage.ts +558 -0
  317. package/packages/core/src/storage/types.ts +106 -0
  318. package/packages/core/src/test-helpers/index.ts +7 -0
  319. package/packages/core/src/test-helpers/mockDestinationPlugin.ts +7 -0
  320. package/packages/core/src/test-helpers/mockEventStore.ts +35 -0
  321. package/packages/core/src/test-helpers/mockLogger.ts +10 -0
  322. package/packages/core/src/test-helpers/mockSegmentStore.ts +266 -0
  323. package/packages/core/src/test-helpers/mockTimeline.ts +9 -0
  324. package/packages/core/src/test-helpers/setupSegmentClient.ts +59 -0
  325. package/packages/core/src/test-helpers/utils.ts +23 -0
  326. package/packages/core/src/timeline.ts +136 -0
  327. package/packages/core/src/types.ts +392 -0
  328. package/packages/core/src/util.ts +288 -0
  329. package/packages/core/src/uuid.ts +7 -0
  330. package/packages/core/tsconfig.json +10 -0
  331. package/packages/core/tsconfig.linter.json +11 -0
  332. package/packages/plugins/plugin-adjust/CHANGELOG.md +60 -0
  333. package/packages/plugins/plugin-adjust/LICENSE +21 -0
  334. package/packages/plugins/plugin-adjust/README.md +72 -0
  335. package/packages/plugins/plugin-adjust/babel.config.js +3 -0
  336. package/packages/plugins/plugin-adjust/jest.config.js +5 -0
  337. package/packages/plugins/plugin-adjust/package.json +72 -0
  338. package/packages/plugins/plugin-adjust/release.config.js +3 -0
  339. package/packages/plugins/plugin-adjust/src/AdjustPlugin.tsx +92 -0
  340. package/packages/plugins/plugin-adjust/src/index.ts +1 -0
  341. package/packages/plugins/plugin-adjust/src/methods/__mocks__/react-native-adjust.ts +19 -0
  342. package/packages/plugins/plugin-adjust/src/methods/__tests__/identify.test.ts +34 -0
  343. package/packages/plugins/plugin-adjust/src/methods/__tests__/reset.test.ts +15 -0
  344. package/packages/plugins/plugin-adjust/src/methods/__tests__/track.test.ts +148 -0
  345. package/packages/plugins/plugin-adjust/src/methods/identify.ts +14 -0
  346. package/packages/plugins/plugin-adjust/src/methods/reset.ts +9 -0
  347. package/packages/plugins/plugin-adjust/src/methods/track.ts +47 -0
  348. package/packages/plugins/plugin-adjust/src/util.ts +29 -0
  349. package/packages/plugins/plugin-adjust/tsconfig.json +10 -0
  350. package/packages/plugins/plugin-advertising-id/CHANGELOG.md +101 -0
  351. package/packages/plugins/plugin-advertising-id/CONTRIBUTING.md +196 -0
  352. package/packages/plugins/plugin-advertising-id/LICENSE +21 -0
  353. package/packages/plugins/plugin-advertising-id/README.md +40 -0
  354. package/packages/plugins/plugin-advertising-id/android/build.gradle +96 -0
  355. package/packages/plugins/plugin-advertising-id/android/gradle.properties +5 -0
  356. package/packages/plugins/plugin-advertising-id/android/src/main/AndroidManifest.xml +4 -0
  357. package/packages/plugins/plugin-advertising-id/android/src/main/AndroidManifestNew.xml +3 -0
  358. package/packages/plugins/plugin-advertising-id/android/src/main/java/com/reactnativeanalyticsreactnativepluginadvertisingid/AnalyticsReactNativePluginAdvertisingIdModule.kt +64 -0
  359. package/packages/plugins/plugin-advertising-id/android/src/main/java/com/reactnativeanalyticsreactnativepluginadvertisingid/AnalyticsReactNativePluginAdvertisingIdPackage.kt +17 -0
  360. package/packages/plugins/plugin-advertising-id/babel.config.js +3 -0
  361. package/packages/plugins/plugin-advertising-id/jest.config.js +5 -0
  362. package/packages/plugins/plugin-advertising-id/package.json +70 -0
  363. package/packages/plugins/plugin-advertising-id/release.config.js +3 -0
  364. package/packages/plugins/plugin-advertising-id/src/AdvertisingIdPlugin.ts +172 -0
  365. package/packages/plugins/plugin-advertising-id/src/index.ts +1 -0
  366. package/packages/plugins/plugin-advertising-id/src/types.ts +3 -0
  367. package/packages/plugins/plugin-advertising-id/tsconfig.json +10 -0
  368. package/packages/plugins/plugin-amplitudeSession/CHANGELOG.md +46 -0
  369. package/packages/plugins/plugin-amplitudeSession/LICENSE +21 -0
  370. package/packages/plugins/plugin-amplitudeSession/README.md +66 -0
  371. package/packages/plugins/plugin-amplitudeSession/babel.config.js +3 -0
  372. package/packages/plugins/plugin-amplitudeSession/jest.config.js +5 -0
  373. package/packages/plugins/plugin-amplitudeSession/package.json +71 -0
  374. package/packages/plugins/plugin-amplitudeSession/release.config.js +3 -0
  375. package/packages/plugins/plugin-amplitudeSession/src/AmplitudeSessionPlugin.tsx +327 -0
  376. package/packages/plugins/plugin-amplitudeSession/src/__tests__/AmplitudeSessionPlugin.test.ts +769 -0
  377. package/packages/plugins/plugin-amplitudeSession/src/index.ts +1 -0
  378. package/packages/plugins/plugin-amplitudeSession/tsconfig.json +10 -0
  379. package/packages/plugins/plugin-appsflyer/CHANGELOG.md +64 -0
  380. package/packages/plugins/plugin-appsflyer/LICENSE +21 -0
  381. package/packages/plugins/plugin-appsflyer/README.md +90 -0
  382. package/packages/plugins/plugin-appsflyer/babel.config.js +3 -0
  383. package/packages/plugins/plugin-appsflyer/jest.config.js +5 -0
  384. package/packages/plugins/plugin-appsflyer/package.json +74 -0
  385. package/packages/plugins/plugin-appsflyer/release.config.js +3 -0
  386. package/packages/plugins/plugin-appsflyer/src/AppsflyerPlugin.tsx +218 -0
  387. package/packages/plugins/plugin-appsflyer/src/__tests__/AppsflyerPlugin.test.ts +20 -0
  388. package/packages/plugins/plugin-appsflyer/src/index.ts +1 -0
  389. package/packages/plugins/plugin-appsflyer/src/methods/__mocks__/react-native-appsflyer.ts +11 -0
  390. package/packages/plugins/plugin-appsflyer/src/methods/__tests__/identify.test.ts +57 -0
  391. package/packages/plugins/plugin-appsflyer/src/methods/__tests__/track.test.ts +99 -0
  392. package/packages/plugins/plugin-appsflyer/src/methods/identify.ts +42 -0
  393. package/packages/plugins/plugin-appsflyer/src/methods/track.ts +61 -0
  394. package/packages/plugins/plugin-appsflyer/src/types.ts +9 -0
  395. package/packages/plugins/plugin-appsflyer/tsconfig.json +10 -0
  396. package/packages/plugins/plugin-branch/CHANGELOG.md +51 -0
  397. package/packages/plugins/plugin-branch/LICENSE +21 -0
  398. package/packages/plugins/plugin-branch/README.md +71 -0
  399. package/packages/plugins/plugin-branch/babel.config.js +3 -0
  400. package/packages/plugins/plugin-branch/jest.config.js +5 -0
  401. package/packages/plugins/plugin-branch/package.json +74 -0
  402. package/packages/plugins/plugin-branch/release.config.js +3 -0
  403. package/packages/plugins/plugin-branch/src/BranchPlugin.ts +42 -0
  404. package/packages/plugins/plugin-branch/src/index.ts +1 -0
  405. package/packages/plugins/plugin-branch/src/methods/__mocks__/react-native-branch.ts +16 -0
  406. package/packages/plugins/plugin-branch/src/methods/__tests__/alias.test.ts +23 -0
  407. package/packages/plugins/plugin-branch/src/methods/__tests__/identify.test.ts +23 -0
  408. package/packages/plugins/plugin-branch/src/methods/__tests__/screen.test.ts +38 -0
  409. package/packages/plugins/plugin-branch/src/methods/__tests__/track.test.ts +73 -0
  410. package/packages/plugins/plugin-branch/src/methods/alias.ts +9 -0
  411. package/packages/plugins/plugin-branch/src/methods/identify.ts +9 -0
  412. package/packages/plugins/plugin-branch/src/methods/parameterMapping.ts +109 -0
  413. package/packages/plugins/plugin-branch/src/methods/reset.ts +5 -0
  414. package/packages/plugins/plugin-branch/src/methods/screen.ts +17 -0
  415. package/packages/plugins/plugin-branch/src/methods/track.ts +18 -0
  416. package/packages/plugins/plugin-branch/src/methods/util.ts +64 -0
  417. package/packages/plugins/plugin-branch/tsconfig.json +10 -0
  418. package/packages/plugins/plugin-braze/CHANGELOG.md +101 -0
  419. package/packages/plugins/plugin-braze/LICENSE +21 -0
  420. package/packages/plugins/plugin-braze/README.md +72 -0
  421. package/packages/plugins/plugin-braze/babel.config.js +3 -0
  422. package/packages/plugins/plugin-braze/jest.config.js +5 -0
  423. package/packages/plugins/plugin-braze/package.json +74 -0
  424. package/packages/plugins/plugin-braze/release.config.js +3 -0
  425. package/packages/plugins/plugin-braze/src/BrazePlugin.tsx +346 -0
  426. package/packages/plugins/plugin-braze/src/index.ts +1 -0
  427. package/packages/plugins/plugin-braze/src/methods/__mocks__/@braze/react-native-sdk.ts +31 -0
  428. package/packages/plugins/plugin-braze/src/methods/__tests__/flush.test.ts +15 -0
  429. package/packages/plugins/plugin-braze/src/methods/__tests__/identify.test.ts +114 -0
  430. package/packages/plugins/plugin-braze/src/methods/__tests__/track.test.ts +321 -0
  431. package/packages/plugins/plugin-braze/src/methods/flush.ts +5 -0
  432. package/packages/plugins/plugin-braze/tsconfig.json +10 -0
  433. package/packages/plugins/plugin-braze-middleware/CHANGELOG.md +32 -0
  434. package/packages/plugins/plugin-braze-middleware/LICENSE +21 -0
  435. package/packages/plugins/plugin-braze-middleware/README.md +67 -0
  436. package/packages/plugins/plugin-braze-middleware/babel.config.js +3 -0
  437. package/packages/plugins/plugin-braze-middleware/jest.config.js +5 -0
  438. package/packages/plugins/plugin-braze-middleware/package.json +72 -0
  439. package/packages/plugins/plugin-braze-middleware/release.config.js +3 -0
  440. package/packages/plugins/plugin-braze-middleware/src/BrazeMiddlewarePlugin.tsx +38 -0
  441. package/packages/plugins/plugin-braze-middleware/src/index.ts +1 -0
  442. package/packages/plugins/plugin-braze-middleware/tsconfig.json +10 -0
  443. package/packages/plugins/plugin-clevertap/CHANGELOG.md +32 -0
  444. package/packages/plugins/plugin-clevertap/LICENSE +21 -0
  445. package/packages/plugins/plugin-clevertap/README.md +71 -0
  446. package/packages/plugins/plugin-clevertap/babel.config.js +3 -0
  447. package/packages/plugins/plugin-clevertap/jest.config.js +5 -0
  448. package/packages/plugins/plugin-clevertap/package.json +72 -0
  449. package/packages/plugins/plugin-clevertap/release.config.js +3 -0
  450. package/packages/plugins/plugin-clevertap/src/ClevertapPlugin.ts +75 -0
  451. package/packages/plugins/plugin-clevertap/src/__mocks__/clevertap-react-native.ts +5 -0
  452. package/packages/plugins/plugin-clevertap/src/__tests__/ClevertapPlugin.test.ts +164 -0
  453. package/packages/plugins/plugin-clevertap/src/index.ts +1 -0
  454. package/packages/plugins/plugin-clevertap/src/parameterMapping.ts +19 -0
  455. package/packages/plugins/plugin-clevertap/tsconfig.json +10 -0
  456. package/packages/plugins/plugin-destination-filters/CHANGELOG.md +39 -0
  457. package/packages/plugins/plugin-destination-filters/LICENSE +21 -0
  458. package/packages/plugins/plugin-destination-filters/README.md +71 -0
  459. package/packages/plugins/plugin-destination-filters/babel.config.js +3 -0
  460. package/packages/plugins/plugin-destination-filters/jest.config.js +5 -0
  461. package/packages/plugins/plugin-destination-filters/package.json +77 -0
  462. package/packages/plugins/plugin-destination-filters/release.config.js +3 -0
  463. package/packages/plugins/plugin-destination-filters/src/DestinationFilters.ts +90 -0
  464. package/packages/plugins/plugin-destination-filters/src/__tests__/DestinationFilters.test.ts +102 -0
  465. package/packages/plugins/plugin-destination-filters/src/index.tsx +1 -0
  466. package/packages/plugins/plugin-destination-filters/tsconfig.json +10 -0
  467. package/packages/plugins/plugin-device-token/CHANGELOG.md +71 -0
  468. package/packages/plugins/plugin-device-token/LICENSE +21 -0
  469. package/packages/plugins/plugin-device-token/README.md +98 -0
  470. package/packages/plugins/plugin-device-token/babel.config.js +3 -0
  471. package/packages/plugins/plugin-device-token/jest.config.js +5 -0
  472. package/packages/plugins/plugin-device-token/package.json +76 -0
  473. package/packages/plugins/plugin-device-token/release.config.js +3 -0
  474. package/packages/plugins/plugin-device-token/src/DeviceTokenPlugin.tsx +94 -0
  475. package/packages/plugins/plugin-device-token/src/index.ts +1 -0
  476. package/packages/plugins/plugin-device-token/src/methods/___tests__/DeviceTokenPlugin.test.ts +94 -0
  477. package/packages/plugins/plugin-device-token/tsconfig.json +10 -0
  478. package/packages/plugins/plugin-facebook-app-events/CHANGELOG.md +78 -0
  479. package/packages/plugins/plugin-facebook-app-events/LICENSE +21 -0
  480. package/packages/plugins/plugin-facebook-app-events/README.md +73 -0
  481. package/packages/plugins/plugin-facebook-app-events/babel.config.js +3 -0
  482. package/packages/plugins/plugin-facebook-app-events/jest.config.js +5 -0
  483. package/packages/plugins/plugin-facebook-app-events/package.json +72 -0
  484. package/packages/plugins/plugin-facebook-app-events/release.config.js +3 -0
  485. package/packages/plugins/plugin-facebook-app-events/src/FacebookAppEventsPlugin.ts +192 -0
  486. package/packages/plugins/plugin-facebook-app-events/src/__tests__/FacebookAppEventsPlugin.test.ts +284 -0
  487. package/packages/plugins/plugin-facebook-app-events/src/index.ts +1 -0
  488. package/packages/plugins/plugin-facebook-app-events/src/methods/__tests__/screen.test.ts +33 -0
  489. package/packages/plugins/plugin-facebook-app-events/src/methods/screen.ts +35 -0
  490. package/packages/plugins/plugin-facebook-app-events/src/parameterMapping.ts +46 -0
  491. package/packages/plugins/plugin-facebook-app-events/src/utils.ts +12 -0
  492. package/packages/plugins/plugin-facebook-app-events/tsconfig.json +10 -0
  493. package/packages/plugins/plugin-firebase/CHANGELOG.md +102 -0
  494. package/packages/plugins/plugin-firebase/LICENSE +21 -0
  495. package/packages/plugins/plugin-firebase/README.md +72 -0
  496. package/packages/plugins/plugin-firebase/babel.config.js +3 -0
  497. package/packages/plugins/plugin-firebase/jest.config.js +5 -0
  498. package/packages/plugins/plugin-firebase/package.json +74 -0
  499. package/packages/plugins/plugin-firebase/release.config.js +3 -0
  500. package/packages/plugins/plugin-firebase/src/FirebasePlugin.tsx +96 -0
  501. package/packages/plugins/plugin-firebase/src/index.ts +1 -0
  502. package/packages/plugins/plugin-firebase/src/methods/___tests__/identify.test.ts +73 -0
  503. package/packages/plugins/plugin-firebase/src/methods/___tests__/reset.test.ts +20 -0
  504. package/packages/plugins/plugin-firebase/src/methods/___tests__/screen.test.ts +33 -0
  505. package/packages/plugins/plugin-firebase/src/methods/___tests__/track.test.ts +85 -0
  506. package/packages/plugins/plugin-firebase/src/methods/parameterMapping.ts +45 -0
  507. package/packages/plugins/plugin-firebase/src/methods/reset.ts +5 -0
  508. package/packages/plugins/plugin-firebase/src/methods/screen.ts +12 -0
  509. package/packages/plugins/plugin-firebase/src/methods/track.ts +26 -0
  510. package/packages/plugins/plugin-firebase/tsconfig.json +10 -0
  511. package/packages/plugins/plugin-idfa/CHANGELOG.md +62 -0
  512. package/packages/plugins/plugin-idfa/LICENSE +21 -0
  513. package/packages/plugins/plugin-idfa/README.md +105 -0
  514. package/packages/plugins/plugin-idfa/babel.config.js +3 -0
  515. package/packages/plugins/plugin-idfa/ios/AnalyticsReactNativePluginIdfa-Bridging-Header.h +2 -0
  516. package/packages/plugins/plugin-idfa/ios/AnalyticsReactNativePluginIdfa.m +11 -0
  517. package/packages/plugins/plugin-idfa/ios/AnalyticsReactNativePluginIdfa.swift +68 -0
  518. package/packages/plugins/plugin-idfa/ios/AnalyticsReactNativePluginIdfa.xcodeproj/project.pbxproj +293 -0
  519. package/packages/plugins/plugin-idfa/jest.config.js +5 -0
  520. package/packages/plugins/plugin-idfa/package.json +70 -0
  521. package/packages/plugins/plugin-idfa/release.config.js +3 -0
  522. package/packages/plugins/plugin-idfa/segment-analytics-react-native-plugin-idfa.podspec +19 -0
  523. package/packages/plugins/plugin-idfa/src/AnalyticsReactNativePluginIdfa.e2e.mock.ts +12 -0
  524. package/packages/plugins/plugin-idfa/src/AnalyticsReactNativePluginIdfa.ts +18 -0
  525. package/packages/plugins/plugin-idfa/src/IdfaPlugin.tsx +80 -0
  526. package/packages/plugins/plugin-idfa/src/index.ts +1 -0
  527. package/packages/plugins/plugin-idfa/src/types.ts +13 -0
  528. package/packages/plugins/plugin-idfa/tsconfig.json +10 -0
  529. package/packages/plugins/plugin-mixpanel/CHANGELOG.md +73 -0
  530. package/packages/plugins/plugin-mixpanel/LICENSE +21 -0
  531. package/packages/plugins/plugin-mixpanel/README.md +71 -0
  532. package/packages/plugins/plugin-mixpanel/babel.config.js +3 -0
  533. package/packages/plugins/plugin-mixpanel/jest.config.js +5 -0
  534. package/packages/plugins/plugin-mixpanel/package.json +72 -0
  535. package/packages/plugins/plugin-mixpanel/release.config.js +3 -0
  536. package/packages/plugins/plugin-mixpanel/src/MixpanelPlugin.ts +106 -0
  537. package/packages/plugins/plugin-mixpanel/src/index.ts +1 -0
  538. package/packages/plugins/plugin-mixpanel/src/methods/__mocks__/mixpanel-react-native.ts +67 -0
  539. package/packages/plugins/plugin-mixpanel/src/methods/__tests__/MixpanelPlugin.test.ts +57 -0
  540. package/packages/plugins/plugin-mixpanel/src/methods/__tests__/__helpers__/constants.ts +18 -0
  541. package/packages/plugins/plugin-mixpanel/src/methods/__tests__/alias.test.ts +47 -0
  542. package/packages/plugins/plugin-mixpanel/src/methods/__tests__/group.test.ts +49 -0
  543. package/packages/plugins/plugin-mixpanel/src/methods/__tests__/identify.test.ts +103 -0
  544. package/packages/plugins/plugin-mixpanel/src/methods/__tests__/screen.test.ts +119 -0
  545. package/packages/plugins/plugin-mixpanel/src/methods/__tests__/track.test.ts +110 -0
  546. package/packages/plugins/plugin-mixpanel/src/methods/alias.ts +28 -0
  547. package/packages/plugins/plugin-mixpanel/src/methods/group.ts +26 -0
  548. package/packages/plugins/plugin-mixpanel/src/methods/identify.ts +72 -0
  549. package/packages/plugins/plugin-mixpanel/src/methods/screen.ts +43 -0
  550. package/packages/plugins/plugin-mixpanel/src/methods/track.ts +60 -0
  551. package/packages/plugins/plugin-mixpanel/src/types.ts +15 -0
  552. package/packages/plugins/plugin-mixpanel/tsconfig.json +10 -0
  553. package/packages/plugins/plugin-onetrust/CHANGELOG.md +16 -0
  554. package/packages/plugins/plugin-onetrust/LICENSE +21 -0
  555. package/packages/plugins/plugin-onetrust/README.md +155 -0
  556. package/packages/plugins/plugin-onetrust/babel.config.js +3 -0
  557. package/packages/plugins/plugin-onetrust/jest.config.js +6 -0
  558. package/packages/plugins/plugin-onetrust/package.json +75 -0
  559. package/packages/plugins/plugin-onetrust/release.config.js +3 -0
  560. package/packages/plugins/plugin-onetrust/src/OneTrustProvider.ts +71 -0
  561. package/packages/plugins/plugin-onetrust/src/index.tsx +1 -0
  562. package/packages/plugins/plugin-onetrust/tsconfig.json +10 -0
  563. package/packages/shared/__mocks__/context.ts +35 -0
  564. package/packages/shared/__mocks__/react-native-get-random-values.ts +1 -0
  565. package/packages/shared/__mocks__/react-native.ts +53 -0
  566. package/packages/shared/__mocks__/uuid.ts +3 -0
  567. package/packages/shared/jest.config.base.js +38 -0
  568. package/packages/shared/package.json +19 -0
  569. package/packages/shared/src/setup.ts +7 -0
  570. package/packages/shared/tsconfig.json +15 -0
  571. package/packages/sovran/CHANGELOG.md +42 -0
  572. package/packages/sovran/CONTRIBUTING.md +196 -0
  573. package/packages/sovran/LICENSE +21 -0
  574. package/packages/sovran/README.md +174 -0
  575. package/packages/sovran/android/build.gradle +94 -0
  576. package/packages/sovran/android/gradle.properties +5 -0
  577. package/packages/sovran/android/src/main/AndroidManifest.xml +4 -0
  578. package/packages/sovran/android/src/main/AndroidManifestNew.xml +3 -0
  579. package/packages/sovran/android/src/main/java/com/reactnativesovran/Sovran.kt +45 -0
  580. package/packages/sovran/android/src/main/java/com/reactnativesovran/SovranModule.kt +55 -0
  581. package/packages/sovran/babel.config.js +3 -0
  582. package/packages/sovran/ios/Sovran-Bridging-Header.h +3 -0
  583. package/packages/sovran/ios/Sovran.m +8 -0
  584. package/packages/sovran/ios/Sovran.swift +67 -0
  585. package/packages/sovran/ios/Sovran.xcodeproj/project.pbxproj +279 -0
  586. package/packages/sovran/jest.config.js +5 -0
  587. package/packages/sovran/package.json +89 -0
  588. package/packages/sovran/release.config.js +3 -0
  589. package/packages/sovran/sovran-react-native.podspec +33 -0
  590. package/packages/sovran/src/__tests__/bridge.test.ts +39 -0
  591. package/packages/sovran/src/__tests__/index.test.tsx +1 -0
  592. package/packages/sovran/src/__tests__/store.test.ts +397 -0
  593. package/packages/sovran/src/bridge.ts +48 -0
  594. package/packages/sovran/src/index.tsx +52 -0
  595. package/packages/sovran/src/persistor/async-storage-persistor.ts +63 -0
  596. package/packages/sovran/src/persistor/index.ts +2 -0
  597. package/packages/sovran/src/persistor/persistor.ts +31 -0
  598. package/packages/sovran/src/store.ts +232 -0
  599. package/packages/sovran/tsconfig.json +9 -0
  600. package/release.config.js +13 -0
  601. package/tsconfig.json +44 -0
  602. package/tsconfig.linter.json +36 -0
@@ -0,0 +1,142 @@
1
+ # How to add a new example app
2
+
3
+ ## Create the Example app with the RN CLI
4
+
5
+ `npx react-native init ExampleAppName`
6
+
7
+ If you bump into this issue: [Couldn't find template.config.js file inside "react-native" template. Please make sure the template is valid · Issue #1637 · react-native-community/cli · GitHub](https://github.com/react-native-community/cli/issues/1637)
8
+
9
+ Then use
10
+ `yarn dlx react-native init AnalyticsReactNativeE2E --npm`
11
+
12
+ or just add `--npm` to the `npx` command above
13
+
14
+ ## Link Workspace Packages
15
+
16
+ > Note: This is only required if you want to link the packages from the workspace for e2e testing or active development with hot reloading.
17
+ >
18
+ > If you're only using the app as an example or for on-demand testing strongly consider using symlinked packages through [npm-link](https://docs.npmjs.com/cli/v6/commands/npm-link)
19
+ >
20
+ > If the app is meant to be a long term kitchen sink for active development do link packages for easier setup.
21
+
22
+ We have a helper to grab all the data to link the packages to metro, native modules and babel if required. This saves you from having to do all the manual module resolution in 3 different files.
23
+
24
+ That said you still have to setup some files to make it work.
25
+
26
+ First create a file (e.g. `workspace.js`, but naming doesn't matter) to initialize the helper. The `getLinkedData` function receives an array of relative paths (from the `packages` directory) to link. e.g. `core`, `sovran` or for specific plugins `plugins/plugin-idfa`.
27
+
28
+ *NOTE: These are NOT the module names. Nor only the directory name, but the relative path. Be careful with nested packages*
29
+
30
+ ```js
31
+ const { getLinkedData } = require('../linkHelper')
32
+
33
+ module.exports = {
34
+ ...getLinkedData(['core', 'sovran'])
35
+ }
36
+ ```
37
+
38
+ We will export the returned values to use in our 3 main files:
39
+
40
+ `react-native.config.js` -> Where native modules configuration gets defined. *This file might not exist in your new RN App by default*
41
+
42
+ ```js
43
+ const { rootMap } = require('./workspace') // Load the linked data
44
+
45
+ module.exports = {
46
+ dependencies: {
47
+ // Local packages need to be referenced here to be linked to the app
48
+ // This is not required in a standalone production app
49
+ ...rootMap
50
+ },
51
+ };
52
+
53
+ ```
54
+
55
+ `metro.config.js` -> Where the bundle server is configured, we use this to prevent duplicate peer dependency loading
56
+
57
+ ```js
58
+ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
59
+ const path = require('path');
60
+ const escape = require('escape-string-regexp');
61
+ const exclusionList = require('metro-config/src/defaults/exclusionList');
62
+ //
63
+ // ADDED PART: Load the peer dependency data
64
+ const { peerDeps } = require('./workspace')
65
+ const modules = [...peerDeps];
66
+ // ENDS
67
+ //
68
+ const root = path.resolve(__dirname, '..', '..');
69
+
70
+ const defaultSourceExts =
71
+ require('metro-config/src/defaults/defaults').sourceExts;
72
+
73
+ const config = {
74
+ projectRoot: __dirname,
75
+ watchFolders: [root],
76
+
77
+ resolver: {
78
+ unstable_enableSymlinks: true,
79
+ //
80
+ // ADDED PART: Modify the resolver config to blacklist and manually load the peer dependencies
81
+ //
82
+ // We need to make sure that only one version is loaded for peerDependencies
83
+ // So we block them at the root, and alias them to the versions in example's node_modules
84
+ blacklistRE: exclusionList(
85
+ modules.map(
86
+ (m) =>
87
+ new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
88
+ )
89
+ ),
90
+
91
+ extraNodeModules: modules.reduce((acc, name) => {
92
+ acc[name] = path.join(__dirname, 'node_modules', name);
93
+ return acc;
94
+ }, {}),
95
+ // ENDS
96
+ //
97
+
98
+ sourceExts: defaultSourceExts,
99
+ },
100
+
101
+ transformer: {
102
+ getTransformOptions: async () => ({
103
+ transform: {
104
+ experimentalImportSupport: false,
105
+ inlineRequires: true,
106
+ },
107
+ }),
108
+ },
109
+ };
110
+
111
+ module.exports = mergeConfig(getDefaultConfig(__dirname), config);
112
+ ```
113
+
114
+ `babel.config.js` -> This is only required for Jest tests. If you are not doing E2E Detox or Unit testing you can skip this.
115
+
116
+ You will also need to install the `babel-plugin-module-resolver` dependency if it isn't there yet.
117
+
118
+ ```js
119
+ //
120
+ // ADDED
121
+ const { srcMap } = require('./workspace')
122
+ // END
123
+ //
124
+
125
+ module.exports = {
126
+ presets: ['module:metro-react-native-babel-preset'],
127
+ //
128
+ // ADDED
129
+ plugins: [
130
+ [
131
+ 'module-resolver',
132
+ {
133
+ extensions: ['.tsx', '.ts', '.js', '.json'],
134
+ alias: srcMap,
135
+ },
136
+ ],
137
+ ],
138
+ // END
139
+ //
140
+ };
141
+
142
+ ```
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Helper module for retrieving linked data for packages.
3
+ * @module linkHelper
4
+ */
5
+ const path = require('path');
6
+ const basePath = path.join(__dirname, '..', 'packages');
7
+
8
+
9
+ module.exports = {
10
+ /**
11
+ * Retrieves linked data for the specified packages.
12
+ *
13
+ * @param {string[]} packagesToLink - An array of relative paths to the packages directory to link.
14
+ * @returns {Object} - An object containing the linked data.
15
+ * @property {Object} srcMap - A map of package names to their corresponding source paths.
16
+ * @property {Object} rootMap - A map of package names to their corresponding root paths.
17
+ * @property {Set} peerDeps - A set of unique peer dependencies names.
18
+ *
19
+ * @example
20
+ * const packagesToLink = ['core', 'sovran', 'plugins/plugin-idfa'];
21
+ * const linkedData = getLinkedData(packagesToLink);
22
+ */
23
+ getLinkedData(packagesToLink) {
24
+ let srcMap = {}
25
+ let rootMap = {}
26
+ let peerDeps = new Set()
27
+
28
+ for (let relativePath of packagesToLink) {
29
+ const absPath = path.join(basePath, relativePath);
30
+ const packageJsonPath = path.join(absPath, 'package.json');
31
+
32
+ const package = require(packageJsonPath);
33
+
34
+ srcMap[package.name] = path.join(absPath, package.source);
35
+ rootMap[package.name] = {
36
+ root: absPath,
37
+ }
38
+ Object.keys(package.peerDependencies).forEach((dep) => {
39
+ peerDeps.add(dep)
40
+ });
41
+ }
42
+
43
+ return { srcMap, rootMap, peerDeps }
44
+ }
45
+ }
package/jest.config.js ADDED
@@ -0,0 +1,7 @@
1
+ const baseConfig = require('@segment/analytics-rn-shared/jest.config.base');
2
+
3
+ module.exports = {
4
+ ...baseConfig,
5
+ roots: ["<rootDir>"],
6
+
7
+ };
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ tagFormat: "${name}-v${version}",
3
+ deps: {
4
+ bump: 'satisfy', // Do not trigger a release for every package if the only change is a minor/patch upgrade of dependencies
5
+ prefix: '^' // by default all semvers will get set to ^major version
6
+ }
7
+ }
package/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@jmartins-tillster/analytics-react-native",
3
+ "workspaces": [
4
+ "packages/shared",
5
+ "packages/sovran",
6
+ "packages/core",
7
+ "packages/plugins/*"
8
+ ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/jmartins-tillster/analytics-react-native.git",
12
+ "directory": "packages/core"
13
+ },
14
+ "scripts": {
15
+ "bootstrap": "yarn install && yarn example install && yarn example pods && yarn e2e install && yarn e2e pods && husky install",
16
+ "bootstrap:ci": "yarn install && yarn e2e install && yarn e2e pods && husky install",
17
+ "core": "yarn workspace @segment/analytics-react-native",
18
+ "sovran": "yarn workspace @segment/sovran-react-native",
19
+ "example": "yarn --cwd examples/AnalyticsReactNativeExample",
20
+ "e2e": "yarn --cwd examples/E2E",
21
+ "build": "yarn workspaces foreach -A --topological-dev run build",
22
+ "testAll": "yarn workspaces foreach -A -p run test --passWithNoTests",
23
+ "clean": "yarn workspaces foreach -A -p run clean",
24
+ "typescript": "tsc --noEmit --composite false",
25
+ "test": "jest",
26
+ "lint": "eslint .",
27
+ "release": " yarn multi-semantic-release"
28
+ },
29
+ "devDependencies": {
30
+ "@anolilab/multi-semantic-release": "^1.0.3",
31
+ "@babel/core": "^7.23.3",
32
+ "@babel/runtime": "^7.23.2",
33
+ "@changesets/cli": "^2.26.2",
34
+ "@commitlint/config-conventional": "^18.4.2",
35
+ "@react-native-async-storage/async-storage": "^2.0.0",
36
+ "@react-native/eslint-config": "^0.73.2",
37
+ "@segment/analytics-rn-shared": "workspace:^",
38
+ "@semantic-release/changelog": "^6.0.3",
39
+ "@semantic-release/commit-analyzer": "^11.1.0",
40
+ "@semantic-release/git": "^10.0.1",
41
+ "@semantic-release/github": "^9.2.3",
42
+ "@semantic-release/npm": "^11.0.1",
43
+ "@semantic-release/release-notes-generator": "^12.1.0",
44
+ "@types/jest": "^29.5.8",
45
+ "@types/node": "^20.9.1",
46
+ "@types/react": "^18.2.37",
47
+ "@types/react-native": "0.72.6",
48
+ "@types/uuid": "^9.0.7",
49
+ "babel-jest": "^29.7.0",
50
+ "commitlint": "^18.4.2",
51
+ "conventional-changelog-conventionalcommits": "^7.0.2",
52
+ "eslint": "^8.56.0",
53
+ "husky": "^8.0.3",
54
+ "jest": "^29.7.0",
55
+ "metro-react-native-babel-preset": "^0.77.0",
56
+ "prettier": "^2.8.8",
57
+ "react": "18.2.0",
58
+ "react-native": "^0.72.7",
59
+ "react-native-builder-bob": "^0.23.1",
60
+ "rimraf": "^5.0.5",
61
+ "semantic-release": "^22.0.12",
62
+ "semantic-release-yarn": "^3.0.2",
63
+ "ts-jest": "^29.1.1",
64
+ "typescript": "^5.2.2"
65
+ },
66
+ "packageManager": "yarn@4.1.0",
67
+ "version": "2.21.3",
68
+ "description": "This library is one of Segment’s most popular Flagship libraries. It is actively maintained by Segment, benefitting from new feature releases and ongoing support.",
69
+ "main": ".eslintrc.js",
70
+ "directories": {
71
+ "example": "examples"
72
+ },
73
+ "author": "",
74
+ "license": "MIT",
75
+ "bugs": {
76
+ "url": "https://github.com/jmartins-tillster/analytics-react-native/issues"
77
+ },
78
+ "homepage": "https://github.com/jmartins-tillster/analytics-react-native#readme"
79
+ }
@@ -0,0 +1,274 @@
1
+ ### Dependencies
2
+
3
+ * **@segment/sovran-react-native:** upgraded to 1.1.1
4
+
5
+ ### Dependencies
6
+
7
+ * **@segment/sovran-react-native:** upgraded to 1.1.0
8
+
9
+ ## @segment/analytics-react-native [2.18.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.17.0...@segment/analytics-react-native-v2.18.0) (2023-12-15)
10
+
11
+
12
+ ### Features
13
+
14
+ * add support for hasUnmappedDestinations ([#905](https://github.com/segmentio/analytics-react-native/issues/905)) ([545d596](https://github.com/segmentio/analytics-react-native/commit/545d596e2b1fd5f83b229e7d3526ebf59ab62295))
15
+ * consent plugin updates and test cases ([#894](https://github.com/segmentio/analytics-react-native/issues/894)) ([ff1d332](https://github.com/segmentio/analytics-react-native/commit/ff1d33213108199d9486592d8a0372191f17dc2e))
16
+ * RN 0.72 Upgrade ([03f13a1](https://github.com/segmentio/analytics-react-native/commit/03f13a19c79d8aaad726639de5f0327c748fed1f))
17
+
18
+
19
+
20
+ ### Dependencies
21
+
22
+ * **@segment/sovran-react-native:** upgraded to 1.1.0
23
+
24
+ ## [@segment/analytics-react-native-v2.16.1](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.16.0...@segment/analytics-react-native-v2.16.1) (2023-09-14)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * split userInfo/context stamping from raw event data ([#876](https://github.com/segmentio/analytics-react-native/issues/876)) ([c220376](https://github.com/segmentio/analytics-react-native/commit/c220376a393b2d89a3ebb91b572edeb21cdcd5a4))
30
+
31
+ ## [@segment/analytics-react-native-v2.16.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.15.0...@segment/analytics-react-native-v2.16.0) (2023-08-21)
32
+
33
+
34
+ ### Features
35
+
36
+ * add saveDelay option for persistor ([#811](https://github.com/segmentio/analytics-react-native/issues/811)) ([11d5e87](https://github.com/segmentio/analytics-react-native/commit/11d5e87648938220732ea2e2c35d499789413b72))
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * package dependency fixes ([#869](https://github.com/segmentio/analytics-react-native/issues/869)) ([08d415e](https://github.com/segmentio/analytics-react-native/commit/08d415e3b1cfd8499f5f6984f2859a30a851da12))
42
+ * resolve potential build issues with RN 0.72 ([#841](https://github.com/segmentio/analytics-react-native/issues/841)) ([d287304](https://github.com/segmentio/analytics-react-native/commit/d287304383b22b7d0344d0f2c68fccce8aec76cb))
43
+
44
+ ## [@segment/analytics-react-native-v2.15.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.14.0...@segment/analytics-react-native-v2.15.0) (2023-06-02)
45
+
46
+
47
+ ### Features
48
+
49
+ * add config option for cdn proxy ([#834](https://github.com/segmentio/analytics-react-native/issues/834)) ([95562ed](https://github.com/segmentio/analytics-react-native/commit/95562ed7d009b0debe7f7bc19eb3b114d9e77763))
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * fix flush policies reference copy, add BackgroundPolicy ([#838](https://github.com/segmentio/analytics-react-native/issues/838)) ([e4b558a](https://github.com/segmentio/analytics-react-native/commit/e4b558a95e250b1b21d677e08ffeb02a4015bda6))
55
+ * queue storage fixes ([#836](https://github.com/segmentio/analytics-react-native/issues/836)) ([f5a6a86](https://github.com/segmentio/analytics-react-native/commit/f5a6a86817c72ae16caa760d168c01d8eff6d0fb))
56
+ * removes Inject plugins ([#837](https://github.com/segmentio/analytics-react-native/issues/837)) ([ce56c9e](https://github.com/segmentio/analytics-react-native/commit/ce56c9eceb6f880759de0e33f275fe7eab769d71))
57
+ * update braze example and readme ([#830](https://github.com/segmentio/analytics-react-native/issues/830)) ([b6a319a](https://github.com/segmentio/analytics-react-native/commit/b6a319aab9e3fe70dc125a99132ccb77abe4c391))
58
+
59
+ ## [@segment/analytics-react-native-v2.14.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.13.5...@segment/analytics-react-native-v2.14.0) (2023-05-04)
60
+
61
+
62
+ ### Features
63
+
64
+ * add native anonymousId functionality ([#822](https://github.com/segmentio/analytics-react-native/issues/822)) ([c34d34f](https://github.com/segmentio/analytics-react-native/commit/c34d34fea8158453e3a43699b821bc49e3bd7816))
65
+
66
+ ## [@segment/analytics-react-native-v2.13.5](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.13.4...@segment/analytics-react-native-v2.13.5) (2023-04-18)
67
+
68
+
69
+ ### Bug Fixes
70
+
71
+ * bump kotlin version in advertisingId plugin ([#799](https://github.com/segmentio/analytics-react-native/issues/799)) ([12241e9](https://github.com/segmentio/analytics-react-native/commit/12241e9bcbdd86a73bb9ca589c8e6e88f49a48c4))
72
+ * stricter linting, improved handling of plugin errrors ([#795](https://github.com/segmentio/analytics-react-native/issues/795)) ([1ddb4d5](https://github.com/segmentio/analytics-react-native/commit/1ddb4d571df794bc7eaa5c5302ed27b90faf9a73)), closes [#799](https://github.com/segmentio/analytics-react-native/issues/799) [#803](https://github.com/segmentio/analytics-react-native/issues/803) [#802](https://github.com/segmentio/analytics-react-native/issues/802)
73
+ * update braze logPurchase functionality ([#812](https://github.com/segmentio/analytics-react-native/issues/812)) ([09f1222](https://github.com/segmentio/analytics-react-native/commit/09f12223c110e6121a3b8cec765158a791773827))
74
+
75
+ ## [@segment/analytics-react-native-v2.13.4](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.13.3...@segment/analytics-react-native-v2.13.4) (2023-03-15)
76
+
77
+
78
+ ### Bug Fixes
79
+
80
+ * adding asyncstorage as devDependency for tests ([51b7f1f](https://github.com/segmentio/analytics-react-native/commit/51b7f1f281025ca4474790bfdd57755613fbe0a8))
81
+
82
+ ## [@segment/analytics-react-native-v2.13.3](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.13.2...@segment/analytics-react-native-v2.13.3) (2023-03-15)
83
+
84
+
85
+ ### Bug Fixes
86
+
87
+ * bump sovran dependency version ([34e143c](https://github.com/segmentio/analytics-react-native/commit/34e143cb1c0bcc65e6ac1b8addf09a98d0d6ff88))
88
+
89
+ ## [@segment/analytics-react-native-v2.13.2](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.13.1...@segment/analytics-react-native-v2.13.2) (2023-03-14)
90
+
91
+
92
+ ### Bug Fixes
93
+
94
+ * async-storage as optional peer dependency ([#779](https://github.com/segmentio/analytics-react-native/issues/779)) ([f3d5bc0](https://github.com/segmentio/analytics-react-native/commit/f3d5bc024fe3ae988386aac8b9f6f3fc6d84677a))
95
+ * switching UUID library, new depedencies ([#772](https://github.com/segmentio/analytics-react-native/issues/772)) ([4734389](https://github.com/segmentio/analytics-react-native/commit/4734389dd6c9debd08f6be0b59d3192428586ed9))
96
+
97
+ ## [@segment/analytics-react-native-v2.13.1](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.13.0...@segment/analytics-react-native-v2.13.1) (2023-02-28)
98
+
99
+
100
+ ### Bug Fixes
101
+
102
+ * refactor initialization sequence to guarantee readiness before event upload ([#765](https://github.com/segmentio/analytics-react-native/issues/765)) ([af21c24](https://github.com/segmentio/analytics-react-native/commit/af21c24cf2830e7c10acad0d537431e6fb50b760))
103
+
104
+ ## [@segment/analytics-react-native-v2.13.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.12.0...@segment/analytics-react-native-v2.13.0) (2023-02-10)
105
+
106
+
107
+ ### Features
108
+
109
+ * add clevertap plugin ([#759](https://github.com/segmentio/analytics-react-native/issues/759)) ([fcf3933](https://github.com/segmentio/analytics-react-native/commit/fcf393321145995ab9a2c46b15ee05cf4e066dfd))
110
+
111
+ ## [@segment/analytics-react-native-v2.12.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.11.0...@segment/analytics-react-native-v2.12.0) (2023-02-02)
112
+
113
+
114
+ ### Features
115
+
116
+ * add unified DL support to appsflyer ([#756](https://github.com/segmentio/analytics-react-native/issues/756)) ([8d9e110](https://github.com/segmentio/analytics-react-native/commit/8d9e110da4d0ae79efb423fcf9773d56600a54a0))
117
+
118
+ ## [@segment/analytics-react-native-v2.11.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.10.1...@segment/analytics-react-native-v2.11.0) (2023-02-02)
119
+
120
+
121
+ ### Features
122
+
123
+ * add end method to flush policies for cleanup ([#753](https://github.com/segmentio/analytics-react-native/issues/753)) ([96b0893](https://github.com/segmentio/analytics-react-native/commit/96b08934a4358788397b67d2c786177ae442db92))
124
+
125
+
126
+ ### Bug Fixes
127
+
128
+ * prevent locking before setting new user data ([#751](https://github.com/segmentio/analytics-react-native/issues/751)) ([d8439e3](https://github.com/segmentio/analytics-react-native/commit/d8439e3671003b1bafa998675dc0ba841d627fd3))
129
+ * refactor allSettled to remove dependencies ([#746](https://github.com/segmentio/analytics-react-native/issues/746)) ([479e468](https://github.com/segmentio/analytics-react-native/commit/479e4686a410ad9ebb02ed50a15509a9051ec073))
130
+ * remove non-required parameters from native calls ([#750](https://github.com/segmentio/analytics-react-native/issues/750)) ([6ebd65e](https://github.com/segmentio/analytics-react-native/commit/6ebd65ed5e669d4f89643999ded1b5fa65a414fc))
131
+
132
+ ## [@segment/analytics-react-native-v2.10.1](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.10.0...@segment/analytics-react-native-v2.10.1) (2023-01-09)
133
+
134
+
135
+ ### Bug Fixes
136
+
137
+ * add instanceId, remove writekey from header ([#729](https://github.com/segmentio/analytics-react-native/issues/729)) ([28bbb9e](https://github.com/segmentio/analytics-react-native/commit/28bbb9eaa6bb012fd0ebfec065fd901e7301a46c))
138
+ * always await for segment settings before upload, apiHost tests ([#739](https://github.com/segmentio/analytics-react-native/issues/739)) ([579c957](https://github.com/segmentio/analytics-react-native/commit/579c95773418a77342d4996f73af3e0e3254593f))
139
+
140
+ ## [@segment/analytics-react-native-v2.10.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.9.1...@segment/analytics-react-native-v2.10.0) (2022-11-30)
141
+
142
+
143
+ ### Features
144
+
145
+ * add Flush Policies ([#703](https://github.com/segmentio/analytics-react-native/issues/703)) ([004b596](https://github.com/segmentio/analytics-react-native/commit/004b59659453b8d610b32e5e202033e190abbaee))
146
+ * added errorHandler option to client ([#713](https://github.com/segmentio/analytics-react-native/issues/713)) ([b95788b](https://github.com/segmentio/analytics-react-native/commit/b95788ba8ecb547ffc9f43ba94f628c25f3660d1))
147
+
148
+
149
+ ### Bug Fixes
150
+
151
+ * add segmentDestination plugin to exports ([#712](https://github.com/segmentio/analytics-react-native/issues/712)) ([d47ceb1](https://github.com/segmentio/analytics-react-native/commit/d47ceb1ea1934fa68e5f8c939c51345dee88fdcb))
152
+ * Firebase custom screen properties ([#707](https://github.com/segmentio/analytics-react-native/issues/707)) ([18b75af](https://github.com/segmentio/analytics-react-native/commit/18b75af1bb38246d75ccbfba06d6d972c6db0339))
153
+ * replace native modules with react-native-uuid ([#718](https://github.com/segmentio/analytics-react-native/issues/718)) ([db38836](https://github.com/segmentio/analytics-react-native/commit/db38836befcbddee01abd9ee7381c45e04f83dba))
154
+
155
+ ## [@segment/analytics-react-native-v2.9.1](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.9.0...@segment/analytics-react-native-v2.9.1) (2022-11-01)
156
+
157
+
158
+ ### Bug Fixes
159
+
160
+ * memoize useAnalytics ([#693](https://github.com/segmentio/analytics-react-native/issues/693)) ([e4b27b4](https://github.com/segmentio/analytics-react-native/commit/e4b27b4a1bff8bd0c4e542a8fdfbffb84b9c746b))
161
+ * remove special anonymousID behaviour on dev mode ([#700](https://github.com/segmentio/analytics-react-native/issues/700)) ([c3e41ea](https://github.com/segmentio/analytics-react-native/commit/c3e41ead9de261bd3232305444eccd824294acc7))
162
+ * upgrade sovran to v0.4.5, adds shortcircuit for ExpoGo Testing ([#697](https://github.com/segmentio/analytics-react-native/issues/697)) ([c348023](https://github.com/segmentio/analytics-react-native/commit/c348023ded65d7f08d86a7925c0b49770cf759a5))
163
+
164
+ ## [@segment/analytics-react-native-v2.9.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.8.0...@segment/analytics-react-native-v2.9.0) (2022-10-07)
165
+
166
+
167
+ ### Features
168
+
169
+ * destination filter support for device mode plugins ([#685](https://github.com/segmentio/analytics-react-native/issues/685)) ([3cfa8b9](https://github.com/segmentio/analytics-react-native/commit/3cfa8b953eb1ae66f519b16fc4ed43a527586832))
170
+ * short-circuit and throw warnings when missing native modules ([#680](https://github.com/segmentio/analytics-react-native/issues/680)) ([bed01c1](https://github.com/segmentio/analytics-react-native/commit/bed01c10c0e452c9f24f76831f7e932837ff50bd))
171
+
172
+
173
+ ### Bug Fixes
174
+
175
+ * default integrations settings are set properly when unable to fetch ([#684](https://github.com/segmentio/analytics-react-native/issues/684)) ([0627deb](https://github.com/segmentio/analytics-react-native/commit/0627deb66ae16d44dc97eeb51853c8abd98cceec))
176
+
177
+ ## [@segment/analytics-react-native-v2.8.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.7.2...@segment/analytics-react-native-v2.8.0) (2022-09-13)
178
+
179
+
180
+ ### Features
181
+
182
+ * adds option to provide a custom logger object to consume library logs ([#670](https://github.com/segmentio/analytics-react-native/issues/670)) ([d40a315](https://github.com/segmentio/analytics-react-native/commit/d40a315e380cf2ce7a1f7805b85893b6370fbe6f))
183
+
184
+
185
+ ### Bug Fixes
186
+
187
+ * update kotlin version in adId plugin to resolve build errors ([#668](https://github.com/segmentio/analytics-react-native/issues/668)) ([3f51c58](https://github.com/segmentio/analytics-react-native/commit/3f51c58540d893350028f2a118f19c30bc543af7))
188
+
189
+ ## [@segment/analytics-react-native-v2.7.2](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.7.1...@segment/analytics-react-native-v2.7.2) (2022-09-07)
190
+
191
+
192
+ ### Bug Fixes
193
+
194
+ * apply userInfo on processing to prevent concurrency issues ([#660](https://github.com/segmentio/analytics-react-native/issues/660)) ([4f60a84](https://github.com/segmentio/analytics-react-native/commit/4f60a84918e8f9a0bb3e8e5fbdb2412f23048f94))
195
+
196
+ ## [@segment/analytics-react-native-v2.7.1](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.7.0...@segment/analytics-react-native-v2.7.1) (2022-08-24)
197
+
198
+
199
+ ### Bug Fixes
200
+
201
+ * bump kotlin version ([#652](https://github.com/segmentio/analytics-react-native/issues/652)) ([3746738](https://github.com/segmentio/analytics-react-native/commit/37467383935b5293a89f20398c4dfd8f08ebf610))
202
+ * do not attempt to cast null as ReactApplication ([#651](https://github.com/segmentio/analytics-react-native/issues/651)) ([7697587](https://github.com/segmentio/analytics-react-native/commit/7697587186ef4a7e7fe242c557d14a8249275b42))
203
+
204
+ ## [@segment/analytics-react-native-v2.7.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.6.0...@segment/analytics-react-native-v2.7.0) (2022-08-10)
205
+
206
+
207
+ ### Features
208
+
209
+ * prepare advertising-id for release ([#640](https://github.com/segmentio/analytics-react-native/issues/640)) ([0f2b5aa](https://github.com/segmentio/analytics-react-native/commit/0f2b5aaf77829e32399d91b3aab38081699beecf))
210
+
211
+ ## [@segment/analytics-react-native-v2.6.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.5.1...@segment/analytics-react-native-v2.6.0) (2022-08-10)
212
+
213
+
214
+ ### Features
215
+
216
+ * prepare for release ([#627](https://github.com/segmentio/analytics-react-native/issues/627)) ([68d69ae](https://github.com/segmentio/analytics-react-native/commit/68d69aec143777b3444f256b4cb16f6913440dca))
217
+
218
+
219
+ ### Bug Fixes
220
+
221
+ * fix device.id logic to prevent random ids ([#637](https://github.com/segmentio/analytics-react-native/issues/637)) ([d8f1d39](https://github.com/segmentio/analytics-react-native/commit/d8f1d39fe169d3d6dcfe9ff8b9b8c90f69ffe281))
222
+
223
+ ## [@segment/analytics-react-native-v2.5.1](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.5.0...@segment/analytics-react-native-v2.5.1) (2022-07-28)
224
+
225
+
226
+ ### Bug Fixes
227
+
228
+ * replace allSettled shim, fix imports from plugins ([#620](https://github.com/segmentio/analytics-react-native/issues/620)) ([18f8ecd](https://github.com/segmentio/analytics-react-native/commit/18f8ecdb291d8c5ecb02e087aa0043df4fc72e97))
229
+
230
+ ## [@segment/analytics-react-native-v2.5.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.4.0...@segment/analytics-react-native-v2.5.0) (2022-07-27)
231
+
232
+
233
+ ### Features
234
+
235
+ * update react native in example to 0.69.2 ([#613](https://github.com/segmentio/analytics-react-native/issues/613)) ([d9e7967](https://github.com/segmentio/analytics-react-native/commit/d9e79672fcd1ec49603bc87e0fdf1efbd2504d68))
236
+
237
+
238
+ ### Bug Fixes
239
+
240
+ * race condition when using state changing events ([#611](https://github.com/segmentio/analytics-react-native/issues/611)) ([40ede04](https://github.com/segmentio/analytics-react-native/commit/40ede04ce465eef03816185e5a1d3a58f1d8b8a9))
241
+
242
+ ## [@segment/analytics-react-native-v2.4.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.3.2...@segment/analytics-react-native-v2.4.0) (2022-07-15)
243
+
244
+
245
+ ### Features
246
+
247
+ * spin off the queue handling into a reusable plugin ([#502](https://github.com/segmentio/analytics-react-native/issues/502)) ([55d7988](https://github.com/segmentio/analytics-react-native/commit/55d798821163d5a41902a6bc099b1bfcbd853a17))
248
+ * support max kB in upload batching ([#600](https://github.com/segmentio/analytics-react-native/issues/600)) ([3dc1957](https://github.com/segmentio/analytics-react-native/commit/3dc1957607451591efe43c27ac65786d5dfdc7b1))
249
+
250
+
251
+ ### Bug Fixes
252
+
253
+ * add export for SegmentClient ([#606](https://github.com/segmentio/analytics-react-native/issues/606)) ([ff094f5](https://github.com/segmentio/analytics-react-native/commit/ff094f56237f426381effdca7604cb61ceeaf6d6))
254
+ * timeline safe processing events for destinations ([#604](https://github.com/segmentio/analytics-react-native/issues/604)) ([78dcd0e](https://github.com/segmentio/analytics-react-native/commit/78dcd0e67ad1ba84cc92b2fb8cc6163fe6bef16d))
255
+ * use storePersistor option in QueueFlushingPlugin ([#602](https://github.com/segmentio/analytics-react-native/issues/602)) ([f7be269](https://github.com/segmentio/analytics-react-native/commit/f7be269e01699f035772b1caba2c4aeae3939ae8))
256
+
257
+ ## [@segment/analytics-react-native-v2.3.2](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.3.1...@segment/analytics-react-native-v2.3.2) (2022-06-30)
258
+
259
+
260
+ ### Features
261
+
262
+ * Add AdvertisingId Plugin ([#574](https://github.com/segmentio/analytics-react-native/issues/574)) ([9f47e67](https://github.com/segmentio/analytics-react-native/commit/9f47e67906c658519e13c022a19c3f4640622ad6))
263
+
264
+
265
+ ### Bug Fixes
266
+
267
+ * revert traits behavior ([#588](https://github.com/segmentio/analytics-react-native/issues/588)) ([516aacd](https://github.com/segmentio/analytics-react-native/commit/516aacdd8ddc03367ae53a8ba01be689a450ffc9))
268
+
269
+ ## [@segment/analytics-react-native-v2.3.1](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.3.0...@segment/analytics-react-native-v2.3.1) (2022-06-24)
270
+
271
+
272
+ ### Bug Fixes
273
+
274
+ * persist user traits across events ([#581](https://github.com/segmentio/analytics-react-native/issues/581)) ([d48ac83](https://github.com/segmentio/analytics-react-native/commit/d48ac834000a4a81524b30ec1e386f337d55adf2))
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Segment
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ # @segment/analytics-react-native
2
+
3
+ The core analytics package. Find the installation and usage instructions in the [top level README](../../README.md).