-
Notifications
You must be signed in to change notification settings - Fork 31
refactor!: update identify method to optionally return results #1049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@launchdarkly/browser size report |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
216120d to
1a58ddc
Compare
|
@launchdarkly/js-client-sdk-common size report |
1a58ddc to
7fcd513
Compare
- 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.
7fcd513 to
08661d2
Compare
|
Going to hold this PR off until we are ready to major version RN. |
Requirements
Related issues
sdk-1657
Describe the solution you've provided
identifymethod inLDClientImplto return a promise with the results of the identification operationBrowserClientImplto align with the newidentifymethod signature, ensuring it now calls the updated method and handles results appropriately.Additional context
This change will introduce breaking changes to React Native SDK as the method signature for
identifywill be different. I will hold the PR in draft mode until we are ready to major version RN.Note
LDClientImpl.identifynow conditionally returnsLDIdentifyResultwhenidentifyOptions.returnResultsis true; otherwise preserves previous reject-on-error behavior.BrowserClient.identifyforcesreturnResults = true(and defaultssheddableto true), always returning anLDIdentifyResult;start()now callsidentifyinstead ofidentifyResult.LDClient.identifytype updated toPromise<void | LDIdentifyResult>; factory inBrowserClientdelegates toimpl.identify.returnResultstoLDIdentifyOptionswith documentation on behavior and defaults.Written by Cursor Bugbot for commit 08661d2. This will update automatically on new commits. Configure here.