Skip to content

Commit

Permalink
Merge branch 'main' into ta/sc-249239/data-source-status-rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
tanderson-ld authored Sep 26, 2024
2 parents 1c24e1b + 79d0b3f commit 8dd7590
Show file tree
Hide file tree
Showing 34 changed files with 270 additions and 47 deletions.
28 changes: 14 additions & 14 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"packages/shared/common": "2.8.0",
"packages/shared/sdk-server": "2.6.1",
"packages/sdk/server-node": "9.5.4",
"packages/sdk/cloudflare": "2.5.13",
"packages/shared/sdk-server-edge": "2.3.9",
"packages/sdk/vercel": "1.3.16",
"packages/sdk/akamai-base": "2.1.15",
"packages/sdk/akamai-edgekv": "1.1.15",
"packages/shared/akamai-edgeworker-sdk": "1.1.15",
"packages/store/node-server-sdk-dynamodb": "6.1.21",
"packages/store/node-server-sdk-redis": "4.1.21",
"packages/shared/sdk-client": "1.7.0",
"packages/sdk/react-native": "10.6.1",
"packages/telemetry/node-server-sdk-otel": "1.0.13"
"packages/shared/common": "2.9.0",
"packages/shared/sdk-server": "2.7.0",
"packages/sdk/server-node": "9.6.0",
"packages/sdk/cloudflare": "2.5.14",
"packages/shared/sdk-server-edge": "2.4.0",
"packages/sdk/vercel": "1.3.17",
"packages/sdk/akamai-base": "2.1.16",
"packages/sdk/akamai-edgekv": "1.1.16",
"packages/shared/akamai-edgeworker-sdk": "1.2.0",
"packages/store/node-server-sdk-dynamodb": "6.1.22",
"packages/store/node-server-sdk-redis": "4.1.22",
"packages/shared/sdk-client": "1.8.0",
"packages/sdk/react-native": "10.7.0",
"packages/telemetry/node-server-sdk-otel": "1.0.14"
}
10 changes: 10 additions & 0 deletions packages/sdk/akamai-base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ All notable changes to the LaunchDarkly SDK for Akamai Workers will be documente
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.1.1 to ^1.1.2
* @launchdarkly/js-server-sdk-common bumped from ^2.2.1 to ^2.2.2

## [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)


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.1.15 to ^1.2.0
* @launchdarkly/js-server-sdk-common bumped from ^2.6.1 to ^2.7.0

## [2.1.15](https://github.com/launchdarkly/js-core/compare/akamai-server-base-sdk-v2.1.14...akamai-server-base-sdk-v2.1.15) (2024-09-05)


Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/akamai-base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/akamai-server-base-sdk",
"version": "2.1.15",
"version": "2.1.16",
"description": "Akamai LaunchDarkly EdgeWorker SDK",
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/akamai-base",
"repository": {
Expand Down Expand Up @@ -73,7 +73,7 @@
"typescript": "5.1.6"
},
"dependencies": {
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.1.15",
"@launchdarkly/js-server-sdk-common": "^2.6.1"
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.2.0",
"@launchdarkly/js-server-sdk-common": "^2.7.0"
}
}
10 changes: 10 additions & 0 deletions packages/sdk/akamai-edgekv/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ All notable changes to the LaunchDarkly SDK for Akamai Workers will be documente
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.1.1 to ^1.1.2
* @launchdarkly/js-server-sdk-common bumped from ^2.2.1 to ^2.2.2

## [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)


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.1.15 to ^1.2.0
* @launchdarkly/js-server-sdk-common bumped from ^2.6.1 to ^2.7.0

