Skip to content

Commit 46c972e

Browse files
committed
Merge remote-tracking branch 'origin' into ta/sdk-198/ping-stream-support
2 parents 824e1c7 + f6fc40b commit 46c972e

File tree

160 files changed

+2727
-2284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+2727
-2284
lines changed

.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,38 @@ module.exports = {
4747
'jest/no-focused-tests': 'error',
4848
'jest/no-identical-title': 'error',
4949
'jest/valid-expect': 'error',
50+
'no-underscore-dangle': ['error', { allowAfterThis: true }],
51+
'@typescript-eslint/naming-convention': [
52+
'error',
53+
{
54+
selector: ['method'],
55+
format: ['camelCase'],
56+
leadingUnderscore: 'forbid',
57+
},
58+
{
59+
selector: ['method'],
60+
format: ['camelCase'],
61+
modifiers: ['private'],
62+
leadingUnderscore: 'require',
63+
},
64+
{
65+
selector: ['classProperty', 'parameterProperty'],
66+
format: ['camelCase'],
67+
leadingUnderscore: 'forbid',
68+
},
69+
{
70+
selector: ['classProperty', 'parameterProperty'],
71+
modifiers: ['static'],
72+
format: ['PascalCase'],
73+
leadingUnderscore: 'forbid',
74+
},
75+
{
76+
selector: ['classProperty', 'parameterProperty'],
77+
modifiers: ['private'],
78+
format: ['camelCase'],
79+
leadingUnderscore: 'require',
80+
},
81+
],
5082
},
5183
globals: {
5284
BigInt: 'readonly',

.github/workflows/release-please.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
package-node-server-sdk-otel-release: ${{ steps.release.outputs['packages/telemetry/node-server-sdk-otel--release_created'] }}
2525
package-tooling-jest-release: ${{ steps.release.outputs['packages/tooling/jest--release_created'] }}
2626
package-react-universal-release: ${{ steps.release.outputs['packages/sdk/react-universal--release_created'] }}
27+
package-browser-released: ${{ steps.release.outputs['packages/sdk/browser--release_created'] }}
2728
steps:
2829
- uses: googleapis/release-please-action@v4
2930
id: release
@@ -170,6 +171,26 @@ jobs:
170171
workspace_path: packages/sdk/react-native
171172
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
172173

174+
release-browser:
175+
runs-on: ubuntu-latest
176+
needs: ['release-please', 'release-sdk-client']
177+
permissions:
178+
id-token: write
179+
contents: write
180+
if: ${{ always() && !failure() && !cancelled() && needs.release-please.outputs.package-browser-released == 'true'}}
181+
steps:
182+
- uses: actions/checkout@v4
183+
- uses: actions/setup-node@v4
184+
with:
185+
node-version: 20.x
186+
registry-url: 'https://registry.npmjs.org'
187+
- id: release-react-native
188+
name: Full release of packages/sdk/browser
189+
uses: ./actions/full-release
190+
with:
191+
workspace_path: packages/sdk/browser
192+
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
193+
173194
release-server-node:
174195
runs-on: ubuntu-latest
175196
needs: ['release-please', 'release-sdk-server']

.release-please-manifest.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"packages/shared/common": "2.9.0",
3-
"packages/shared/sdk-server": "2.7.0",
4-
"packages/sdk/server-node": "9.6.0",
5-
"packages/sdk/cloudflare": "2.5.14",
6-
"packages/shared/sdk-server-edge": "2.4.0",
7-
"packages/sdk/vercel": "1.3.17",
8-
"packages/sdk/akamai-base": "2.1.16",
9-
"packages/sdk/akamai-edgekv": "1.1.16",
10-
"packages/shared/akamai-edgeworker-sdk": "1.2.0",
11-
"packages/store/node-server-sdk-dynamodb": "6.1.22",
12-
"packages/store/node-server-sdk-redis": "4.1.22",
13-
"packages/shared/sdk-client": "1.8.0",
14-
"packages/sdk/react-native": "10.7.0",
15-
"packages/telemetry/node-server-sdk-otel": "1.0.14"
2+
"packages/shared/common": "2.10.0",
3+
"packages/shared/sdk-server": "2.8.0",
4+
"packages/sdk/server-node": "9.6.1",
5+
"packages/sdk/cloudflare": "2.5.15",
6+
"packages/shared/sdk-server-edge": "2.4.1",
7+
"packages/sdk/vercel": "1.3.18",
8+
"packages/sdk/akamai-base": "2.1.17",
9+
"packages/sdk/akamai-edgekv": "1.1.17",
10+
"packages/shared/akamai-edgeworker-sdk": "1.2.1",
11+
"packages/store/node-server-sdk-dynamodb": "6.1.23",
12+
"packages/store/node-server-sdk-redis": "4.1.23",
13+
"packages/shared/sdk-client": "1.9.0",
14+
"packages/sdk/react-native": "10.8.0",
15+
"packages/telemetry/node-server-sdk-otel": "1.0.15",
16+
"packages/sdk/browser": "0.0.1"
1617
}

