LaunchDarkly has published an SDK contributor's guide that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
The LaunchDarkly SDK team monitors the issue tracker in the SDK repository. Bug reports and feature requests specific to this library should be filed in this issue tracker. The SDK team will respond to all newly filed issues within two business days.
We encourage pull requests and other contributions from the community. Before submitting pull requests, ensure that all temporary or unintended code is removed. Don't worry about adding reviewers to the pull request; the LaunchDarkly SDK team will add themselves. The SDK team will acknowledge all pull requests within two business days.
npm or yarn is required to develop in this repository.
We recommend installing the LaunchDarkly JavaScript SDK before developing in this repository.
To install project dependencies:
# npm
npm i @launchdarkly/observability
npm i @launchdarkly/session-replay
# yarn
yarn add @launchdarkly/observability
yarn add @launchdarkly/session-replay
To build all projects, from the root directory:
yarn build
Running yarn build in an individual package (@launchdarkly/observability or @launchdarkly/session-replay) will build that package, but will not rebuild any dependencies.
To run all unit tests:
# install dependencies
yarn
# lint
yarn format-check
# run all tests
yarn testLaunchDarkly's CI tests will run automatically against all supported versions. To learn more, read .github/workflows/turbo.yml.
The library's structure is as follows:
sdk/directory contains all SDKs@launchdarklydirectory withsdk/contains the@launchdarkly-prefixed npm packages
e2edirectory contains end to end tests exercising the SDKsrrwebdirectory hosts the rrweb fork as a git submodule; used by the Session Replay SDK
Please try to make the style and terminology in documentation comments consistent with other documentation comments in the library. Also, if a class or method is being added that has an equivalent in other libraries, and if we have described it in a consistent away in those other libraries, please reuse the text whenever possible (with adjustments for anything language-specific) rather than writing new text.