You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR will align our initialization status handling closer to the base browser sdk by:
combining initializing and unknown state which should get rid of one extra state dispatch on initialization
adding additional idempotent guards to the start function. Note that these are redundant protections.
Note
Medium Risk
Changes the public initialization-state contract by removing the unknown state and adjusting when context-change subscribers are notified, which could affect apps gating rendering on the previous state transitions.
Overview Unifies initialization state handling by removing the unknown state and treating clients as initializing until start() resolves (InitializedState and useInitializationStatus updated accordingly).
Refactors LDReactClient.start() semantics to be explicitly idempotent via internal guards and to notify onContextChange subscribers once after the first successful start() completion; identify() reuses the same notification path.
Updates mocks, tests, and migration docs to reflect the new initial status (initializing) and the dropped unknown branch.
Written by Cursor Bugbot for commit 2da69a5. This will update automatically on new commits. Configure here.
@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25566 bytes
Compressed size limit: 26000
Uncompressed size: 125383 bytes
@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 24546 bytes
Compressed size limit: 25000
Uncompressed size: 85156 bytes
@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 22203 bytes
Compressed size limit: 24000
Uncompressed size: 115238 bytes
@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 172365 bytes
Compressed size limit: 200000
Uncompressed size: 802275 bytes
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
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.
This PR will align our initialization status handling closer to the base browser sdk by:
initializingandunknownstate which should get rid of one extra state dispatch on initializationNote
Medium Risk
Changes the public initialization-state contract by removing the
unknownstate and adjusting when context-change subscribers are notified, which could affect apps gating rendering on the previous state transitions.Overview
Unifies initialization state handling by removing the
unknownstate and treating clients asinitializinguntilstart()resolves (InitializedStateanduseInitializationStatusupdated accordingly).Refactors
LDReactClient.start()semantics to be explicitly idempotent via internal guards and to notifyonContextChangesubscribers once after the first successfulstart()completion;identify()reuses the same notification path.Updates mocks, tests, and migration docs to reflect the new initial status (
initializing) and the droppedunknownbranch.Written by Cursor Bugbot for commit 2da69a5. This will update automatically on new commits. Configure here.