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

Additional context

I made this change to make it easier for us to transition the identify method signiture for RN. In the browser 4.x SDK we are hardcoding the identify method to the new implementation. The idea here is to allow developers to easily revert to previous behavior if necessary.


Note

Introduces optional result-returning behavior for identify and aligns the browser client with it.

  • Updates LDClient.identify to return Promise<void | LDIdentifyResult>; LDClientImpl.identify returns identifyResult when identifyOptions.returnResults is true, otherwise preserves existing throw-on-error behavior
  • Adds returnResults to LDIdentifyOptions with documentation
  • Browser: overrides identify to require start() first, default sheddable=true, forces returnResults=true, starts goal tracking; start() now calls identify instead of identifyResult; PIMPL mapping updated to identify

Written by Cursor Bugbot for commit 7fcd513. 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: 171341 bytes
Compressed size limit: 200000
Uncompressed size: 798491 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

- 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 1a58ddc to 7fcd513 Compare January 7, 2026 22:13
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