Skip to content

chore: adding scaffolding for OF node server provider#1356

Merged
joker23 merged 3 commits into
mainfrom
skz/sdk-2216/openfeature-migration-openfeature-node-server-scaffold
May 8, 2026
Merged

chore: adding scaffolding for OF node server provider#1356
joker23 merged 3 commits into
mainfrom
skz/sdk-2216/openfeature-migration-openfeature-node-server-scaffold

Conversation

@joker23

@joker23 joker23 commented May 5, 2026

Copy link
Copy Markdown
Contributor

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 placeholder src/index.ts, README, and license.

Updates monorepo wiring to recognize and publish the package (root workspaces, TS project references, release-please config/manifest), and exports translateContext from openfeature-server-common. Minor housekeeping updates .gitignore and reorders a devDependency entry in server-ai-vercel.

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

@joker23

joker23 commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented May 5, 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: 38487 bytes
Compressed size limit: 39000
Uncompressed size: 211236 bytes

cursor[bot]

This comment was marked as resolved.

@joker23 joker23 force-pushed the skz/sdk-2216/openfeature-migration-openfeature-node-server-scaffold branch from aca1b27 to a1477d5 Compare May 6, 2026 14:30
@joker23

joker23 commented May 6, 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 a1477d5. Configure here.

@joker23 joker23 marked this pull request as ready for review May 6, 2026 17:36
@joker23 joker23 requested a review from a team as a code owner May 6, 2026 17:36

@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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@joker23 joker23 force-pushed the skz/sdk-2216/openfeature-migration-openfeature-node-server-scaffold branch from a1477d5 to 7197b4e Compare May 8, 2026 19:52
devin-ai-integration[bot]

This comment was marked as resolved.

@joker23 joker23 force-pushed the skz/sdk-2216/openfeature-migration-openfeature-node-server-scaffold branch from ec8455c to 964bab2 Compare May 8, 2026 20:02
"author": "LaunchDarkly",
"license": "Apache-2.0",
"dependencies": {
"@launchdarkly/js-sdk-common": "2.24.4",

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.

Ideally we don't need this.

"license": "Apache-2.0",
"dependencies": {
"@launchdarkly/js-sdk-common": "2.24.4",
"@launchdarkly/openfeature-js-server-common": "workspace:^"

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.

Can we use whatever version number is in here instead of workspace?

@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 new potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

"@openfeature/server-sdk": "^1.16.0"
},
"devDependencies": {
"@launchdarkly/node-server-sdk": "9.10.12",

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.

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

Suggested change
"@launchdarkly/node-server-sdk": "9.10.12",
"@launchdarkly/node-server-sdk": "9.10.14",
Open in Devin Review

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

@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 mode 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 bdf38a1. Configure here.

"@openfeature/server-sdk": "^1.16.0"
},
"devDependencies": {
"@launchdarkly/node-server-sdk": "9.10.12",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bdf38a1. Configure here.

@joker23 joker23 merged commit 26d11c6 into main May 8, 2026
43 checks passed
@joker23 joker23 deleted the skz/sdk-2216/openfeature-migration-openfeature-node-server-scaffold branch May 8, 2026 21:00
joker23 added a commit that referenced this pull request Jun 2, 2026
…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>
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