Skip to content

Commit 3a8656a

Browse files
committed
Updates documentation for the new JS SDK
1 parent ff77d37 commit 3a8656a

File tree

25 files changed

+1606
-178
lines changed

25 files changed

+1606
-178
lines changed

website/docs/advanced/migration-from-launchdarkly.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Let's see now step by step how to convert this code to ConfigCat:
254254
```
255255
256256
Please note that the ConfigCat client doesn't maintain a persistent connection to the remote server, but uses different
257-
polling strategies to get the data necessary for feature flag evaluation. Refer to the [SDK reference](../../sdk-reference/node#creating-the-configcat-client)
257+
polling strategies to get the data necessary for feature flag evaluation. Refer to the [SDK reference](../../sdk-reference/js/overview#creating-the-configcat-client)
258258
to learn more about the options. For frontend applications and long-running backend services, Auto Polling mode is
259259
usually a good choice.
260260
1. Adjust the wait-for-initialization logic.
@@ -274,7 +274,7 @@ Let's see now step by step how to convert this code to ConfigCat:
274274
the default value you pass to them.)
275275
276276
Actually, you only need this wait-for-initialization logic at the startup of your applications if you want to use
277-
[synchronous feature flag evaluation via snapshots](../../sdk-reference/node#snapshots-and-synchronous-feature-flag-evaluation).
277+
[synchronous feature flag evaluation via snapshots](../../sdk-reference/js/overview#snapshots-and-synchronous-feature-flag-evaluation).
278278
* For other polling modes, the wait-for-initialization logic doesn't make sense, so just omit it.
279279
1. Rewrite LaunchDarkly contexts to ConfigCat User Objects.
280280
@@ -283,7 +283,7 @@ Let's see now step by step how to convert this code to ConfigCat:
283283
but it's a simpler data structure.
284284
285285
To be able to convert a context data structure to a User Object one, you will need to do the following:
286-
* Read [the section on User Objects](../../sdk-reference/node#user-object) in the reference of the SDK for your
286+
* Read [the section on User Objects](../../sdk-reference/js/overview#user-object) in the reference of the SDK for your
287287
platform.
288288
* Read [this section](../migration-from-launchdarkly-translation#mapping-between-launchdarkly-contexts-and-configcat-user-objects)
289289
to learn how context paths are mapped to User Object attribute names.
@@ -313,14 +313,14 @@ Let's see now step by step how to convert this code to ConfigCat:
313313
* ConfigCat SDKs don't support [automatic camel casing](https://launchdarkly.com/docs/sdk/client-side/react/react-web#flag-keys-in-the-react-web-sdk)
314314
of feature flag keys.
315315
* In statically typed languages, ConfigCat evaluation methods require that the default value type and the feature
316-
flag type match. (Usually, there is [a section about this](../../sdk-reference/node#setting-type-mapping) in the
316+
flag type match. (Usually, there is [a section about this](../../sdk-reference/js/overview#setting-type-mapping) in the
317317
SDK reference.)
318318
* Please be extra careful when evaluating number type feature flags. ConfigCat distinguishes between integer and
319319
decimal number feature flags. The former must be evaluated using `getValue<int>`, `getIntValue` or similar, while
320320
the latter must be evaluated using `getValue<double>`, `getDoubleValue` or similar. (JavaScript-based SDKs don't
321321
have this issue, but you can run into it in other languages.)
322322
* On some platforms, the ConfigCat client provides asynchronous evaluation methods only. In such cases, synchronous
323-
feature flag evaluation is usually still possible, [via snapshots](../../sdk-reference/node#snapshots-and-synchronous-feature-flag-evaluation).
323+
feature flag evaluation is usually still possible, [via snapshots](../../sdk-reference/js/overview#snapshots-and-synchronous-feature-flag-evaluation).
324324
But this works slightly differently from the asynchronous methods, so make sure you understand its behavior and
325325
possible pitfalls.
326326

website/docs/sdk-reference/community/deno.mdx

Lines changed: 0 additions & 50 deletions
This file was deleted.

website/docs/sdk-reference/dotnet.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ else
6969
}
7070
```
7171

