Skip to content

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Jan 3, 2026

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-1657

Describe the solution you've provided

  • Modified the identify method in LDClientImpl to return a promise with the results of the identification operation
  • Updated BrowserClientImpl to align with the new identify method signature, ensuring it now calls the updated method and handles results appropriately.
  • Updated client common unit tests to reflect the changes

Additional context

This change will introduce breaking changes to React Native SDK as the method signature for identify will be different. I will hold the PR in draft mode until we are ready to major version RN.


Note

  • Behavior change: LDClientImpl.identify now conditionally returns LDIdentifyResult when identifyOptions.returnResults is true; otherwise preserves previous reject-on-error behavior.
  • Browser client alignment: BrowserClient.identify forces returnResults = true (and defaults sheddable to true), always returning an LDIdentifyResult; start() now calls identify instead of identifyResult.
  • Public API updates: LDClient.identify type updated to Promise<void | LDIdentifyResult>; factory in BrowserClient delegates to impl.identify.
  • Options/docs: Added returnResults to LDIdentifyOptions with documentation on behavior and defaults.

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

@joker23 joker23 requested a review from a team as a code owner January 3, 2026 00:06
@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

@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

github-actions bot commented Jan 3, 2026

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

@joker23 joker23 force-pushed the skz/sdk-1657/client-side-identify branch from 216120d to 1a58ddc Compare January 3, 2026 00:10
@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

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

@joker23 joker23 force-pushed the skz/sdk-1657/client-side-identify branch from 1a58ddc to 7fcd513 Compare January 7, 2026 22:13
- Modified the `identify` method in `LDClientImpl` to return a promise with the results of the identification operation when `returnResults` is set to true in `identifyOptions`.
- Updated `BrowserClientImpl` to align with the new `identify` method signature, ensuring it now calls the updated method and handles results appropriately.
- Added documentation for the new `returnResults` option in `LDIdentifyOptions` to clarify its usage and behavior.
@joker23 joker23 force-pushed the skz/sdk-1657/client-side-identify branch from 7fcd513 to 08661d2 Compare January 8, 2026 16:47
@joker23 joker23 marked this pull request as draft January 8, 2026 17:19
@joker23
Copy link
Contributor Author

joker23 commented Jan 8, 2026

Going to hold this PR off until we are ready to major version RN.

@joker23 joker23 changed the title refactor: update identify method to optionally return results refactor!: update identify method to optionally return results Jan 8, 2026
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