packages/sdk/akamai-base/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ All notable changes to the LaunchDarkly SDK for Akamai Workers will be documente
3030
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.1.1 to ^1.1.2
3131
* @launchdarkly/js-server-sdk-common bumped from ^2.2.1 to ^2.2.2
3232

33+
## [2.1.17](https://github.com/launchdarkly/js-core/compare/akamai-server-base-sdk-v2.1.16...akamai-server-base-sdk-v2.1.17) (2024-10-09)
34+
35+
36+
### Dependencies
37+
38+
* The following workspace dependencies were updated
39+
* dependencies
40+
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.2.0 to ^1.2.1
41+
* @launchdarkly/js-server-sdk-common bumped from ^2.7.0 to ^2.8.0
42+
3343
## [2.1.16](https://github.com/launchdarkly/js-core/compare/akamai-server-base-sdk-v2.1.15...akamai-server-base-sdk-v2.1.16) (2024-09-26)
3444

3545

packages/sdk/akamai-base/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@launchdarkly/akamai-server-base-sdk",
3-
"version": "2.1.16",
3+
"version": "2.1.17",
44
"description": "Akamai LaunchDarkly EdgeWorker SDK",
55
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/akamai-base",
66
"repository": {
@@ -73,7 +73,7 @@
7373
"typescript": "5.1.6"
7474
},
7575
"dependencies": {
76-
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.2.0",
77-
"@launchdarkly/js-server-sdk-common": "^2.7.0"
76+
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.2.1",
77+
"@launchdarkly/js-server-sdk-common": "^2.8.0"
7878
}
7979
}

packages/sdk/akamai-edgekv/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ All notable changes to the LaunchDarkly SDK for Akamai Workers will be documente
3131
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.1.1 to ^1.1.2
3232
* @launchdarkly/js-server-sdk-common bumped from ^2.2.1 to ^2.2.2
3333

34+
## [1.1.17](https://github.com/launchdarkly/js-core/compare/akamai-server-edgekv-sdk-v1.1.16...akamai-server-edgekv-sdk-v1.1.17) (2024-10-09)
35+
36+
37+
### Dependencies
38+
39+
* The following workspace dependencies were updated
40+
* dependencies
41+
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.2.0 to ^1.2.1
42+
* @launchdarkly/js-server-sdk-common bumped from ^2.7.0 to ^2.8.0
43+
3444
## [1.1.16](https://github.com/launchdarkly/js-core/compare/akamai-server-edgekv-sdk-v1.1.15...akamai-server-edgekv-sdk-v1.1.16) (2024-09-26)
3545

3646

packages/sdk/akamai-edgekv/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@launchdarkly/akamai-server-edgekv-sdk",
3-
"version": "1.1.16",
3+
"version": "1.1.17",
44
"description": "Akamai LaunchDarkly EdgeWorker SDK for EdgeKV feature store",
55
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/akamai-edgekv",
66
"repository": {
@@ -73,7 +73,7 @@
7373
"typescript": "5.1.6"
7474
},
7575
"dependencies": {
76-
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.2.0",
77-
"@launchdarkly/js-server-sdk-common": "^2.7.0"
76+
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.2.1",
77+
"@launchdarkly/js-server-sdk-common": "^2.8.0"
7878
}
7979
}

packages/sdk/akamai-edgekv/src/edgekv/edgeKVProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ type EdgeKVProviderParams = {
88
};
99

