Skip to content

chore(vue-sdk): Add LDVueClient hardening, provider, plugin, and base composables#1769

Merged
joker23 merged 3 commits into
mainfrom
skz/sdk-2194/migrate-vue-sdk-client-hardening
Jun 25, 2026
Merged

chore(vue-sdk): Add LDVueClient hardening, provider, plugin, and base composables#1769
joker23 merged 3 commits into
mainfrom
skz/sdk-2194/migrate-vue-sdk-client-hardening

Conversation

@joker23

@joker23 joker23 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Touches core client init and subscription behavior used by all Vue apps; changes are defensive but affect when context/init callbacks fire and how start() rejects are surfaced.

Overview
Adds the Vue integration surface for LaunchDarkly: createLDProvider / createLDProviderWithClient, LDVuePlugin, and composables useLDClient and useInitializationStatus, with reactive context and init state via createReactiveInstance and optional initializing / failed provider slots.

LDVueClient is hardened so start() maps base rejections to a resolved { status: 'failed', error }, notifies context subscribers on complete/timeout (not only complete), and isolates getContext() and subscriber callback throws so one bad listener cannot break init or others. Provider/plugin support auto-start, deferInitialization, bootstrap merge (top-level wins), and custom injection keys for multi-env apps.

Public exports and package docs are updated; variation composables are deferred to a follow-up PR. Broad Jest coverage includes a shared makeMockClient helper.

Reviewed by Cursor Bugbot for commit 82337a3. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38739 bytes
Compressed size limit: 39000
Uncompressed size: 212244 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179579 bytes
Compressed size limit: 200000
Uncompressed size: 831422 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31978 bytes
Compressed size limit: 34000
Uncompressed size: 114243 bytes

@joker23

joker23 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23

joker23 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f64969a. Configure here.

try {
newContext = baseClient.getContext();
} catch (_) {
return;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this case should really never happen, but we can use some extra handling in case the context is malformed.

@joker23 joker23 marked this pull request as ready for review June 24, 2026 20:53
@joker23 joker23 requested a review from a team as a code owner June 24, 2026 20:53
devin-ai-integration[bot]

This comment was marked as resolved.

@kinyoklion kinyoklion left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to move the test files per the Devin review comments.

@joker23 joker23 merged commit 6704bca into main Jun 25, 2026
53 checks passed
@joker23 joker23 deleted the skz/sdk-2194/migrate-vue-sdk-client-hardening branch June 25, 2026 15:17
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