|
| 1 | +# Contributing to the LaunchDarkly JavaScript Observability SDK |
| 2 | + |
| 3 | +LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/sdk/concepts/contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK. |
| 4 | + |
| 5 | +## Submitting bug reports and feature requests |
| 6 | + |
| 7 | +The LaunchDarkly SDK team monitors the [issue tracker](https://github.com/launchdarkly/observability-sdk/issues) 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. |
| 8 | + |
| 9 | +## Submitting pull requests |
| 10 | + |
| 11 | +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. |
| 12 | + |
| 13 | +## Build instructions |
| 14 | + |
| 15 | +### Prerequisites |
| 16 | + |
| 17 | +`npm` or `yarn` is required to develop in this repository. |
| 18 | + |
| 19 | +We recommend installing the [LaunchDarkly JavaScript SDK](https://github.com/launchdarkly/js-client-sdk) before developing in this repository. |
| 20 | + |
| 21 | +### Setup |
| 22 | + |
| 23 | +To install project dependencies: |
| 24 | + |
| 25 | +``` |
| 26 | +# npm |
| 27 | +npm i @launchdarkly/observability |
| 28 | +npm i @launchdarkly/session-replay |
| 29 | +
|
| 30 | +# yarn |
| 31 | +yarn add @launchdarkly/observability |
| 32 | +yarn add @launchdarkly/session-replay |
| 33 | +
|
| 34 | +``` |
| 35 | + |
| 36 | +### Build |
| 37 | + |
| 38 | +To build all projects, from the root directory: |
| 39 | + |
| 40 | +``` |
| 41 | +yarn build |
| 42 | +``` |
| 43 | + |
| 44 | +Running `yarn build` in an individual package (`@launchdarkly/observability` or `@launchdarkly/session-replay`) will build that package, but will not rebuild any dependencies. |
| 45 | + |
| 46 | +### Testing |
| 47 | + |
| 48 | +To run all unit tests: |
| 49 | + |
| 50 | +```shell |
| 51 | +# install dependencies |
| 52 | +yarn |
| 53 | + |
| 54 | +# lint |
| 55 | +yarn format-check |
| 56 | + |
| 57 | +# run all tests |
| 58 | +yarn test |
| 59 | +``` |
| 60 | + |
| 61 | +LaunchDarkly's CI tests will run automatically against all supported versions. To learn more, read [`.github/workflows/turbo.yml`](.github/workflows/turbo.yml). |
| 62 | + |
| 63 | +## Code organization |
| 64 | + |
| 65 | +The library's structure is as follows: |
| 66 | + |
| 67 | + |
| 68 | +## Documenting types and methods |
| 69 | + |
| 70 | +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. |
0 commit comments