Skip to content

Commit ba90cf8

Browse files
committed
chore: Scaffold combined browser package.
1 parent ea02136 commit ba90cf8

22 files changed

+481
-2
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: '@launchdarkly/browser Bug Report'
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'package: sdk/combined-browser, bug'
6+
assignees: ''
7+
---
8+
9+
**Is this a support request?**
10+
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the code in this library. If you're not sure whether the problem you are having is specifically related to this library, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/) and clicking "submit a request", or by emailing [email protected].
11+
12+
Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.
13+
14+
**Describe the bug**
15+
A clear and concise description of what the bug is.
16+
17+
**To reproduce**
18+
Steps to reproduce the behavior.
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Logs**
24+
If applicable, add any log output related to your problem.
25+
26+
**SDK version**
27+
The version of this SDK that you are using.
28+
29+
**Language version, developer tools**
30+
For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too.
31+
32+
**OS/platform**
33+
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.
34+
35+
**Additional context**
36+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: '@launchdarkly/browser Feature Request'
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'package: sdk/combined-browser, feature'
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context about the feature request here.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: sdk/combined-browser
2+
3+
on:
4+
push:
5+
branches: [main, 'feat/**']
6+
paths-ignore:
7+
- '**.md' #Do not need to run CI for markdown changes.
8+
pull_request:
9+
branches: [main, 'feat/**']
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
build-test-browser:
15+
permissions:
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
# Node versions to run on.
22+
version: [18, 21]
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.version }}
29+
registry-url: 'https://registry.npmjs.org'
30+
- id: shared
31+
name: Shared CI Steps
32+
uses: ./actions/ci
33+
with:
34+
workspace_name: '@launchdarkly/browser'
35+
workspace_path: packages/sdk/combined-browser
36+
- name: Check package size
37+
if: github.event_name == 'pull_request' && matrix.version == '21'
38+
uses: ./actions/package-size
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
target_file: 'packages/sdk/combined-browser/dist/index.js'
42+
package_name: '@launchdarkly/browser'
43+
pr_number: ${{ github.event.number }}
44+
size_limit: 25000

.github/workflows/manual-publish-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
- packages/sdk/browser
2424
- packages/sdk/server-ai
2525
- packages/telemetry/browser-telemetry
26+
- packages/sdk/combined-browser
2627
name: Publish Documentation
2728
jobs:
2829
build-publish:

.github/workflows/manual-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ on:
3636
- packages/sdk/browser
3737
- packages/sdk/server-ai
3838
- packages/telemetry/browser-telemetry
39+
- packages/sdk/combined-browser
3940
prerelease:
4041
description: 'Is this a prerelease. If so, then the latest tag will not be updated in npm.'
4142
type: boolean

