chore: aligning vue composables to trigger eval events - #1804
Open
joker23 wants to merge 1 commit into
Open
Conversation
Contributor
|
@launchdarkly/js-sdk-common size report |
Contributor
|
@launchdarkly/browser size report |
Contributor
|
@launchdarkly/js-client-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk size report |
Contributor
Author
|
@cursor review |
joker23
marked this pull request as ready for review
July 14, 2026 22:33
joker23
force-pushed
the
skz/SDK-2675/migrate-vue-sdk-variation-core-context-fix
branch
from
July 23, 2026 17:55
1f6a8b1 to
5856f64
Compare
joker23
force-pushed
the
skz/SDK-2675/migrate-vue-sdk-variation-core-context-fix
branch
from
August 5, 2026 17:57
5856f64 to
b3b744d
Compare
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
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.
Note
Medium Risk
Changes when flag variation runs (init, identify, analytics impressions), including a deliberate double-eval edge case; scope is limited to the Vue SDK composable layer.
Overview
useVariationCoreno longer batches re-evaluation through a Vuewatchon providercontext,initializedState, and aflagChangedcounter. It now wireschange:<key>andclient.onContextChangedirectly to the sameupdatehandler, and onlywatches the flag key to swap listeners.That aligns readiness and
identify()updates with the client’s context notifications (including failedstart()via a single context callback, avoiding a separate init-status path). When oneidentify()updates both context and the watched flag, two evaluations are possible and tests document that as accepted React-parity behavior.Tests and
makeMockClientaddcontextSubscriberCountand expand coverage for subscribe/unsubscribe, init complete/fail, and single- vs dual-trigger eval counts.Reviewed by Cursor Bugbot for commit b3b744d. Bugbot is set up for automated code reviews on this repo. Configure here.