diff --git a/README.md b/README.md
index f06958473..fdbf95a13 100644
--- a/README.md
+++ b/README.md
@@ -7,15 +7,17 @@ This includes shared libraries, used by SDKs and other tools, as well as SDKs.
| SDK packages | npm | issues | tests |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------- | --------------------------------------------------------------------- |
+| [@launchdarkly/akamai-server-base-sdk](packages/sdk/akamai-base/README.md) | [![NPM][sdk-akamai-base-npm-badge]][sdk-akamai-base-npm-link] | [Akamai Base][package-sdk-akamai-base-issues] | [![Actions Status][sdk-akamai-base-ci-badge]][sdk-akamai-base-ci] |
+| [@launchdarkly/akamai-server-edgekv-sdk](packages/sdk/akamai-edgekv/README.md) | [![NPM][sdk-akamai-edgekv-npm-badge]][sdk-akamai-edgekv-npm-link] | [Akamai EdgeKV][package-sdk-akamai-edgekv-issues] | [![Actions Status][sdk-akamai-edgekv-ci-badge]][sdk-akamai-edgekv-ci] |
| [@launchdarkly/cloudflare-server-sdk](packages/sdk/cloudflare/README.md) | [![NPM][sdk-cloudflare-npm-badge]][sdk-cloudflare-npm-link] | [Cloudflare][package-sdk-cloudflare-issues] | [![Actions Status][sdk-cloudflare-ci-badge]][sdk-cloudflare-ci] |
| [@launchdarkly/node-server-sdk](packages/sdk/server-node/README.md) | [![NPM][sdk-server-node-npm-badge]][sdk-server-node-npm-link] | [Node.js Server][package-sdk-server-node-issues] | [![Actions Status][sdk-server-node-ci-badge]][sdk-server-node-ci] |
| [@launchdarkly/vercel-server-sdk](packages/sdk/vercel/README.md) | [![NPM][sdk-vercel-npm-badge]][sdk-vercel-npm-link] | [Vercel][package-sdk-vercel-issues] | [![Actions Status][sdk-vercel-ci-badge]][sdk-vercel-ci] |
-| [@launchdarkly/akamai-server-base-sdk](packages/sdk/akamai-base/README.md) | [![NPM][sdk-akamai-base-npm-badge]][sdk-akamai-base-npm-link] | [Akamai Base][package-sdk-akamai-base-issues] | [![Actions Status][sdk-akamai-base-ci-badge]][sdk-akamai-base-ci] |
-| [@launchdarkly/akamai-server-edgekv-sdk](packages/sdk/akamai-edgekv/README.md) | [![NPM][sdk-akamai-edgekv-npm-badge]][sdk-akamai-edgekv-npm-link] | [Akamai EdgeKV][package-sdk-akamai-edgekv-issues] | [![Actions Status][sdk-akamai-edgekv-ci-badge]][sdk-akamai-edgekv-ci] |
+| [@launchdarkly/react-native-client-sdk](packages/sdk/react-native/README.md) | [![NPM][sdk-react-native-npm-badge]][sdk-react-native-npm-link] | [React-Native][package-sdk-react-native-issues] | [![Actions Status][sdk-react-native-ci-badge]][sdk-react-native-ci] |
| Shared packages | npm | issues | tests |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [@launchdarkly/js-sdk-common](packages/shared/common/README.md) | [![NPM][common-npm-badge]][common-npm-link] | [Common][package-shared-common-issues] | [![Actions Status][shared-common-ci-badge]][shared-common-ci] |
+| [@launchdarkly/js-client-sdk-common](packages/shared/sdk-client/README.md) | [![NPM][js-client-sdk-common-npm-badge]][js-client-sdk-common-npm-link] | [Common Client][package-shared-sdk-client-issues] | [![Actions Status][shared-sdk-client-ci-badge]][shared-sdk-client-ci] |
| [@launchdarkly/js-server-sdk-common](packages/shared/sdk-server/README.md) | [![NPM][js-server-sdk-common-npm-badge]][js-server-sdk-common-npm-link] | [Common Server][package-shared-sdk-server-issues] | [![Actions Status][shared-sdk-server-ci-badge]][shared-sdk-server-ci] |
| [@launchdarkly/js-server-sdk-common-edge](packages/shared/sdk-server-edge/README.md) | [![NPM][js-server-sdk-common-edge-badge]][js-server-sdk-common-edge-link] | [Common Server Edge][package-shared-sdk-server-edge-issues] | [![Actions Status][shared-sdk-server-edge-ci-badge]][shared-sdk-server-edge-ci] |
@@ -74,6 +76,12 @@ We encourage pull requests and other contributions from the community. Check out
[shared-sdk-server-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/sdk-server.yml/badge.svg
[shared-sdk-server-ci]: https://github.com/launchdarkly/js-core/actions/workflows/sdk-server.yml
[package-shared-sdk-server-issues]: https://github.com/launchdarkly/js-core/issues?q=is%3Aissue+is%3Aopen+label%3A%22package%3A+shared%2Fsdk-server%22+
+[//]: # 'shared/sdk-client'
+[js-client-sdk-common-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/js-client-sdk-common.svg?style=flat-square
+[js-client-sdk-common-npm-link]: https://www.npmjs.com/package/@launchdarkly/js-client-sdk-common
+[shared-sdk-client-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/sdk-client.yml/badge.svg
+[shared-sdk-client-ci]: https://github.com/launchdarkly/js-core/actions/workflows/sdk-client.yml
+[package-shared-sdk-client-issues]: https://github.com/launchdarkly/js-core/issues?q=is%3Aissue+is%3Aopen+label%3A%22package%3A+shared%2Fsdk-client%22+
[//]: # 'shared/sdk-server-edge'
[js-server-sdk-common-edge-badge]: https://img.shields.io/npm/v/@launchdarkly/js-server-sdk-common-edge.svg?style=flat-square
[js-server-sdk-common-edge-link]: https://www.npmjs.com/package/@launchdarkly/js-server-sdk-common-edge
@@ -106,6 +114,16 @@ We encourage pull requests and other contributions from the community. Check out
[sdk-vercel-dm-badge]: https://img.shields.io/npm/dm/@launchdarkly/vercel-server-sdk.svg?style=flat-square
[sdk-vercel-dt-badge]: https://img.shields.io/npm/dt/@launchdarkly/vercel-server-sdk.svg?style=flat-square
[package-sdk-vercel-issues]: https://github.com/launchdarkly/js-core/issues?q=is%3Aissue+is%3Aopen+label%3A%22package%3A+sdk%2Fvercel%22+
+[//]: # 'sdk/react-native'
+[sdk-react-native-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/react-native.yml/badge.svg
+[sdk-react-native-ci]: https://github.com/launchdarkly/js-core/actions/workflows/react-native.yml
+[sdk-react-native-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/react-native-client-sdk.svg?style=flat-square
+[sdk-react-native-npm-link]: https://www.npmjs.com/package/@launchdarkly/react-native-client-sdk
+[sdk-react-native-ghp-badge]: https://img.shields.io/static/v1?label=GitHub+Pages&message=API+reference&color=00add8
+[sdk-react-native-ghp-link]: https://launchdarkly.github.io/js-core/packages/sdk/react-native/docs/
+[sdk-react-native-dm-badge]: https://img.shields.io/npm/dm/@launchdarkly/react-native-client-sdk.svg?style=flat-square
+[sdk-react-native-dt-badge]: https://img.shields.io/npm/dt/@launchdarkly/react-native-client-sdk.svg?style=flat-square
+[package-sdk-react-native-issues]: https://github.com/launchdarkly/js-core/issues?q=is%3Aissue+is%3Aopen+label%3A%22package%3A+sdk%2Freact-native%22+
[//]: # 'sdk/akamai-base'
[sdk-akamai-base-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/akamai-base.yml/badge.svg
[sdk-akamai-base-ci]: https://github.com/launchdarkly/js-core/actions/workflows/akamai-base.yml
diff --git a/package.json b/package.json
index e56b47fb6..889759b45 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,7 @@
"scripts": {
"clean": "yarn workspaces foreach -pt run clean",
"build": "yarn workspaces foreach -p --topological-dev run build",
- "//": "When using build:doc you need to specify the workspace. 'yarn run build:doc packages/shared/common' for example.",
+ "//": "When using build:doc you need to specify the workspace. 'yarn run build:doc -- packages/shared/common' for example.",
"build:doc": "npx typedoc --options $1/typedoc.json",
"lint": "npx eslint . --ext .ts",
"lint:fix": "yarn run lint -- --fix",
diff --git a/packages/sdk/react-native/README.md b/packages/sdk/react-native/README.md
index ce43eecb1..2c071f028 100644
--- a/packages/sdk/react-native/README.md
+++ b/packages/sdk/react-native/README.md
@@ -6,17 +6,15 @@
[![NPM][sdk-react-native-dm-badge]][sdk-react-native-npm-link]
[![NPM][sdk-react-native-dt-badge]][sdk-react-native-npm-link]
-> [!WARNING]
-> UNSUPPORTED This SDK is in pre-release development and is not supported.
+The LaunchDarkly React Native SDK is designed primarily for use in mobile environments. It follows the client-side
+LaunchDarkly model for multi-user contexts.
-The LaunchDarkly React Native SDK is designed primarily for use in mobile environments. It follows the client-side LaunchDarkly model for multi-user contexts.
-
-This SDK is a replacement of [launchdarkly-react-native-client-sdk](https://github.com/launchdarkly/react-native-client-sdk). Please consider updating your application to use this package instead.
+This SDK is a complete rewrite of the React Native SDK and replaces [launchdarkly-react-native-client-sdk](https://github.com/launchdarkly/react-native-client-sdk). The
+APIs are based on the JS SDK rather than the iOS and Android SDKs. It is not a wrapper of the iOS and Android SDKs.
+It is implemented purely in JS and supports Expo. Please consider updating your application to use this package instead.
For more information, see the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/react-native).
-This library is an alpha version and should not be considered ready for production use while this message is visible.
-
## Install
```shell
@@ -35,21 +33,27 @@ and re-run pod install for [auto-linking to work](https://github.com/react-nativ
## Quickstart
-1. Wrap your application with `LDProvider` passing it an LDClient and
- an LDContext:
+1. Wrap your application with `LDProvider` and set the `client` prop to an instance of `ReactNativeLDClient`. Call
+ `identify` at a later time to get flags. In the example below, `identify` is called on App mount:
-```jsx
+```tsx
// App.tsx
import { LDProvider, ReactNativeLDClient } from '@launchdarkly/react-native-client-sdk';
const featureClient = new ReactNativeLDClient('mobile-key', AutoEnvAttributes.Enabled);
const userContext = { kind: 'user', key: 'test-user-1' };
-const App = () => (
-
-
-
-);
+const App = () => {
+ useEffect(() => {
+ featureClient.identify(userContext).catch((e) => console.error(e));
+ }, []);
+
+ return (
+
+
+
+ );
+};
export default App;
```
diff --git a/packages/shared/sdk-client/README.md b/packages/shared/sdk-client/README.md
index 289a0b6a0..7ea3836c4 100644
--- a/packages/shared/sdk-client/README.md
+++ b/packages/shared/sdk-client/README.md
@@ -9,8 +9,6 @@
This project contains Typescript classes and interfaces that are applicable to client-side SDKs.
-This library is a beta version and should not be considered ready for production use while this message is visible.
-
## Contributing
See [Contributing](../CONTRIBUTING.md).
diff --git a/packages/shared/sdk-client/package.json b/packages/shared/sdk-client/package.json
index 6557b3c13..e6e55da1f 100644
--- a/packages/shared/sdk-client/package.json
+++ b/packages/shared/sdk-client/package.json
@@ -4,7 +4,7 @@
"type": "commonjs",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
- "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/shared/sdk-server",
+ "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/shared/sdk-client",
"repository": {
"type": "git",
"url": "https://github.com/launchdarkly/js-core.git"
diff --git a/packages/shared/sdk-client/src/LDClientImpl.test.ts b/packages/shared/sdk-client/src/LDClientImpl.test.ts
index 9736a8c97..eb939fcd8 100644
--- a/packages/shared/sdk-client/src/LDClientImpl.test.ts
+++ b/packages/shared/sdk-client/src/LDClientImpl.test.ts
@@ -74,7 +74,7 @@ describe('sdk-client object', () => {
diagnosticOptOut: false,
diagnosticRecordingInterval: 900,
eventsUri: 'https://events.launchdarkly.com',
- flushInterval: 2,
+ flushInterval: 30,
inspectors: [],
logger: {
destination: expect.any(Function),
diff --git a/packages/shared/sdk-client/src/api/ConnectionMode.ts b/packages/shared/sdk-client/src/api/ConnectionMode.ts
index 6c0b95df7..e30c67184 100644
--- a/packages/shared/sdk-client/src/api/ConnectionMode.ts
+++ b/packages/shared/sdk-client/src/api/ConnectionMode.ts
@@ -2,7 +2,6 @@
* The connection mode for the SDK to use.
*
* @remarks
- *
* The following connection modes are supported:
*
* offline - When the SDK is set offline it will stop receiving updates and will stop sending
diff --git a/packages/shared/sdk-client/src/api/LDClient.ts b/packages/shared/sdk-client/src/api/LDClient.ts
index 757b55d13..6e31aab3b 100644
--- a/packages/shared/sdk-client/src/api/LDClient.ts
+++ b/packages/shared/sdk-client/src/api/LDClient.ts
@@ -82,6 +82,9 @@ export interface LDClient {
/**
* Gets the SDK connection mode.
+ *
+ * @remarks
+ * Possible values are offline or streaming. See {@link ConnectionMode} for more information.
*/
getConnectionMode(): ConnectionMode;
@@ -146,9 +149,12 @@ export interface LDClient {
jsonVariationDetail(key: string, defaultValue: unknown): LDEvaluationDetailTyped;
/**
- * Returns the logger configured as part of LDOptions during construction.
+ * The logger configured as part of LDOptions during construction.
+ *
+ * @remarks
+ * For more information, read {@link LDOptions.logger} and {@link LDLogger}.
*
- * For more, read {@link LDOptions.logger}.
+ * @returns The configured {@link LDLogger}.
*/
logger: LDLogger;
@@ -169,6 +175,7 @@ export interface LDClient {
* Determines the numeric variation of a feature flag for a context, along with information about
* how it was calculated.
*
+ * @remarks
* The `reason` property of the result will also be included in analytics events, if you are
* capturing detailed event data for this flag.
*
@@ -199,16 +206,18 @@ export interface LDClient {
/**
* Registers an event listener.
*
- * The following event names (keys) are used by the client:
+ * @remarks
+ * You can subscribe to one of the supported {@link EventName}:
*
- * - `"error"`: General event for any kind of error condition during client operation.
- * The callback parameter is an Error object. If you do not listen for "error"
- * events, then the errors will be logged with `console.log()`.
* - `"change"`: The client has received new feature flag data. This can happen either
* because you have switched contexts with {@link identify}, or because the client has a
* stream connection and has received a live change to a flag value (see below).
* The callback parameters are the context and an array of flag keys that have changed.
*
+ * - `"error"`: General event for any kind of error condition during client operation.
+ * The callback parameters are the context and an Error object. Errors are also output by
+ * the {@link logger} at the error level.
+ *
* @param key
* The name of the event for which to listen.
* @param callback
@@ -220,7 +229,7 @@ export interface LDClient {
/**
* Sets the SDK connection mode.
*
- * @param mode - One of supported {@link ConnectionMode}. By default, the SDK uses 'streaming'.
+ * @param mode - One of supported {@link ConnectionMode}. By default, the SDK uses streaming.
*/
setConnectionMode(mode: ConnectionMode): void;
@@ -241,6 +250,7 @@ export interface LDClient {
* Determines the string variation of a feature flag for a context, along with information about
* how it was calculated.
*
+ * @remarks
* The `reason` property of the result will also be included in analytics events, if you are
* capturing detailed event data for this flag.
*
@@ -277,6 +287,7 @@ export interface LDClient {
* We recommend using strongly typed variation methods which perform
* type checks and handle type errors.
*
+ * @remarks
* Determines the variation of a feature flag.
*
* In the client-side JavaScript SDKs, this is always a fast synchronous operation because all of
@@ -295,6 +306,7 @@ export interface LDClient {
* We recommend using strongly typed variation detail methods which perform
* type checks and handle type errors.
*
+ * @remarks
* Determines the variation of a feature flag for a context, along with information about how it was
* calculated.
*
diff --git a/packages/shared/sdk-client/src/api/LDOptions.ts b/packages/shared/sdk-client/src/api/LDOptions.ts
index 116b05772..d79a10753 100644
--- a/packages/shared/sdk-client/src/api/LDOptions.ts
+++ b/packages/shared/sdk-client/src/api/LDOptions.ts
@@ -1,19 +1,21 @@
-import type { LDFlagSet, LDLogger } from '@launchdarkly/js-sdk-common';
+import type { LDLogger } from '@launchdarkly/js-sdk-common';
import ConnectionMode from './ConnectionMode';
-import type { LDInspection } from './LDInspection';
export interface LDOptions {
/**
* Whether all context attributes (except the context key) should be marked as private, and
* not sent to LaunchDarkly in analytics events.
*
- * By default, this is false.
+ * @defaultValue false.
*/
allAttributesPrivate?: boolean;
/**
- * Information about the application where the LaunchDarkly SDK is running.
+ * Information about the application the LaunchDarkly SDK is running in.
+ *
+ * These properties are optional and informational. They may be used in LaunchDarkly
+ * analytics or other product features.
*/
applicationInfo?: {
/**
@@ -53,19 +55,12 @@ export interface LDOptions {
};
/**
- * The base uri for the LaunchDarkly server.
+ * The base uri for the LaunchDarkly server. Most users should use the default value.
*
- * Most users should use the default value.
+ * @defaultValue https://clientsdk.launchdarkly.com.
*/
baseUri?: string;
- /**
- * TODO: bootstrap
- * The initial set of flags to use until the remote set is retrieved.
- * @alpha
- */
- bootstrap?: LDFlagSet;
-
/**
* The capacity of the analytics events queue.
*
@@ -76,14 +71,14 @@ export interface LDOptions {
* capacity if you are generating a large number of click, pageview, or identify events (or if you
* are using the event debugger).
*
- * The default value is 100.
+ * @defaultValue 100.
*/
capacity?: number;
/**
* Enables debug logging.
*
- * The default value is false.
+ * @defaultValue false.
*/
debug?: boolean;
@@ -95,6 +90,8 @@ export interface LDOptions {
* an initial payload containing some details of SDK in use, the SDK's configuration, and the platform the
* SDK is being run on, as well as payloads sent periodically with information on irregular occurrences such
* as dropped events.
+ *
+ * @defaultValue false.
*/
diagnosticOptOut?: boolean;
@@ -103,48 +100,42 @@ export interface LDOptions {
*
* The default is 900 (every 15 minutes) and the minimum value is 6. See {@link diagnosticOptOut}
* for more information on the diagnostics data being sent.
+ *
+ * @defaultValue 900s.
*/
diagnosticRecordingInterval?: number;
/**
- * The base uri for the LaunchDarkly events server.
+ * The base uri for the LaunchDarkly events server. Most users should use the default value.
*
- * Most users should use the default value.
+ * @defaultValue https://events.launchdarkly.com.
*/
eventsUri?: string;
/**
- * The interval in between flushes of the analytics events queue, in seconds.
+ * Controls how often the SDK flushes events.
*
- * The default value is 2s.
+ * @defaultValue 30s.
*/
flushInterval?: number;
- /**
- * TODO: secure mode
- * The signed context key for Secure Mode.
- * @alpha
- */
- hash?: string;
-
/**
* Sets the mode to use for connections when the SDK is initialized.
*
- * Defaults to streaming.
+ * @remarks
+ * Possible values are offline or streaming. See {@link ConnectionMode} for more information.
+ *
+ * @defaultValue streaming.
*/
initialConnectionMode?: ConnectionMode;
- /**
- * TODO: inspectors
- * Inspectors can be used for collecting information for monitoring, analytics, and debugging.
- * @alpha
- */
- inspectors?: LDInspection[];
-
/**
* An object that will perform logging for the client.
*
- * If not specified, the default is to use `basicLogger`.
+ * @remarks
+ * Set a custom {@link LDLogger} if you want full control of logging behavior.
+ *
+ * @defaultValue A {@link BasicLogger} which outputs to the console at `info` level.
*/
logger?: LDLogger;
@@ -168,7 +159,9 @@ export interface LDOptions {
privateAttributes?: Array;
/**
- * Whether to send analytics events back to LaunchDarkly. By default, this is true.
+ * Whether to send analytics events back to LaunchDarkly.
+ *
+ * @defaultValue true.
*/
sendEvents?: boolean;
@@ -179,14 +172,14 @@ export interface LDOptions {
* to be reestablished. The delay for the first reconnection will start near this value, and then
* increase exponentially for any subsequent connection failures.
*
- * The default value is 1.
+ * @defaultValue 1s.
*/
streamInitialReconnectDelay?: number;
/**
- * The base uri for the LaunchDarkly streaming server.
+ * The base uri for the LaunchDarkly streaming server. Most users should use the default value.
*
- * Most users should use the default value.
+ * @defaultValue https://clientstream.launchdarkly.com.
*/
streamUri?: string;
@@ -197,6 +190,8 @@ export interface LDOptions {
* The additional information will then be available through the client's
* {@link LDClient.variationDetail} method. Since this increases the size of network requests,
* such information is not sent unless you set this option to true.
+ *
+ * @defaultValue false.
*/
withReasons?: boolean;
diff --git a/packages/shared/sdk-client/src/configuration/Configuration.test.ts b/packages/shared/sdk-client/src/configuration/Configuration.test.ts
index bf409759d..a08b7a859 100644
--- a/packages/shared/sdk-client/src/configuration/Configuration.test.ts
+++ b/packages/shared/sdk-client/src/configuration/Configuration.test.ts
@@ -19,7 +19,7 @@ describe('Configuration', () => {
diagnosticRecordingInterval: 900,
withReasons: false,
eventsUri: 'https://events.launchdarkly.com',
- flushInterval: 2,
+ flushInterval: 30,
inspectors: [],
logger: {
destination: console.error,
diff --git a/packages/shared/sdk-client/src/configuration/Configuration.ts b/packages/shared/sdk-client/src/configuration/Configuration.ts
index 7df1b53e8..833c502d8 100644
--- a/packages/shared/sdk-client/src/configuration/Configuration.ts
+++ b/packages/shared/sdk-client/src/configuration/Configuration.ts
@@ -25,7 +25,7 @@ export default class Configuration {
public readonly capacity = 100;
public readonly diagnosticRecordingInterval = 900;
- public readonly flushInterval = 2;
+ public readonly flushInterval = 30;
public readonly streamInitialReconnectDelay = 1;
public readonly allAttributesPrivate = false;
diff --git a/packages/shared/sdk-client/src/configuration/validators.ts b/packages/shared/sdk-client/src/configuration/validators.ts
index d581e20dc..8cfd23628 100644
--- a/packages/shared/sdk-client/src/configuration/validators.ts
+++ b/packages/shared/sdk-client/src/configuration/validators.ts
@@ -43,6 +43,8 @@ const validators: Record = {
withReasons: TypeValidators.Boolean,
sendEvents: TypeValidators.Boolean,
+ // TODO: inspectors
+ // @ts-ignore
inspectors: TypeValidators.createTypeArray('LDInspection[]', {
type: 'flag-used',
method: noop,
@@ -51,9 +53,11 @@ const validators: Record = {
privateAttributes: TypeValidators.StringArray,
applicationInfo: TypeValidators.Object,
+ // TODO: bootstrap
bootstrap: new BootStrapValidator(),
wrapperName: TypeValidators.String,
wrapperVersion: TypeValidators.String,
+ // TODO: hash
hash: TypeValidators.String,
};
diff --git a/packages/shared/sdk-client/src/diagnostics/createDiagnosticsInitConfig.test.ts b/packages/shared/sdk-client/src/diagnostics/createDiagnosticsInitConfig.test.ts
index 576650cc1..aa70b134e 100644
--- a/packages/shared/sdk-client/src/diagnostics/createDiagnosticsInitConfig.test.ts
+++ b/packages/shared/sdk-client/src/diagnostics/createDiagnosticsInitConfig.test.ts
@@ -21,7 +21,7 @@ describe('createDiagnosticsInitConfig', () => {
customStreamURI: false,
diagnosticRecordingIntervalMillis: secondsToMillis(900),
eventsCapacity: 100,
- eventsFlushIntervalMillis: secondsToMillis(2),
+ eventsFlushIntervalMillis: secondsToMillis(30),
reconnectTimeMillis: secondsToMillis(1),
usingSecureMode: false,
});
@@ -34,25 +34,26 @@ describe('createDiagnosticsInitConfig', () => {
streamUri: 'https://stream.ld.com',
eventsUri: 'https://events.ld.com',
capacity: 1,
- flushInterval: 2,
+ flushInterval: 30,
streamInitialReconnectDelay: 3,
diagnosticRecordingInterval: 4,
allAttributesPrivate: true,
- hash: 'test-hash',
- bootstrap: { testFlag: true },
+ // TODO: test Configuration hash and bootstrap
+ // hash: 'test-hash',
+ // bootstrap: { testFlag: true },
}),
);
expect(custom).toEqual({
allAttributesPrivate: true,
- bootstrapMode: true,
+ bootstrapMode: false,
customBaseURI: true,
customEventsURI: true,
customStreamURI: true,
diagnosticRecordingIntervalMillis: 4000,
eventsCapacity: 1,
- eventsFlushIntervalMillis: 2000,
+ eventsFlushIntervalMillis: 30000,
reconnectTimeMillis: 3000,
- usingSecureMode: true,
+ usingSecureMode: false,
});
});
});
diff --git a/packages/shared/sdk-client/src/evaluation/fetchFlags.test.ts b/packages/shared/sdk-client/src/evaluation/fetchFlags.test.ts
index 7a3d995ad..07a6b9846 100644
--- a/packages/shared/sdk-client/src/evaluation/fetchFlags.test.ts
+++ b/packages/shared/sdk-client/src/evaluation/fetchFlags.test.ts
@@ -56,17 +56,18 @@ describe('fetchFeatures', () => {
expect(json).toEqual(mockResponseWithReasons);
});
- test('hash', async () => {
- config = new Configuration({ hash: 'test-hash', withReasons: false });
- const json = await fetchFlags(sdkKey, context, config, basicPlatform);
-
- expect(platformFetch).toHaveBeenCalledWith(
- 'https://clientsdk.launchdarkly.com/sdk/evalx/testSdkKey1/contexts/eyJraW5kIjoidXNlciIsImtleSI6InRlc3QtdXNlci1rZXktMSJ9?h=test-hash',
- {
- method: 'GET',
- headers: getHeaders,
- },
- );
- expect(json).toEqual(mockResponse);
- });
+ // TODO: test fetchFlags with hash
+ // test('hash', async () => {
+ // config = new Configuration({ hash: 'test-hash', withReasons: false });
+ // const json = await fetchFlags(sdkKey, context, config, basicPlatform);
+ //
+ // expect(platformFetch).toHaveBeenCalledWith(
+ // 'https://clientsdk.launchdarkly.com/sdk/evalx/testSdkKey1/contexts/eyJraW5kIjoidXNlciIsImtleSI6InRlc3QtdXNlci1rZXktMSJ9?h=test-hash',
+ // {
+ // method: 'GET',
+ // headers: getHeaders,
+ // },
+ // );
+ // expect(json).toEqual(mockResponse);
+ // });
});
diff --git a/release-please-config.json b/release-please-config.json
index d6d4d9560..4be85f719 100644
--- a/release-please-config.json
+++ b/release-please-config.json
@@ -2,14 +2,14 @@
"packages": {
"packages/shared/common": {},
"packages/shared/sdk-client": {
- "bump-minor-pre-major": true
+ "release-as": "1.0.0"
},
"packages/shared/sdk-server": {},
"packages/shared/sdk-server-edge": {},
"packages/shared/akamai-edgeworker-sdk": {},
"packages/sdk/cloudflare": {},
"packages/sdk/react-native": {
- "bump-minor-pre-major": true
+ "release-as": "10.0.0"
},
"packages/sdk/server-node": {},
"packages/sdk/vercel": {