chore: Add Vue SDK getting-started example - #1851
Conversation
45d8fbb to
28df231
Compare
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
28df231 to
de0ce06
Compare
de0ce06 to
f8a1b4e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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" |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit f8a1b4e. Configure here.
| "dependencies": { | ||
| "@launchdarkly/vue-client-sdk": "workspace:^", | ||
| "vue": "^3.2.36" | ||
| }, |
There was a problem hiding this comment.
🟡 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
kinyoklion
left a comment
There was a problem hiding this comment.
The Devin/Bugbot comments are accurate and should be fixed.


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-startedthat wirescreateLDProvider,useBoolVariation, anduseInitializationStatusto 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 inpackages/sdk/vue/examples/README.md.CI (
vue.yml): builds the example in the shared job and adds arun-examplejob (Playwright +./actions/run-examplewith 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.