Commit 83a7b06
chore: Port openfeature-node-server provider implementation, tests, and 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>1 parent 891ffe2 commit 83a7b06
10 files changed
Lines changed: 546 additions & 8 deletions
File tree
- .github/workflows
- packages/sdk/openfeature-node-server
- __tests__
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
519 | 521 | | |
520 | 522 | | |
521 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
522 | 542 | | |
523 | 543 | | |
524 | 544 | | |
| |||
0 commit comments