Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@launchdarkly/js-server-sdk-common

launchdarkly3.8mApache-2.02.16.0TypeScript support: included

LaunchDarkly Server SDK for JavaScript - common code

launchdarkly, analytics, client

readme

LaunchDarkly SDK JavaScript Common Server Code

NPM Actions Status Documentation

This project contains Typescript classes and interfaces that are applicable to server-side SDKs.

Contributing

See Contributing.

Verifying SDK build provenance with the SLSA framework

LaunchDarkly uses the SLSA framework (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.

About LaunchDarkly

  • 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:
    • 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.
    • 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?).
    • 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.
    • 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).
    • Disable parts of your application to facilitate maintenance, without taking everything offline.
  • LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out our documentation for a complete list.
  • Explore LaunchDarkly

changelog

Changelog

All notable changes to @launchdarkly/js-server-sdk-common will be documented in this file. This project adheres to Semantic Versioning.

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.3.0 to 2.3.1

2.16.0 (2025-06-17)

Features

2.15.2 (2025-05-21)

Bug Fixes

  • corrected location of payloadFilterKey in LDOptions (#863) (cc825d4)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.17.0 to 2.18.0

2.15.1 (2025-04-29)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.16.0 to 2.17.0

2.15.0 (2025-04-16)

Features

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.15.0 to 2.16.0

2.14.0 (2025-04-08)

Features

  • Option to use gzip to compress event (#814) (4e91431)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.14.0 to 2.15.0

2.13.0 (2025-03-26)

Features

  • Support inline context for custom and migration events (6aadf04)

Bug Fixes

  • Deprecate LDMigrationOpEvent.contextKeys in favor of LDMigrationOpEvent.context (6aadf04)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.13.0 to 2.14.0

2.12.1 (2025-03-21)

Bug Fixes

  • Fix cancelling timeout when waitForInitialization throws an exception (#808) (bb3c950)

2.12.0 (2025-03-17)

Features

  • Export internalServer module for internal LD usage (#804) (ec43ac8)

2.11.1 (2025-02-18)

Bug Fixes

  • Fix issue where flush callback could be called twice. (#779) (c377e89)

2.11.0 (2025-01-22)

Features

  • Adds StreamingProcessor for FDv2 to sdk-server package. (#707) (7f5c275)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.12.0 to 2.13.0

2.10.0 (2024-11-14)

Features

  • Add support for getting the logger from server-side SDKs. (#684) (1c411a1)

2.9.1 (2024-11-04)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.11.0 to 2.12.0

2.9.0 (2024-10-17)

Features

  • Add prerequisite information to server-side allFlagsState. (8c84e01)
  • Add support for client-side prerequisite events. (8c84e01)
  • Add support for prerequisite details to evaluation detail. (8c84e01)
  • Apply private property naming standard. Mangle browser private properties. (#620) (3e6d404)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.10.0 to 2.11.0

2.8.0 (2024-10-09)

Features

  • adds datasource status to sdk-client (#590) (6f26204)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.9.0 to 2.10.0

2.7.0 (2024-09-26)

Features

  • Add platform support for async hashing. (#573) (9248035)
  • Add support for conditional event source capabilities. (#577) (fe82500)
  • Allow using custom user-agent name. (#580) (ed5a206)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.8.0 to 2.9.0

2.6.1 (2024-09-05)

Bug Fixes

  • Correctly handle null values in JSON variations. (#569) (907d08b), closes #568

2.6.0 (2024-09-03)

Features

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.7.0 to 2.8.0

2.5.0 (2024-08-28)

Features

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.6.0 to 2.7.0

2.4.5 (2024-08-12)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.5.0 to 2.6.0

2.4.4 (2024-06-14)

Bug Fixes

  • Include prerequisiteKey in migration op event. (#481) (824f59d)

2.4.3 (2024-06-04)

Bug Fixes

  • Cleanup timeout timer for waitForInitialization (#478) (fccbfac)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.4.2 to 2.5.0

2.4.2 (2024-05-31)

Bug Fixes

2.4.1 (2024-04-26)

Bug Fixes

  • Produce a warning when track is called with a non-numeric metric value. (#449) (6799742)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.4.1 to 2.4.2

2.4.0 (2024-04-16)

Features

  • Add support for optional timeout for waitForInitialization. (#437) (c6032b3)

2.3.0 (2024-04-10)

Features

2.2.4 (2024-04-09)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.4.0 to 2.4.1

2.2.3 (2024-04-09)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.3.1 to 2.4.0

2.2.1 (2024-03-15)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.2.0 to 2.3.0

2.2.0 (2024-02-06)

Features

  • Implement common client side support for auto environment attributes. (#356) (8d80259)
  • React-native support for auto-env attributes. Only affects react-native package. (deea99c)
  • Update eslint jest configuration and versions. (deea99c)

Bug Fixes

  • Add LDOptions.application name and versionName. (#358) (cd75210)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.1.1 to 2.2.0

2.1.3 (2024-01-16)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.1.0 to 2.1.1

2.1.2 (2023-12-28)

Bug Fixes

  • Remove beta warning for sdk-server. Added tsdoc comments for rn sdk. Added README for sdk-client. (#334) (bb7c3b4)

2.1.1 (2023-12-04)

Bug Fixes

  • Increment version for changing flagValues (#317) (e8e07ef)

2.1.0 (2023-11-14)

Features

  • edge sdks should send events to bulk/environment endpoint (#256) (f45910f)

Bug Fixes

  • Better handle waiting for initialization for failure cases. (#314) (16515df), closes #312

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 2.0.0 to 2.1.0

2.0.2 (2023-11-01)

Bug Fixes

  • Correct comparison for typeof check. (#308) (568f2ab)

2.0.1 (2023-10-16)

Bug Fixes

2.0.0 (2023-10-16)

⚠ BREAKING CHANGES

  • Implement Migrations. Refactor for client SDKs. (#293)

Features

  • Implement Migrations. Refactor for client SDKs. (#293) (c66aa6e)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 1.1.0 to 2.0.0

1.2.3 (2023-09-06)

Bug Fixes

  • Use clientSideAvailability instead of clientSide for filtering client side flags. (#270) (2702342)

1.2.2 (2023-08-28)

Bug Fixes

  • Client cannot become un-initialized. (#251) (e2e8971)
  • Dispatch change events after ready event. (#252) (2e2a865)

1.2.1 (2023-08-24)

Bug Fixes

  • Fix an error handling situation that could cause double evaluation. (#249) (2c613ff)

1.2.0 (2023-08-21)

Features

  • Optimize segment lookup for large segments. (#235) (ac575d0)
  • Use callbacks for evaluation hotpath. (#234) (27e5454)

Bug Fixes

  • Correct double callback in persistent store wrapper. (#240) (243729d)

1.1.0 (2023-08-14)

Features

  • Allow specifying the user agent per-sdk implementation. (#226) (e57716f)

Bug Fixes

  • Allow for negation of segment match clauses. (#237) (d8e469a)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 1.0.3 to 1.1.0

1.0.8 (2023-08-10)

Bug Fixes

  • Switch to es2017 target to ensure native async/await. (a83e4e6)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 1.0.2 to 1.0.3

1.0.7 (2023-08-03)

Bug Fixes

  • Ensure that test data user targets are handled correctly. (#223) (8a423b2)

1.0.6 (2023-07-05)

Bug Fixes

  • Preserve fallthrough variation when cloning test data. (#194) (e9cf09d)

1.0.5 (2023-06-27)

Bug Fixes

  • Set the content type when posting events. (#184) (dc9e921)

1.0.4 (2023-06-13)

Bug Fixes

  • Correctly handle excluded big segments. (#160) (e9cb45a)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 1.0.1 to 1.0.2

1.0.3 (2023-06-08)

Bug Fixes

1.0.2 (2023-04-28)

Bug Fixes

  • fixed bug where the feature store does not deserialize KV values… (#107) (68113b7)

1.0.1 (2023-04-27)

Bug Fixes

  • add licence and fix missing package.json fields. (c586398)
  • Ensure top level commands work correctly (#105) (762571f)
  • remove beta text from cloudflare sdk readme. (c586398)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 1.0.0 to 1.0.1

1.0.0 (2023-04-26)

Features

0.3.1 (2023-04-20)

Bug Fixes

0.3.0 (2023-04-19)

Features

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @launchdarkly/js-sdk-common bumped from 0.2.0 to 0.3.0

0.2.0 (2023-03-16)

Features

  • Update packaging to include only needed files. (06b2f28)

0.1.0 (2023-03-15)

Initial prerelease version.