@launchdarkly/react-native-client-sdk 0.1.0-alpha → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.2](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v0.1.1...react-native-client-sdk-v0.1.2) (2023-12-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Remove beta warning for sdk-server. Added tsdoc comments for rn sdk. Added README for sdk-client. ([#334](https://github.com/launchdarkly/js-core/issues/334)) ([bb7c3b4](https://github.com/launchdarkly/js-core/commit/bb7c3b45a72d203ad7209def3982d9094fb4cbc9))
9
+ * Remove release-as for sdk-client and rn sdk and updated READMEs. ([#337](https://github.com/launchdarkly/js-core/issues/337)) ([52bf088](https://github.com/launchdarkly/js-core/commit/52bf088bd9c7a75f673e37de829459bbad4deb90))
10
+
11
+ ## [0.1.1](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v0.1.0...react-native-client-sdk-v0.1.1) (2023-12-28)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * Remove release-as for sdk-client and rn sdk and updated READMEs. ([#337](https://github.com/launchdarkly/js-core/issues/337)) ([52bf088](https://github.com/launchdarkly/js-core/commit/52bf088bd9c7a75f673e37de829459bbad4deb90))
17
+
18
+
19
+ ### Dependencies
20
+
21
+ * The following workspace dependencies were updated
22
+ * dependencies
23
+ * @launchdarkly/js-client-sdk-common bumped from 0.1.0 to 0.1.1
24
+
25
+ ## [0.1.0](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v0.1.1...react-native-client-sdk-v0.1.0) (2023-12-28)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * Remove beta warning for sdk-server. Added tsdoc comments for rn sdk. Added README for sdk-client. ([#334](https://github.com/launchdarkly/js-core/issues/334)) ([bb7c3b4](https://github.com/launchdarkly/js-core/commit/bb7c3b45a72d203ad7209def3982d9094fb4cbc9))
31
+
32
+ ## Changelog
33
+
34
+ ### Dependencies
35
+
36
+
37
+
38
+ ## Changelog
39
+
3
40
  All notable changes to the LaunchDarkly SDK for React Native will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org).
package/README.md CHANGED
@@ -1,20 +1,22 @@
1
1
  # LaunchDarkly React Native SDK
2
2
 
3
- > [!WARNING]
4
- > UNSUPPORTED This SDK is in pre-release development and is not supported.
5
-
6
3
  [![NPM][sdk-react-native-npm-badge]][sdk-react-native-npm-link]
7
4
  [![Actions Status][sdk-react-native-ci-badge]][sdk-react-native-ci]
8
5
  [![Documentation][sdk-react-native-ghp-badge]][sdk-react-native-ghp-link]
9
6
  [![NPM][sdk-react-native-dm-badge]][sdk-react-native-npm-link]
10
7
  [![NPM][sdk-react-native-dt-badge]][sdk-react-native-npm-link]
11
8
 
9
+ > [!WARNING]
10
+ > UNSUPPORTED This SDK is in pre-release development and is not supported.
11
+
12
12
  The LaunchDarkly React Native SDK is designed primarily for use in mobile environments. It follows the client-side LaunchDarkly model for multi-user contexts.
13
13
 
14
14
  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.
15
15
 
16
16
  For more information, see the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/react-native).
17
17
 
18
+ This library is an alpha version and should not be considered ready for production use while this message is visible.
19
+
18
20
  ## Install
19
21
 
20
22
  ```shell
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/react-native-client-sdk",
3
- "version": "0.1.0-alpha",
3
+ "version": "0.1.2",
4
4
  "description": "React Native LaunchDarkly SDK",
5
5
  "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/react-native",
6
6
  "repository": {
@@ -44,7 +44,7 @@
44
44
  "react-native": "*"
45
45
  },
46
46
  "dependencies": {
47
- "@launchdarkly/js-client-sdk-common": "0.1.0-alpha",
47
+ "@launchdarkly/js-client-sdk-common": "0.1.1",
48
48
  "@react-native-async-storage/async-storage": "^1.21.0",
49
49
  "base64-js": "^1.5.1",
50
50
  "event-target-shim": "^6.0.2"
@@ -1,5 +1,24 @@
1
1
  import { LDClientImpl, type LDContext, type LDOptions } from '@launchdarkly/js-client-sdk-common';
2
+ /**
3
+ * The React Native LaunchDarkly client. Instantiate this class to create an
4
+ * instance of the ReactNativeLDClient and pass it to the {@link LDProvider}.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const featureClient = new ReactNativeLDClient(MOBILE_KEY);
9
+ *
10
+ * <LDProvider client={featureClient}>
11
+ * <Welcome />
12
+ * </LDProvider>
13
+ * ```
14
+ */
2
15
  export default class ReactNativeLDClient extends LDClientImpl {
16
+ /**
17
+ * Creates an instance of the LaunchDarkly client.
18
+ *
19
+ * @param sdkKey The LaunchDarkly mobile key.
20
+ * @param options {@link LDOptions} to initialize the client with.
21
+ */
3
22
  constructor(sdkKey: string, options?: LDOptions);
4
23
  createStreamUriPath(context: LDContext): string;
5
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ReactNativeLDClient.d.ts","sourceRoot":"","sources":["../../src/ReactNativeLDClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,oCAAoC,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,YAAY;gBAC/C,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,SAAc;IAiB1C,mBAAmB,CAAC,OAAO,EAAE,SAAS;CAGhD"}
1
+ {"version":3,"file":"ReactNativeLDClient.d.ts","sourceRoot":"","sources":["../../src/ReactNativeLDClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,oCAAoC,CAAC;AAI5C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,YAAY;IAC3D;;;;;OAKG;gBACS,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,SAAc;IAiB1C,mBAAmB,CAAC,OAAO,EAAE,SAAS;CAGhD"}
@@ -1,6 +1,25 @@
1
1
  import { base64UrlEncode, BasicLogger, LDClientImpl, } from '@launchdarkly/js-client-sdk-common';
2
2
  import createPlatform from './platform';
3
+ /**
4
+ * The React Native LaunchDarkly client. Instantiate this class to create an
5
+ * instance of the ReactNativeLDClient and pass it to the {@link LDProvider}.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * const featureClient = new ReactNativeLDClient(MOBILE_KEY);
10
+ *
11
+ * <LDProvider client={featureClient}>
12
+ * <Welcome />
13
+ * </LDProvider>
14
+ * ```
15
+ */
3
16
  export default class ReactNativeLDClient extends LDClientImpl {
17
+ /**
18
+ * Creates an instance of the LaunchDarkly client.
19
+ *
20
+ * @param sdkKey The LaunchDarkly mobile key.
21
+ * @param options {@link LDOptions} to initialize the client with.
22
+ */
4
23
  constructor(sdkKey, options = {}) {
5
24
  var _a;
6
25
  const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : new BasicLogger({
@@ -1 +1 @@
1
- {"version":3,"file":"ReactNativeLDClient.js","sourceRoot":"","sources":["../../src/ReactNativeLDClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,WAAW,EAEX,YAAY,GAGb,MAAM,oCAAoC,CAAC;AAE5C,OAAO,cAAc,MAAM,YAAY,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,YAAY;IAC3D,YAAY,MAAc,EAAE,UAAqB,EAAE;;QACjD,MAAM,MAAM,GACV,MAAA,OAAO,CAAC,MAAM,mCACd,IAAI,WAAW,CAAC;YACd,KAAK,EAAE,OAAO;YACd,sCAAsC;YACtC,WAAW,EAAE,OAAO,CAAC,GAAG;SACzB,CAAC,CAAC;QAEL,MAAM,eAAe,GAA+B;YAClD,kBAAkB,EAAE,SAA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1
  {
2
2
  "name": "@launchdarkly/react-native-client-sdk",
3
- "version": "0.1.0-alpha",
3
+ "version": "0.1.2",
4
4
  "description": "React Native LaunchDarkly SDK",
5
5
  "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/react-native",
6
6
  "repository": {
@@ -44,7 +44,7 @@
44
44
  "react-native": "*"
45
45
  },
46
46
  "dependencies": {
47
- "@launchdarkly/js-client-sdk-common": "0.1.0-alpha",
47
+ "@launchdarkly/js-client-sdk-common": "0.1.1",
48
48
  "@react-native-async-storage/async-storage": "^1.21.0",
49
49
  "base64-js": "^1.5.1",
50
50
  "event-target-shim": "^6.0.2"