## [1.1.15](https://github.com/launchdarkly/js-core/compare/akamai-server-edgekv-sdk-v1.1.14...akamai-server-edgekv-sdk-v1.1.15) (2024-09-05)


Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/akamai-edgekv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/akamai-server-edgekv-sdk",
"version": "1.1.15",
"version": "1.1.16",
"description": "Akamai LaunchDarkly EdgeWorker SDK for EdgeKV feature store",
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/akamai-edgekv",
"repository": {
Expand Down Expand Up @@ -73,7 +73,7 @@
"typescript": "5.1.6"
},
"dependencies": {
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.1.15",
"@launchdarkly/js-server-sdk-common": "^2.6.1"
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.2.0",
"@launchdarkly/js-server-sdk-common": "^2.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/sdk/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"check": "yarn prettier && yarn lint && yarn build && yarn test"
},
"dependencies": {
"@launchdarkly/js-client-sdk-common": "1.7.0",
"@launchdarkly/js-client-sdk-common": "1.8.0",
"escape-string-regexp": "^5.0.0"
},
"devDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions packages/sdk/cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ All notable changes to the LaunchDarkly SDK for Cloudflare Workers will be docum
* devDependencies
* @launchdarkly/js-server-sdk-common-edge bumped from 2.2.1 to 2.2.2

## [2.5.14](https://github.com/launchdarkly/js-core/compare/cloudflare-server-sdk-v2.5.13...cloudflare-server-sdk-v2.5.14) (2024-09-26)


### Dependencies

* The following workspace dependencies were updated
* devDependencies
* @launchdarkly/js-server-sdk-common-edge bumped from 2.3.9 to 2.4.0

