Skip to content

Commit 3812c08

Browse files
joker23devin-ai-integration[bot]kinyoklion
authored
chore: init shared openfeature server provider (#1329)
This PR will initialize the migration of openfeature node server provider to js-core. Specifically, this PR will create a shared openfeature server provider base class. REVIEWER: The logic in this should be a more generalized version of https://github.com/launchdarkly/openfeature-node-server/tree/main. Theoretically, this would allow us to implement openfeature providers pretty easily (eg https://github.com/launchdarkly/js-core/blob/skz/sdk-2213/openfeature-migration/packages/sdk/openfeature-node-server/src/LaunchDarklyProvider.ts) > NOTE: at the moment this code won't do anything until we implement the implementing provider in the next PR. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk because this PR only adds a new, pre-release shared package and wiring (workspace/tsc/release-please) without changing behavior of existing SDKs. Main risk is limited to build/release configuration and the correctness of the new translation/provider utilities for future adopters. > > **Overview** > Introduces a new pre-release workspace package, `@launchdarkly/openfeature-js-server-common`, exporting `BaseOpenFeatureProvider` plus utilities to translate OpenFeature evaluation contexts/results and tracking event details to LaunchDarkly equivalents. > > Adds full package scaffolding (tsup/tsconfig/jest config, README/LICENSE, and unit tests) and wires it into the monorepo via `package.json` workspaces, root `tsconfig` references, and `release-please` manifest/config so it can be versioned and built independently. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bf81b26. 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: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
1 parent fef3281 commit 3812c08

22 files changed

Lines changed: 1359 additions & 0 deletions

.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"packages/sdk/vercel": "1.3.45",
1515
"packages/shared/akamai-edgeworker-sdk": "2.0.20",
1616
"packages/shared/common": "2.24.3",
17+
"packages/shared/openfeature-server-common": "0.1.0",
1718
"packages/shared/sdk-client": "1.26.2",
1819
"packages/shared/sdk-server": "2.18.6",
1920
"packages/shared/sdk-server-edge": "2.6.19",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"packages/shared/sdk-server",
1010
"packages/shared/sdk-server-edge",
1111
"packages/shared/akamai-edgeworker-sdk",
12+
"packages/shared/openfeature-server-common",
1213
"packages/sdk/server-node",
1314
"packages/sdk/server-node/contract-tests",
1415
"packages/sdk/cloudflare",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2025 Catamorphic, Co.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# LaunchDarkly OpenFeature Common Server Provider
2+
3+
<!--
4+
[![NPM][openfeature-server-common-npm-badge]][openfeature-server-common-npm-link]
5+
[![Actions Status][openfeature-server-common-ci-badge]][openfeature-server-common-ci]
6+
-->
7+
8+
> [!CAUTION]
9+
> This SDK is in pre-release and not subject to backwards compatibility
10+
> guarantees. The API may change based on feedback.
11+
>
12+
> Pin to a specific minor version and review the [changelog](CHANGELOG.md) before upgrading.
13+
14+
This package contains the shared OpenFeature provider implementation for LaunchDarkly server-side JavaScript SDKs. It provides a base provider class and translation utilities that convert between OpenFeature and LaunchDarkly concepts.
15+
16+
This package is not intended to be used directly.
17+
18+
## Contributing
19+
20+
See [Contributing](../CONTRIBUTING.md).
21+
22+
## Verifying SDK build provenance with the SLSA framework
23+
24+
LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages. To learn more, see the [provenance guide](PROVENANCE.md).
25+
26+
## About LaunchDarkly
27+
28+
- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
29+
- Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
30+
- Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
31+
- Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
32+
- Grant access to certain features based on user attributes, like payment plan (eg: users on the 'gold' plan get access to more features than users in the 'silver' plan).
33+
- Disable parts of your application to facilitate maintenance, without taking everything offline.
34+
- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
35+
- Explore LaunchDarkly
36+
- [launchdarkly.com](https://www.launchdarkly.com/ 'LaunchDarkly Main Website') for more information
37+
- [docs.launchdarkly.com](https://docs.launchdarkly.com/ 'LaunchDarkly Documentation') for our documentation and SDK reference guides
38+
- [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ 'LaunchDarkly API Documentation') for our API documentation
39+
- [blog.launchdarkly.com](https://blog.launchdarkly.com/ 'LaunchDarkly Blog Documentation') for the latest product updates
40+
41+
<!--
42+
[openfeature-server-common-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/openfeature-js-server-common.svg?style=flat-square
43+
[openfeature-server-common-npm-link]: https://www.npmjs.com/package/@launchdarkly/openfeature-js-server-common
44+
[openfeature-server-common-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/openfeature-node-server.yml/badge.svg
45+
[openfeature-server-common-ci]: https://github.com/launchdarkly/js-core/actions/workflows/openfeature-node-server.yml
46+
-->

0 commit comments

Comments
 (0)