Skip to content

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Dec 24, 2025

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

sdk-1676

Describe the solution you've provided

  • Added a warning message for when async storage is not found and is being mocked.
  • Added tests to verify behavior with custom and default storage implementations.
    Provide a clear and concise description of what you expect to happen.

Note

Introduces a logger-aware AsyncStorage initialization with a fallback and verifies storage selection behavior.

  • Refactors ConditionalAsyncStorage into getAsyncStorage(logger) that logs a warning and returns a mock when @react-native-async-storage/async-storage is unavailable
  • Updates PlatformStorage to initialize via getAsyncStorage and proxy get/set/clear to the resolved instance
  • Adds ReactNativeLDClient.storage.test.ts to assert use of custom storage, absence of warnings, and default PlatformStorage instantiation and method calls when no custom storage is provided
  • Minor comment/whitespace cleanup in EventSource.ts

Written by Cursor Bugbot for commit 3bc8c25. This will update automatically on new commits. Configure here.

- Added a warning message for when async storage is not found and is being mocked.
- Added tests to verify behavior with custom and default storage implementations.
@joker23 joker23 requested a review from a team as a code owner December 24, 2025 18:58
@github-actions
Copy link
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 169118 bytes
Compressed size limit: 200000
Uncompressed size: 789399 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25394 bytes
Compressed size limit: 26000
Uncompressed size: 124693 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 18527 bytes
Compressed size limit: 20000
Uncompressed size: 95226 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 23135 bytes
Compressed size limit: 25000
Uncompressed size: 80393 bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants