From 187cd0edc9fe40a6fcbc18d1d778c3b92f2beaf2 Mon Sep 17 00:00:00 2001 From: LaunchDarklyReleaseBot <86431345+LaunchDarklyReleaseBot@users.noreply.github.com> Date: Wed, 6 Oct 2021 11:41:36 -0700 Subject: [PATCH] prepare 2.23.2 release (#98) --- CONTRIBUTING.md | 2 +- README.md | 6 +++--- src/context.ts | 2 +- src/types.ts | 10 +++++----- src/withLDConsumer.tsx | 2 +- src/withLDProvider.tsx | 8 +++++--- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5aaa842..f62c3e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing to the LaunchDarkly Client-side SDK for React -LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK. +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. ## Submitting bug reports and feature requests diff --git a/README.md b/README.md index 38266ef..d4b6722 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## LaunchDarkly overview -[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/docs/getting-started) using LaunchDarkly today! +[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today! [![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly) @@ -16,7 +16,7 @@ Additionally, refer to the [JavaScript SDK README](https://github.com/launchdark ## Getting started -Refer to the [SDK documentation](https://docs.launchdarkly.com/docs/react-sdk-reference#section-getting-started) for instructions on getting started with using the SDK. +Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/client-side/react/react-web#getting-started) for instructions on getting started with using the SDK. Please note that the React 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 React 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 React code, you must check the "Make this flag available to client-side SDKs" box on that flag's Settings page. @@ -41,7 +41,7 @@ We encourage pull requests and other contributions from the community. Check out * 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?). * 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. * 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). Disable parts of your application to facilitate maintenance, without taking everything offline. -* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list. +* 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. * Explore LaunchDarkly * [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information * [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides diff --git a/src/context.ts b/src/context.ts index 7a75f0f..a16d6c5 100644 --- a/src/context.ts +++ b/src/context.ts @@ -15,7 +15,7 @@ interface LDContext { * An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`). * This will be be undefined initially until initialization is complete. * - * @see http://docs.launchdarkly.com/docs/js-sdk-reference + * @see https://docs.launchdarkly.com/sdk/client-side/javascript */ ldClient?: LDClient; } diff --git a/src/types.ts b/src/types.ts index fc5de48..5fb1200 100644 --- a/src/types.ts +++ b/src/types.ts @@ -16,9 +16,9 @@ export interface LDReactOptions { * This is true by default, meaning that keys will automatically be converted to camel-case. * * For more information, see the React SDK Reference Guide on - * [flag keys](https://docs.launchdarkly.com/docs/react-sdk-reference#section-flag-keys). + * [flag keys](https://docs.launchdarkly.com/sdk/client-side/react/react-web#flag-keys). * - * @see https://docs.launchdarkly.com/docs/react-sdk-reference#section-flag-keys + * @see https://docs.launchdarkly.com/sdk/client-side/react/react-web#flag-keys */ useCamelCaseFlagKeys?: boolean; } @@ -43,7 +43,7 @@ export interface ProviderConfig { * A LaunchDarkly user object. If unspecified, a new user with a * random key will be created and used. This user's key will remain constant across browser sessions. * - * @see http://docs.launchdarkly.com/docs/js-sdk-reference#section-users + * @see https://docs.launchdarkly.com/sdk/features/user-config#javascript */ user?: LDUser; @@ -55,7 +55,7 @@ export interface ProviderConfig { /** * LaunchDarkly initialization options. These options are common between LaunchDarkly's JavaScript and React SDKs. * - * @see https://docs.launchdarkly.com/docs/js-sdk-reference#section-customizing-your-client + * @see https://docs.launchdarkly.com/sdk/features/config#javascript */ options?: LDOptions; @@ -98,7 +98,7 @@ export interface AllFlagsLDClient { /** * An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`). * - * @see http://docs.launchdarkly.com/docs/js-sdk-reference + * @see https://docs.launchdarkly.com/sdk/client-side/javascript */ ldClient: LDClient; } diff --git a/src/withLDConsumer.tsx b/src/withLDConsumer.tsx index b6223bd..8d68ffa 100644 --- a/src/withLDConsumer.tsx +++ b/src/withLDConsumer.tsx @@ -26,7 +26,7 @@ export interface LDProps { /** * An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`) * - * @see http://docs.launchdarkly.com/docs/js-sdk-reference + * @see https://docs.launchdarkly.com/sdk/client-side/javascript */ ldClient?: LDClient; } diff --git a/src/withLDProvider.tsx b/src/withLDProvider.tsx index 43a3a60..84c6152 100644 --- a/src/withLDProvider.tsx +++ b/src/withLDProvider.tsx @@ -23,13 +23,15 @@ import hoistNonReactStatics from 'hoist-non-react-statics'; * @param config - The configuration used to initialize LaunchDarkly's JS SDK * @return A function which accepts your root React component and returns a HOC */ -export function withLDProvider(config: ProviderConfig): (WrappedComponent: React.ComponentType) => React.ComponentType { - return function withLDProviderHoc(WrappedComponent: React.ComponentType): React.ComponentType { +export function withLDProvider( + config: ProviderConfig, +): (WrappedComponent: React.ComponentType) => React.ComponentType { + return function withLDProviderHoc(WrappedComponent: React.ComponentType): React.ComponentType { const { reactOptions: userReactOptions } = config; const reactOptions = { ...defaultReactOptions, ...userReactOptions }; const providerProps = { ...config, reactOptions }; - class HoistedComponent extends React.Component { + class HoistedComponent extends React.Component { render() { return (