Skip to content

Commit 65a5e6a

Browse files
fix: ldclient dependencies (#407)
## Summary Update Native Session Replay dependencies <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes the session replay package’s public TypeScript integration types and dependency surface, which can break downstream builds if consumers relied on `react-native-client-sdk` types. Runtime behavior is largely unchanged, but the updated native pod version could introduce platform-specific regressions. > > **Overview** > Updates the session replay React Native package to use plugin type definitions (`LDPlugin`, `LDClientMin`) from `@launchdarkly/observability-react-native` instead of `@launchdarkly/react-native-client-sdk`, including adjusting the plugin adapter `register` signature accordingly. > > Exports `LDPlugin` and `LDClientMin` from `observability-react-native`’s public `index.ts`, and bumps the iOS example’s `SessionReplayReactNative` CocoaPod from `0.1.0` to `0.2.1` (lockfile hash update). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3d6d84b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent d9e2fae commit 65a5e6a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

sdk/@launchdarkly/observability-react-native/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ import { ReactNativeOptions } from './api/Options'
4747
export { LDObserve } from './sdk/LDObserve'
4848
export type { Observe } from './api/Observe'
4949
export { Observability } from './plugin/observability'
50+
export type { LDPlugin, LDClientMin } from './plugin/plugin'
5051
export * from './api/index'

sdk/@launchdarkly/react-native-ld-session-replay/example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ PODS:
24492449
- React-perflogger (= 0.83.0)
24502450
- React-utils (= 0.83.0)
24512451
- SocketRocket
2452-
- SessionReplayReactNative (0.1.0):
2452+
- SessionReplayReactNative (0.2.1):
24532453
- boost
24542454
- DoubleConversion
24552455
- fast_float
@@ -2802,7 +2802,7 @@ SPEC CHECKSUMS:
28022802
ReactAppDependencyProvider: ebcf3a78dc1bcdf054c9e8d309244bade6b31568
28032803
ReactCodegen: 11c08ff43a62009d48c71de000352e4515918801
28042804
ReactCommon: 424cc34cf5055d69a3dcf02f3436481afb8b0f6f
2805-
SessionReplayReactNative: 8f3745007cd1336b7728ee577ac3230f1bb4582a
2805+
SessionReplayReactNative: 2abade3c8879121f8316d64bc41d6d29ac3d7d6d
28062806
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
28072807
Yoga: 6ca93c8c13f56baeec55eb608577619b17a4d64e
28082808

sdk/@launchdarkly/react-native-ld-session-replay/src/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import SessionReplayReactNative from './NativeSessionReplayReactNative';
22
import type { SessionReplayOptions } from './NativeSessionReplayReactNative';
3-
import type { LDPlugin } from '@launchdarkly/react-native-client-sdk';
3+
import type {
4+
LDPlugin,
5+
LDClientMin,
6+
} from '@launchdarkly/observability-react-native';
47
import type {
58
LDPluginEnvironmentMetadata,
69
LDPluginMetadata,
710
} from '@launchdarkly/js-sdk-common';
8-
import type { LDClient } from '@launchdarkly/react-native-client-sdk';
911

1012
const MOBILE_KEY_REQUIRED_MESSAGE =
1113
'Session replay requires a non-empty mobile key. Provide metadata.sdkKey or metadata.mobileKey when initializing the LaunchDarkly client.';
@@ -42,7 +44,7 @@ class SessionReplayPluginAdapter implements LDPlugin {
4244
};
4345
}
4446

45-
register(_client: LDClient, metadata: LDPluginEnvironmentMetadata): void {
47+
register(_client: LDClientMin, metadata: LDPluginEnvironmentMetadata): void {
4648
const sdkKey = metadata.sdkKey || metadata.mobileKey || '';
4749
const key = typeof sdkKey === 'string' ? sdkKey.trim() : '';
4850
if (!key) {

0 commit comments

Comments
 (0)