72+
The _ConfigCat SDK_ also offers a synchronous API for feature flag evaluation. Read more [here](#snapshots-and-non-blocking-synchronous-feature-flag-evaluation).
73+
7274
### 5. Dispose the _ConfigCat_ client
7375

7476
You can safely dispose all clients at once or individually and release all associated resources on application exit.
@@ -115,7 +117,7 @@ These are the available options on the `ConfigCatClientOptions` class:
115117
| `HttpClientHandler` | Optional, `HttpClientHandler` to provide network credentials and proxy settings. [More about the proxy settings](#using-configcat-behind-a-proxy). | built-in `HttpClientHandler` |
116118
| `HttpTimeout` | Optional, sets the underlying HTTP client's timeout. [More about the HTTP timeout](#http-timeout). | `TimeSpan.FromSeconds(30)` |
117119
| `FlagOverrides` | Optional, sets the local feature flag & setting overrides. [More about feature flag overrides](#flag-overrides). | |
118-
| `DataGovernance` | Optional, defaults to `Global`. Describes the location of your feature flag and setting data within the ConfigCat CDN. This parameter needs to be in sync with your Data Governance preferences. [More about Data Governance](../advanced/data-governance.mdx). Available options: `Global`, `EuOnly` | `Global` |
120+
| `DataGovernance` | Optional, describes the location of your feature flag and setting data within the ConfigCat CDN. This parameter needs to be in sync with your Data Governance preferences. [More about Data Governance](../advanced/data-governance.mdx). Available options: `Global`, `EuOnly` | `Global` |
119121
| `DefaultUser` | Optional, sets the default user. [More about default user](#default-user). | `null` (none) |
120122
| `Offline` | Optional, determines whether the client should be initialized to offline mode. [More about offline mode](#online--offline-mode). | `false` |
121123

website/docs/sdk-reference/ios.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ if isMyAwesomeFeatureEnabled {
145145
</TabItem>
146146
</Tabs>
147147
148+
The _ConfigCat SDK_ also offers a synchronous API for feature flag evaluation. Read more [here](#snapshots-and-non-blocking-synchronous-feature-flag-evaluation).
149+
148150
### 5. Close ConfigCat client​
149151
150152
You can safely shut down all clients at once or individually and release all associated resources on application exit.

website/docs/sdk-reference/js-ssr.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: 'js-ssr'
3-
title: JavaScript (SSR) SDK Reference
4-
description: ConfigCat JavaScript (SSR) SDK Reference. This is a step-by-step guide on how to use feature flags in your Server-Side-Rendered (SSR) JavaScript application.
3+
title: Legacy JavaScript (SSR) SDK Reference
4+
description: ConfigCat Legacy JavaScript (SSR) SDK Reference. This is a step-by-step guide on how to use feature flags in your Server-Side-Rendered (SSR) JavaScript application.
55
---
66

77
export const JavaScriptSSRSchema = require('@site/src/schema-markup/sdk-reference/js-ssr.json');
@@ -16,6 +16,17 @@ export const JavaScriptSSRSchema = require('@site/src/schema-markup/sdk-referenc
1616
[![codecov](https://codecov.io/gh/configcat/js-ssr-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/configcat/js-ssr-sdk)
1717
[![Known Vulnerabilities](https://snyk.io/test/github/configcat/js-ssr-sdk/badge.svg?targetFile=package.json)](https://snyk.io/test/github/configcat/js-ssr-sdk?targetFile=package.json)
1818

19+
:::caution
20+
This SDK is no longer maintained as it has been superseded by the new [Browser (JavaScript) SDK](../js/browser).
21+
22+
The new SDK maintains backward compatibility, so migration is typically as simple as:
23+
1. uninstalling the old NPM package,
24+
1. installing the new one,
25+
1. adjusting the `import` statements.
26+
27+
For installation details, see the [relavant section](../js/browser#1-install-and-import-package) in the new SDK's documentation.
28+
:::
29+
1930
:::info
2031
This SDK is for Server-Side Rendered JavaScript frameworks like <a href="https://nuxtjs.org" target="_blank">NuxtJS</a>.
2132
:::

website/docs/sdk-reference/js.mdx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: 'js'
3-
title: JavaScript SDK Reference
4-
description: ConfigCat JavaScript SDK Reference. This is a step-by-step guide on how to use feature flags in your JavaScript applications.
3+
title: Legacy JavaScript SDK Reference
4+
description: ConfigCat Legacy JavaScript SDK Reference. This is a step-by-step guide on how to use feature flags in your JavaScript applications.
55
---
66

77
import Tabs from '@theme/Tabs';
@@ -20,8 +20,15 @@ export const JavaScriptSchema = require('@site/src/schema-markup/sdk-reference/j
2020
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=configcat_js-sdk&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=configcat_js-sdk)
2121
[![JSDELIVR](https://data.jsdelivr.com/v1/package/npm/configcat-js/badge)](https://www.jsdelivr.com/package/npm/configcat-js)
2222

23-
:::info
24-
For JavaScript SSR (Server-Side Rendered) applications we recommend using [ConfigCat JS-SSR SDK](./js-ssr.mdx).
23+
:::caution
24+
This SDK is no longer maintained as it has been superseded by the new [Browser (JavaScript) SDK](../js/browser).
25+
26+
The new SDK maintains backward compatibility, so migration is typically as simple as:
27+
1. uninstalling the old NPM package,
28+
1. installing the new one,
29+
1. adjusting the `import` statements.
30+
31+
For installation details, see the [relavant section](../js/browser#1-install-and-import-package) in the new SDK's documentation.
2532
:::
2633

2734
<a href="https://github.com/configcat/js-sdk" target="_blank">

0 commit comments

Comments
 (0)