.github/workflows/release-please.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
package-browser-released: ${{ steps.release.outputs['packages/sdk/browser--release_created'] }}
2929
package-server-ai-released: ${{ steps.release.outputs['packages/sdk/server-ai--release_created'] }}
3030
package-browser-telemetry-released: ${{ steps.release.outputs['packages/telemetry/browser-telemetry--release_created'] }}
31+
package-combined-browser-released: ${{ steps.release.outputs['packages/sdk/combined-browser--release_created'] }}
3132
steps:
3233
- uses: googleapis/release-please-action@v4
3334
id: release
@@ -207,7 +208,7 @@ jobs:
207208
with:
208209
node-version: 22.x
209210
registry-url: 'https://registry.npmjs.org'
210-
- id: release-react-native
211+
- id: release-browser
211212
name: Full release of packages/sdk/browser
212213
uses: ./actions/full-release
213214
with:
@@ -439,3 +440,24 @@ jobs:
439440
with:
440441
workspace_path: packages/telemetry/browser-telemetry
441442
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
443+
444+
release-combined-browser:
445+
runs-on: ubuntu-latest
446+
needs: ['release-please', 'release-browser']
447+
permissions:
448+
id-token: write
449+
contents: write
450+
if: ${{ always() && !failure() && !cancelled() && needs.release-please.outputs.package-combined-browser-released == 'true'}}
451+
steps:
452+
- uses: actions/checkout@v4
453+
- uses: actions/setup-node@v4
454+
with:
455+
node-version: 22.x
456+
registry-url: 'https://registry.npmjs.org'
457+
- id: release-combined-browser
458+
name: Full release of packages/sdk/combined-browser
459+
uses: ./actions/full-release
460+
with:
461+
workspace_path: packages/sdk/combined-browser
462+
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
463+

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"packages/sdk/server-ai/examples/bedrock",
3535
"packages/sdk/server-ai/examples/openai",
3636
"packages/telemetry/browser-telemetry",
37-
"contract-tests"
37+
"contract-tests",
38+
"packages/sdk/combined-browser"
3839
],
3940
"private": true,
4041
"scripts": {

packages/sdk/combined-browser/CHANGELOG.md

Whitespace-only changes.
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: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# LaunchDarkly JavaScript SDK for Browsers
2+
3+
[![NPM][browser-sdk-npm-badge]][browser-sdk-npm-link]
4+
[![Actions Status][browser-sdk-ci-badge]][browser-sdk-ci]
5+
[![Documentation][browser-sdk-ghp-badge]][browser-sdk-ghp-link]
6+
[![NPM][browser-sdk-dm-badge]][browser-sdk-npm-link]
7+
[![NPM][browser-sdk-dt-badge]][browser-sdk-npm-link]
8+
9+
# ⛔️⛔️⛔️⛔️
10+
11+
> [!CAUTION]
12+
> This library is a alpha version and should not be considered ready for production use while this message is visible.
13+
14+
# ☝️☝️☝️☝️☝️☝️
15+
16+
<!--
17+
## Install
18+
19+
```shell
20+
# npm
21+
npm i @launchdarkly/js-client-sdk
22+
23+
# yarn
24+
yarn add -D @launchdarkly/js-client-sdk
25+
```
26+
-->
27+
28+
## Getting started
29+
30+
Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/client-side/javascript#getting-started) for instructions on getting started with using the SDK.
31+
32+
Note: _If you are using JavaScript in a non-browser environment, please check our other SDK packages in [js-core](https://github.com/launchdarkly/js-core)_
33+
Please note that the JavaScript SDK has two special requirements in terms of your LaunchDarkly environment. First, in terms of the credentials for your environment that appear on your [Account Settings](https://app.launchdarkly.com/settings/projects) dashboard, the JavaScript SDK uses the "Client-side ID"-- not the "SDK key" or the "Mobile key". Second, for any feature flag that you will be using in JavaScript code, you must check the "Make this flag available to client-side SDKs" box on that flag's Settings page.
34+
35+
## Verifying SDK build provenance with the SLSA framework
36+
37+
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).
38+
39+
## About LaunchDarkly
40+
41+
- 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:
42+
- 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.
43+
- 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?).
44+
- 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.
45+
- 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).
46+
- Disable parts of your application to facilitate maintenance, without taking everything offline.
47+
- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
48+
- Explore LaunchDarkly
49+
- [launchdarkly.com](https://www.launchdarkly.com/ 'LaunchDarkly Main Website') for more information
50+
- [docs.launchdarkly.com](https://docs.launchdarkly.com/ 'LaunchDarkly Documentation') for our documentation and SDK reference guides
51+
- [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ 'LaunchDarkly API Documentation') for our API documentation
52+
- [blog.launchdarkly.com](https://blog.launchdarkly.com/ 'LaunchDarkly Blog Documentation') for the latest product updates
53+
54+
[browser-sdk-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/browser.yml/badge.svg
55+
[browser-sdk-ci]: https://github.com/launchdarkly/js-core/actions/workflows/browser.yml
56+
[browser-sdk-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/js-client-sdk.svg?style=flat-square
57+
[browser-sdk-npm-link]: https://www.npmjs.com/package/@launchdarkly/js-client-sdk
58+
[browser-sdk-ghp-badge]: https://img.shields.io/static/v1?label=GitHub+Pages&message=API+reference&color=00add8
59+
[browser-sdk-ghp-link]: https://launchdarkly.github.io/js-core/packages/sdk/browser/docs/
60+
[browser-sdk-dm-badge]: https://img.shields.io/npm/dm/@launchdarkly/js-client-sdk.svg?style=flat-square
61+
[browser-sdk-dt-badge]: https://img.shields.io/npm/dt/@launchdarkly/js-client-sdk.svg?style=flat-square

0 commit comments

Comments
 (0)