@posthog/react-native-plugin 2.2.3 → 2.2.4

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.
@@ -96,7 +96,8 @@ class PosthogReactNativePluginModule(
96
96
  // Forward custom headers (e.g. Authorization for a reverse proxy) so the native SDK
97
97
  // attaches them to the requests it sends directly (session replay, crash uploads).
98
98
  val theRequestHeaders =
99
- getMap(sdkOptions, "requestHeaders")?.toHashMap()
99
+ getMap(sdkOptions, "requestHeaders")
100
+ ?.toHashMap()
100
101
  ?.filterValues { it is String }
101
102
  ?.mapValues { it.value as String }
102
103
 
@@ -112,8 +113,10 @@ class PosthogReactNativePluginModule(
112
113
 
113
114
  // Keep the native exception-steps buffer aligned with the JS layer (one logical buffer).
114
115
  // Absent keys fall back to the native defaults the helpers receive.
115
- errorTrackingConfig.exceptionSteps.enabled = getBoolean(exceptionStepsConfig, "enabled", errorTrackingConfig.exceptionSteps.enabled)
116
- errorTrackingConfig.exceptionSteps.maxBytes = getInt(exceptionStepsConfig, "maxBytes", errorTrackingConfig.exceptionSteps.maxBytes)
116
+ errorTrackingConfig.exceptionSteps.enabled =
117
+ getBoolean(exceptionStepsConfig, "enabled", errorTrackingConfig.exceptionSteps.enabled)
118
+ errorTrackingConfig.exceptionSteps.maxBytes =
119
+ getInt(exceptionStepsConfig, "maxBytes", errorTrackingConfig.exceptionSteps.maxBytes)
117
120
 
118
121
  // React Native rethrows fatal JS errors natively as JavascriptException.
119
122
  // The JS layer already captured them, so drop the native duplicate.
@@ -130,7 +133,10 @@ class PosthogReactNativePluginModule(
130
133
  val throttleDelayMs =
131
134
  when {
132
135
  hasKey(sdkReplayConfig, "throttleDelayMs") -> getInt(sdkReplayConfig, "throttleDelayMs", DEFAULT_THROTTLE_DELAY_MS)
133
- hasKey(sdkReplayConfig, "androidDebouncerDelayMs") -> getInt(sdkReplayConfig, "androidDebouncerDelayMs", DEFAULT_THROTTLE_DELAY_MS)
136
+ hasKey(
137
+ sdkReplayConfig,
138
+ "androidDebouncerDelayMs",
139
+ ) -> getInt(sdkReplayConfig, "androidDebouncerDelayMs", DEFAULT_THROTTLE_DELAY_MS)
134
140
  else -> DEFAULT_THROTTLE_DELAY_MS
135
141
  }
136
142
 
@@ -16,9 +16,9 @@ private func hedgeLog(_ message: String) {
16
16
  }
17
17
  #endif
18
18
 
19
- // Deduplication works on Android (both architectures), iOS (old architecture only), and macOS.
20
- // On the iOS new architecture, fatal JS exception events surface as a generic SIGABRT
21
- // crash event with no JS-error text in any field, so they currently cannot be filtered.
19
+ /// Deduplication works on Android (both architectures), iOS (old architecture only), and macOS.
20
+ /// On the iOS new architecture, fatal JS exception events surface as a generic SIGABRT
21
+ /// crash event with no JS-error text in any field, so they currently cannot be filtered.
22
22
  private let fatalJsErrorMarkers = ["Unhandled JS Exception", "ExceptionsManager.reportException", "facebook::jsi::JSError"]
23
23
 
24
24
  private func containsFatalJsErrorMarker(_ text: String?) -> Bool {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/react-native-plugin",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "description": "PostHog React Native plugin for iOS and Android integrations",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -6,7 +6,7 @@ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1
6
6
  # Single source of truth for the posthog-ios native dependency version.
7
7
  # Used by both the SPM and CocoaPods resolution paths below; bump this
8
8
  # line when picking up a new posthog-ios release.
9
- posthog_ios_version = '3.64.7'
9
+ posthog_ios_version = '3.69.0'
10
10
 
11
11
  Pod::Spec.new do |s|
12
12
  s.name = "posthog-react-native-plugin"