## [2.5.13](https://github.com/launchdarkly/js-core/compare/cloudflare-server-sdk-v2.5.12...cloudflare-server-sdk-v2.5.13) (2024-09-05)


Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/cloudflare/jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/cloudflare-server-sdk",
"version": "2.5.13",
"version": "2.5.14",
"exports": "./src/index.ts",
"publish": {
"include": [
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/cloudflare-server-sdk",
"version": "2.5.13",
"version": "2.5.14",
"description": "Cloudflare LaunchDarkly SDK",
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/cloudflare",
"repository": {
Expand Down Expand Up @@ -44,7 +44,7 @@
"crypto-js": "^4.1.1"
},
"devDependencies": {
"@launchdarkly/js-server-sdk-common-edge": "2.3.9",
"@launchdarkly/js-server-sdk-common-edge": "2.4.0",
"@rollup/plugin-commonjs": "^25.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/cloudflare/src/createPlatformInfo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Info, PlatformData, SdkData } from '@launchdarkly/js-server-sdk-common-edge';

const name = '@launchdarkly/cloudflare-server-sdk';
const version = '2.5.13'; // x-release-please-version
const version = '2.5.14'; // x-release-please-version

class CloudflarePlatformInfo implements Info {
platformData(): PlatformData {
Expand Down
17 changes: 17 additions & 0 deletions packages/sdk/react-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [10.7.0](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.6.1...react-native-client-sdk-v10.7.0) (2024-09-26)


### Features

* Add support for conditional event source capabilities. ([#577](https://github.com/launchdarkly/js-core/issues/577)) ([fe82500](https://github.com/launchdarkly/js-core/commit/fe82500f28cf8d8311502098aa6cc2e73932064e))
* Add support for js-client-sdk style initialization. ([53f5bb8](https://github.com/launchdarkly/js-core/commit/53f5bb89754ff05405d481a959e75742fbd0d0a9))
* Adds support for REPORT. ([#575](https://github.com/launchdarkly/js-core/issues/575)) ([916b724](https://github.com/launchdarkly/js-core/commit/916b72409b63abdf350e70cca41331c4204b6e95))
* Refactor data source connection handling. ([53f5bb8](https://github.com/launchdarkly/js-core/commit/53f5bb89754ff05405d481a959e75742fbd0d0a9))


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @launchdarkly/js-client-sdk-common bumped from 1.7.0 to 1.8.0

## [10.6.1](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.6.0...react-native-client-sdk-v10.6.1) (2024-09-03)


Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/react-native-client-sdk",
"version": "10.6.1",
"version": "10.7.0",
"description": "React Native LaunchDarkly SDK",
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/react-native",
"repository": {
Expand Down Expand Up @@ -41,7 +41,7 @@
"react-native": "*"
},
"dependencies": {
"@launchdarkly/js-client-sdk-common": "1.7.0",
"@launchdarkly/js-client-sdk-common": "1.8.0",
"@react-native-async-storage/async-storage": "^1.21.0",
"base64-js": "^1.5.1"
},
Expand Down
14 changes: 14 additions & 0 deletions packages/sdk/server-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to `@launchdarkly/node-server-sdk` will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [9.6.0](https://github.com/launchdarkly/js-core/compare/node-server-sdk-v9.5.4...node-server-sdk-v9.6.0) (2024-09-26)


### Features

* Add support for conditional event source capabilities. ([#577](https://github.com/launchdarkly/js-core/issues/577)) ([fe82500](https://github.com/launchdarkly/js-core/commit/fe82500f28cf8d8311502098aa6cc2e73932064e))


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @launchdarkly/js-server-sdk-common bumped from 2.6.1 to 2.7.0

## [9.5.4](https://github.com/launchdarkly/js-core/compare/node-server-sdk-v9.5.3...node-server-sdk-v9.5.4) (2024-09-05)


Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/server-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/node-server-sdk",
"version": "9.5.4",
"version": "9.6.0",
"description": "LaunchDarkly Server-Side SDK for Node.js",
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/server-node",
"repository": {
Expand Down Expand Up @@ -45,7 +45,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@launchdarkly/js-server-sdk-common": "2.6.1",
"@launchdarkly/js-server-sdk-common": "2.7.0",
"https-proxy-agent": "^5.0.1",
"launchdarkly-eventsource": "2.0.3"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/sdk/vercel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ All notable changes to the LaunchDarkly SDK for Vercel Edge Config will be docum
* dependencies
* @launchdarkly/js-server-sdk-common-edge bumped from 2.2.1 to 2.2.2

## [1.3.17](https://github.com/launchdarkly/js-core/compare/vercel-server-sdk-v1.3.16...vercel-server-sdk-v1.3.17) (2024-09-26)


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @launchdarkly/js-server-sdk-common-edge bumped from 2.3.9 to 2.4.0

## [1.3.16](https://github.com/launchdarkly/js-core/compare/vercel-server-sdk-v1.3.15...vercel-server-sdk-v1.3.16) (2024-09-05)


Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/vercel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/vercel-server-sdk",
"version": "1.3.16",
"version": "1.3.17",
"description": "LaunchDarkly Server-Side SDK for Vercel Edge",
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/vercel",
"repository": {
Expand Down Expand Up @@ -36,7 +36,7 @@
"check": "yarn prettier && yarn lint && yarn build && yarn test"
},
"dependencies": {
"@launchdarkly/js-server-sdk-common-edge": "2.3.9",
"@launchdarkly/js-server-sdk-common-edge": "2.4.0",
"@vercel/edge-config": "^1.1.0",
"crypto-js": "^4.1.1"
},
Expand Down
14 changes: 14 additions & 0 deletions packages/shared/akamai-edgeworker-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ All notable changes to the LaunchDarkly SDK for Akamai Workers will be documente
* dependencies
* @launchdarkly/js-server-sdk-common bumped from ^2.2.1 to ^2.2.2

## [1.2.0](https://github.com/launchdarkly/js-core/compare/akamai-edgeworker-sdk-common-v1.1.15...akamai-edgeworker-sdk-common-v1.2.0) (2024-09-26)


### Features

* Add support for conditional event source capabilities. ([#577](https://github.com/launchdarkly/js-core/issues/577)) ([fe82500](https://github.com/launchdarkly/js-core/commit/fe82500f28cf8d8311502098aa6cc2e73932064e))


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @launchdarkly/js-server-sdk-common bumped from ^2.6.1 to ^2.7.0

## [1.1.15](https://github.com/launchdarkly/js-core/compare/akamai-edgeworker-sdk-common-v1.1.14...akamai-edgeworker-sdk-common-v1.1.15) (2024-09-05)


Expand Down
4 changes: 2 additions & 2 deletions packages/shared/akamai-edgeworker-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/akamai-edgeworker-sdk-common",
"version": "1.1.15",
"version": "1.2.0",
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/shared/akamai-edge-sdk",
"repository": {
"type": "git",
Expand Down Expand Up @@ -55,7 +55,7 @@
"typescript": "5.1.6"
},
"dependencies": {
"@launchdarkly/js-server-sdk-common": "^2.6.1",
"@launchdarkly/js-server-sdk-common": "^2.7.0",
"crypto-js": "^4.1.1"
}
}
17 changes: 17 additions & 0 deletions packages/shared/common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

All notable changes to `@launchdarkly/js-sdk-common` will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [2.9.0](https://github.com/launchdarkly/js-core/compare/js-sdk-common-v2.8.0...js-sdk-common-v2.9.0) (2024-09-26)


### Features

* Add platform support for async hashing. ([#573](https://github.com/launchdarkly/js-core/issues/573)) ([9248035](https://github.com/launchdarkly/js-core/commit/9248035a88fba1c7375c5df22ef6b4a80a867983))
* Add support for conditional event source capabilities. ([#577](https://github.com/launchdarkly/js-core/issues/577)) ([fe82500](https://github.com/launchdarkly/js-core/commit/fe82500f28cf8d8311502098aa6cc2e73932064e))
* 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))
* Adds support for REPORT. ([#575](https://github.com/launchdarkly/js-core/issues/575)) ([916b724](https://github.com/launchdarkly/js-core/commit/916b72409b63abdf350e70cca41331c4204b6e95))
* Allow using custom user-agent name. ([#580](https://github.com/launchdarkly/js-core/issues/580)) ([ed5a206](https://github.com/launchdarkly/js-core/commit/ed5a206c86f496942664dd73f6f8a7c602a1de28))
* Implement goals for client-side SDKs. ([#585](https://github.com/launchdarkly/js-core/issues/585)) ([fd38a8f](https://github.com/launchdarkly/js-core/commit/fd38a8fa8560dad0c6721c2eaeed2f3f5c674900))


### Bug Fixes

* Multi-kind context containing only 1 kind conveted incorrectly. ([#594](https://github.com/launchdarkly/js-core/issues/594)) ([b6ff2a6](https://github.com/launchdarkly/js-core/commit/b6ff2a67db9f9a24da4a45ad88fa7f2a22fb635d))

## [2.8.0](https://github.com/launchdarkly/js-core/compare/js-sdk-common-v2.7.0...js-sdk-common-v2.8.0) (2024-09-03)


Expand Down
33 changes: 33 additions & 0 deletions packages/shared/common/__tests__/ContextFilter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,23 @@ describe('when handling mult-kind contexts', () => {
},
};

const multiWithSingleContext = Context.fromLDContext({
kind: 'multi',
user: {
key: 'abc',
name: 'alphabet',
letters: ['a', 'b', 'c'],
order: 3,
object: {
a: 'a',
b: 'b',
},
_meta: {
privateAttributes: ['letters', '/object/b'],
},
},
});

it('it should remove attributes from all contexts when all attributes are private.', () => {
const uf = new ContextFilter(true, []);
expect(uf.filter(orgAndUserContext)).toEqual(orgAndUserContextAllPrivate);
Expand All @@ -430,4 +447,20 @@ describe('when handling mult-kind contexts', () => {
const uf = new ContextFilter(false, [new AttributeReference('name', true)]);
expect(uf.filter(orgAndUserContext)).toEqual(orgAndUserGlobalNamePrivate);
});

it('should produce event with valid single context', () => {
const uf = new ContextFilter(false, []);
expect(uf.filter(multiWithSingleContext)).toEqual({
kind: 'user',
_meta: {
redactedAttributes: ['/object/b', 'letters'],
},
key: 'abc',
name: 'alphabet',
object: {
a: 'a',
},
order: 3,
});
});
});
2 changes: 1 addition & 1 deletion packages/shared/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchdarkly/js-sdk-common",
"version": "2.8.0",
"version": "2.9.0",
"type": "commonjs",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/common/src/Context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export default class Context {
if (kinds.length === 1) {
const kind = kinds[0];
const created = new Context(true, kind);
created.context = contexts[kind];
created.context = { ...contexts[kind], kind };
created.privateAttributeReferences = privateAttributes;
created.isUser = kind === 'user';
return created;
Expand Down
Loading

0 comments on commit 8dd7590

Please sign in to comment.