-
Notifications
You must be signed in to change notification settings - Fork 0
refactor!: updating browser sdk to 4.x #459
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
Draft
joker23
wants to merge
4
commits into
main
Choose a base branch
from
skz/sdk-1565/update-browser-sdk
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
433d561 to
5d0f08d
Compare
joker23
commented
Dec 22, 2025
5d0f08d to
8402b84
Compare
joker23
commented
Dec 22, 2025
|
|
||
| // Subscribe to changes with incremental updates | ||
| const handleChange = (changes: Record<string, { current: any }>) => { | ||
| // NOTE: we are overloading this function so that it can handle both the old and new browser SDKs |
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REVIEWER: we'll need to make sure we make super clear what is going on here. Am open to suggestions on what is more standard practice to support different event payloads.
c9348ce to
e6738af
Compare
….11.0 - Replaced instances of 'launchdarkly-js-client-sdk' with '@launchdarkly/js-client-sdk' across various files. - Updated package.json files in demo and toolbar to include the new SDK version. - Adjusted imports in several components to align with the new SDK structure. - Ensured compatibility with existing code by handling type mismatches where necessary.
- Changed import paths in test files to reflect the new SDK structure. - Updated mock implementations to align with the new SDK methods. - Ensured compatibility with existing tests by adjusting mock behavior.
e6738af to
0bd4867
Compare
- Added new compat interfaces so that toolbar could recognize browser v3 and v4 clients. - Changed import paths to use '@launchdarkly/toolbar' and updated related types. > Eventually we should probably provide this compat layer in the browser SDK code itself.
0bd4867 to
df4936a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change will update the LD Browser SDK to major version 4. I am marking it as a breaking change due to having to do a major version bump on a key dependency, but this change has been tested with Browser SDK 3.9.0.
What does this PR do?
Caveats
Type of Change
Screenshots/Videos