Skip to content

chore: Add Vue SDK getting-started example - #1851

Open
joker23 wants to merge 1 commit into
skz/SDK-2902/migrate-vue-sdk-prerelease-wiringfrom
skz/SDK-2903/migrate-vue-sdk-getting-started-example
Open

chore: Add Vue SDK getting-started example#1851
joker23 wants to merge 1 commit into
skz/SDK-2902/migrate-vue-sdk-prerelease-wiringfrom
skz/SDK-2903/migrate-vue-sdk-getting-started-example

Conversation

@joker23

@joker23 joker23 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This PR will add a getting started example for vue client sdk


Note

Overview
Adds a minimal Vite + Vue 3 getting-started sample under packages/sdk/vue/examples/getting-started that wires createLDProvider, useBoolVariation, and useInitializationStatus to show init status and a boolean flag with a reactive background color.

Monorepo / tooling: registers the example workspace in root package.json, ignores **/vue/examples/** in ESLint, and documents the example in packages/sdk/vue/examples/README.md.

CI (vue.yml): builds the example in the shared job and adds a run-example job (Playwright + ./actions/run-example with AWS role) that installs Chromium and runs the example’s e2e check expecting the flag to evaluate to true.

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

@joker23
joker23 force-pushed the skz/SDK-2903/migrate-vue-sdk-getting-started-example branch from 45d8fbb to 28df231 Compare August 12, 2026 21:10
@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: 26360 bytes
Compressed size limit: 29000
Uncompressed size: 129188 bytes

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

@joker23
joker23 force-pushed the skz/SDK-2903/migrate-vue-sdk-getting-started-example branch from 28df231 to de0ce06 Compare August 12, 2026 21:11
@joker23
joker23 force-pushed the skz/SDK-2903/migrate-vue-sdk-getting-started-example branch from de0ce06 to f8a1b4e Compare August 13, 2026 15:18
@joker23
joker23 marked this pull request as ready for review August 13, 2026 19:24
@joker23
joker23 requested a review from a team as a code owner August 13, 2026 19:24

@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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f8a1b4e. Configure here.

},
"dependencies": {
"@launchdarkly/vue-client-sdk": "workspace:^",
"vue": "^3.2.36"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing release-please example entry

Medium Severity

This new example adds an @launchdarkly/vue-client-sdk dependency, but release-please-config.json was not updated with a matching extra-files entry under packages/sdk/vue. Without that, example dependency versions will not auto-bump when the Vue SDK is released.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8a1b4e. Configure here.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +13 to +16
"dependencies": {
"@launchdarkly/vue-client-sdk": "workspace:^",
"vue": "^3.2.36"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Copying the new Vue starter app outside the repository makes dependency installation fail

The example points at the Vue SDK using an internal-only reference ("@launchdarkly/vue-client-sdk": "workspace:^" at packages/sdk/vue/examples/getting-started/package.json:14) instead of a real released version, so anyone who copies this starter app into their own project cannot install it.
Impact: Users following the getting-started guide outside this repository hit an installation error instead of a working app.

Deviation from the established example convention and release automation

Every other example app in the repo pins a published version of its SDK, e.g. packages/sdk/react/examples/hello-react/package.json uses "@launchdarkly/react-sdk": "4.1.12" and packages/sdk/browser/example/package.json uses "@launchdarkly/js-client-sdk": "4.9.4". Those pins are kept current automatically by release-please via extra-files entries (see the react entry at release-please-config.json:372-410, and the openfeature example entry at release-please-config.json:417-420).

The workspace: protocol is a Yarn-workspace-only resolution scheme; running yarn/npm install on a copy of this directory outside the monorepo fails because workspace:^ cannot be resolved from a registry. The Vue release-please entry (release-please-config.json:423-430) also has no extra-files entry for the new example, so switching to a pinned version would additionally require adding one so the pin stays up to date.

Prompt for agents
The new Vue getting-started example declares its SDK dependency as "@launchdarkly/vue-client-sdk": "workspace:^" in packages/sdk/vue/examples/getting-started/package.json. Every other example in this monorepo (packages/sdk/react/examples/*, packages/sdk/browser/example, packages/sdk/openfeature-node-server/examples/getting-started) instead pins the currently published SDK version, and release-please keeps those pins current through an `extra-files` json entry in release-please-config.json for the owning SDK package. Because `workspace:` is a Yarn-workspace-only protocol, a user who copies this example out of the repo (the intended usage for a getting-started sample) cannot install dependencies. Consider pinning the published @launchdarkly/vue-client-sdk version (currently 0.1.4 per packages/sdk/vue/package.json) and adding a matching extra-files entry under the "packages/sdk/vue" section of release-please-config.json with jsonpath $.dependencies['@launchdarkly/vue-client-sdk'] so the pin is bumped on each release.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@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.

The Devin/Bugbot comments are accurate and should be fixed.

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