1010
export default class EdgeKVProvider implements EdgeProvider {
11-
private edgeKv: EdgeKV;
11+
private _edgeKv: EdgeKV;
1212

1313
constructor({ namespace, group }: EdgeKVProviderParams) {
14-
this.edgeKv = new EdgeKV({ namespace, group } as any);
14+
this._edgeKv = new EdgeKV({ namespace, group } as any);
1515
}
1616

1717
async get(rootKey: string): Promise<string | null | undefined> {
1818
try {
19-
return await this.edgeKv.getText({ item: rootKey } as any);
19+
return await this._edgeKv.getText({ item: rootKey } as any);
2020
} catch (e) {
2121
/* empty */
2222
}

packages/sdk/browser/CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
## 0.0.1 (2024-10-10)
4+
5+
6+
### Features
7+
8+
* Add basic secure mode support for browser SDK. ([#598](https://github.com/launchdarkly/js-core/issues/598)) ([3389983](https://github.com/launchdarkly/js-core/commit/33899830781affbe986f3bb9df35e5c908884f99))
9+
* Add bootstrap support. ([#600](https://github.com/launchdarkly/js-core/issues/600)) ([4e5dbee](https://github.com/launchdarkly/js-core/commit/4e5dbee48d6bb236b5febd872c910e809058a012))
10+
* Add browser info. ([#576](https://github.com/launchdarkly/js-core/issues/576)) ([a2f4398](https://github.com/launchdarkly/js-core/commit/a2f439813171527e05f5863afbda3fcb93fedb47))
11+
* Add ESM support for common and common-client (rollup) ([#604](https://github.com/launchdarkly/js-core/issues/604)) ([8cd0cdc](https://github.com/launchdarkly/js-core/commit/8cd0cdce988f606b1efdf6bfd19484f6607db2e5))
12+
* Add support for browser contract tests. ([#582](https://github.com/launchdarkly/js-core/issues/582)) ([38f081e](https://github.com/launchdarkly/js-core/commit/38f081ebf04c68123cf83addefbcbfec692cac16))
13+
* Add support for hooks. ([#605](https://github.com/launchdarkly/js-core/issues/605)) ([04d347b](https://github.com/launchdarkly/js-core/commit/04d347b25e01015134a2545be22bfd8b1d1e85cc))
14+
* Add support for js-client-sdk style initialization. ([53f5bb8](https://github.com/launchdarkly/js-core/commit/53f5bb89754ff05405d481a959e75742fbd0d0a9))
15+
* Add support for localStorage for the browser platform. ([#566](https://github.com/launchdarkly/js-core/issues/566)) ([4792391](https://github.com/launchdarkly/js-core/commit/4792391d1ae06f5d5afc7f7ab56608df6b1909c4))
16+
* Add URLs for custom events and URL filtering. ([#587](https://github.com/launchdarkly/js-core/issues/587)) ([7131e69](https://github.com/launchdarkly/js-core/commit/7131e6905f19cc10a1374aae5e74cec66c7fd6de))
17+
* Add visibility handling to allow proactive event flushing. ([#607](https://github.com/launchdarkly/js-core/issues/607)) ([819a311](https://github.com/launchdarkly/js-core/commit/819a311db6f56e323bb84c925789ad4bd19ae4ba))
18+
* adds datasource status to sdk-client ([#590](https://github.com/launchdarkly/js-core/issues/590)) ([6f26204](https://github.com/launchdarkly/js-core/commit/6f262045b76836e5d2f5ccc2be433094993fcdbb))
19+
* Adds support for REPORT. ([#575](https://github.com/launchdarkly/js-core/issues/575)) ([916b724](https://github.com/launchdarkly/js-core/commit/916b72409b63abdf350e70cca41331c4204b6e95))
20+
* Browser-SDK Automatically start streaming based on event handlers. ([#592](https://github.com/launchdarkly/js-core/issues/592)) ([f2e5cbf](https://github.com/launchdarkly/js-core/commit/f2e5cbf1d0b3ae39a95881fecdcbefc11e9d0363))
21+
* Implement browser crypto and encoding. ([#574](https://github.com/launchdarkly/js-core/issues/574)) ([e763e5d](https://github.com/launchdarkly/js-core/commit/e763e5d2e53329c0f86b93544af85ca7a94e7936))
22+
* Implement goals for client-side SDKs. ([#585](https://github.com/launchdarkly/js-core/issues/585)) ([fd38a8f](https://github.com/launchdarkly/js-core/commit/fd38a8fa8560dad0c6721c2eaeed2f3f5c674900))
23+
* Implement support for browser requests. ([#578](https://github.com/launchdarkly/js-core/issues/578)) ([887548a](https://github.com/launchdarkly/js-core/commit/887548a29e22a618d44a6941c175f33402e331bf))
24+
* Refactor data source connection handling. ([53f5bb8](https://github.com/launchdarkly/js-core/commit/53f5bb89754ff05405d481a959e75742fbd0d0a9))
25+
* Scaffold browser client. ([#579](https://github.com/launchdarkly/js-core/issues/579)) ([0848ab7](https://github.com/launchdarkly/js-core/commit/0848ab790903f8fcdc717de6c426e4948abe51c4))
26+
27+
28+
### Bug Fixes
29+
30+
* Ensure browser contract tests run during top-level build. ([#589](https://github.com/launchdarkly/js-core/issues/589)) ([7dfb14d](https://github.com/launchdarkly/js-core/commit/7dfb14de1757b66d9f876b25d4c1262e8f8b70c9))
31+
* Ensure client logger is always wrapped in a safe logger. ([#599](https://github.com/launchdarkly/js-core/issues/599)) ([980e4da](https://github.com/launchdarkly/js-core/commit/980e4daaf32864e18f14b1e5e28e308dff0ae94f))

packages/sdk/browser/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
[![NPM][browser-sdk-dt-badge]][browser-sdk-npm-link]
99
-->
1010

11+
# ⛔️⛔️⛔️⛔️
12+
1113
> [!CAUTION]
12-
> This library is a beta version and should not be considered ready for production use while this message is visible.
14+
> This library is a alpha version and should not be considered ready for production use while this message is visible.
15+
16+
# ☝️☝️☝️☝️☝️☝️
1317

1418
<!--
1519
## Install

0 commit comments

Comments
 (0)