chore: adding scaffolding for OF node server provider#1356
Conversation
|
@cursor review |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk-common size report |
aca1b27 to
a1477d5
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ 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 a1477d5. Configure here.
a1477d5 to
7197b4e
Compare
ec8455c to
964bab2
Compare
| "author": "LaunchDarkly", | ||
| "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@launchdarkly/js-sdk-common": "2.24.4", |
| "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@launchdarkly/js-sdk-common": "2.24.4", | ||
| "@launchdarkly/openfeature-js-server-common": "workspace:^" |
There was a problem hiding this comment.
Can we use whatever version number is in here instead of workspace?
| "@openfeature/server-sdk": "^1.16.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@launchdarkly/node-server-sdk": "9.10.12", |
There was a problem hiding this comment.
🟡 Dev dependency version mismatch: @launchdarkly/node-server-sdk pinned to 9.10.12 instead of workspace version 9.10.14
The new package pins @launchdarkly/node-server-sdk at 9.10.12 in devDependencies, but the workspace version at packages/sdk/server-node/package.json is 9.10.14. Every other package in the repo that lists this as a devDependency uses 9.10.14 (e.g., packages/store/node-server-sdk-redis/package.json, packages/store/node-server-sdk-dynamodb/package.json, packages/telemetry/node-server-sdk-otel/package.json). In Yarn 3 workspaces, an exact pinned version that doesn't match the workspace version will attempt to resolve from the npm registry instead of using the local workspace package, which can cause build/test failures or use a stale published version.
| "@launchdarkly/node-server-sdk": "9.10.12", | |
| "@launchdarkly/node-server-sdk": "9.10.14", |
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default mode 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 bdf38a1. Configure here.
| "@openfeature/server-sdk": "^1.16.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@launchdarkly/node-server-sdk": "9.10.12", |
There was a problem hiding this comment.
Stale devDependency version won't resolve to workspace package
Medium Severity
The devDependencies entry for @launchdarkly/node-server-sdk is pinned to 9.10.12, but the actual workspace version is 9.10.14. In Yarn 3, this exact-version mismatch prevents resolution to the local workspace package, causing Yarn to fetch the older version from npm instead. Every other package in this monorepo (e.g., node-server-sdk-otel, examples) correctly references 9.10.14. This will break the local development workflow once real implementation and tests are added.
Reviewed by Cursor Bugbot for commit bdf38a1. Configure here.
…nd CI (#1394) ## Summary Final code slice of the openfeature-node-server lateral move (SDK-2213). Lands the actual provider behavior on top of the inert scaffold from SDK-2216 (PR #1356), wires CI gates around it, and ports the upstream test suite. This combines the previously-planned CI and impl/tests slices per replan on 2026-05-08 -- the work was tightly coupled enough that splitting added review overhead without much value. - \`src/LaunchDarklyProvider.ts\` -- ports the upstream provider (~42 lines). Extends \`BaseOpenFeatureProvider\` from \`@launchdarkly/openfeature-js-server-common\`, wires Node SDK \`update\` events to OpenFeature \`ConfigurationChanged\` events, sets \`wrapperName\` / \`wrapperVersion\` for telemetry. Logger is passed through to the base; the base wraps with \`createSafeLogger\`, so no double-wrap. - \`src/index.ts\` -- replaces the slice-2 stub with the real export. - \`__tests__/LaunchDarklyProvider.test.ts\` (413 lines) + \`TestLogger.ts\` -- full upstream test port. Provides end-to-end coverage by wiring \`OpenFeature.setProviderAndWait(ldProvider)\` against \`LaunchDarklyProvider\` whose \`LDClient\` uses \`integrations.TestData\` as the data source. Removes the slice-2 placeholder \`scaffold.test.ts\`. - \`.github/workflows/openfeature-node-server.yaml\` -- new CI workflow mirroring \`akamai-base.yml\` via the shared \`actions/ci\` step. - \`.github/workflows/release-please.yml\` -- adds the workspace_path option, the \`package-sdk-openfeature-node-server-released\` output, and a disabled \`release-openfeature-node-server\` job (\`if: false\` until post-GA). - \`.github/workflows/manual-publish-docs.yml\` -- adds the new workspace path. Resolves SDK-2325. Supersedes SDK-2217. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > New flag-evaluation and event-tracking surface on the server path, but behavior is largely delegated to existing shared provider logic and covered by extensive tests; automated release remains off (`if: false`). > > **Overview** > Replaces the `openfeature-node-server` scaffold with a real **LaunchDarkly OpenFeature provider** for Node: `LaunchDarklyProvider` extends shared `BaseOpenFeatureProvider`, initializes the Node server SDK with wrapper telemetry, and maps SDK `update` events to OpenFeature `ConfigurationChanged`. The public API now exports `LaunchDarklyProvider` instead of an empty stub. > > Adds a **ported Jest suite** (init/auth failure, flag-change events, typed evaluations, LD→OpenFeature error mapping, context logging, and `track` forwarding) plus a small `TestLogger`, and removes the placeholder scaffold test. **CI/release wiring** adds a dedicated workflow (Node 20/22 via shared `actions/ci`), registers the package in manual docs publish and release-please (including bumping `wrapperVersion` in `LaunchDarklyProvider.ts`), and introduces a **disabled** `release-openfeature-node-server` job until post-GA. TypeDoc config is added for the package. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 33f3fc8. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>


NOTE: the important discussion on this PR is whether or not we are going to major version our OF node server provider.
Currently, we should be preserving backward compatibility with the existing package, but there are significant implementation changes.
This PR is also blocked behind releasing the common module
Note
Low Risk
Low risk: changes are mostly build/release scaffolding and workspace wiring, with no provider runtime implementation yet; main risk is unintended effects on monorepo build/release configuration.
Overview
Adds initial scaffolding for a new experimental package,
@launchdarkly/openfeature-node-server, including build/test tooling (tsup,tsconfig,jest) plus placeholdersrc/index.ts, README, and license.Updates monorepo wiring to recognize and publish the package (root workspaces, TS project references,
release-pleaseconfig/manifest), and exportstranslateContextfromopenfeature-server-common. Minor housekeeping updates.gitignoreand reorders a devDependency entry inserver-ai-vercel.Reviewed by Cursor Bugbot for commit bdf38a1. Bugbot is set up for automated code reviews on this repo. Configure here.