@launchdarkly/react-native-client-sdk 0.1.0-alpha → 0.1.4
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 +51 -0
- package/README.md +5 -3
- package/dist/jest.config.d.ts +4 -0
- package/dist/jest.config.d.ts.map +1 -0
- package/dist/jest.config.js +15 -0
- package/dist/jest.config.js.map +1 -0
- package/dist/package.json +9 -6
- package/dist/src/ReactNativeLDClient.d.ts +19 -0
- package/dist/src/ReactNativeLDClient.d.ts.map +1 -1
- package/dist/src/ReactNativeLDClient.js +19 -0
- package/dist/src/ReactNativeLDClient.js.map +1 -1
- package/dist/src/hooks/useLDClient.d.ts +1 -1
- package/dist/src/hooks/useLDClient.d.ts.map +1 -1
- package/dist/src/provider/LDProvider.d.ts +1 -1
- package/dist/src/provider/LDProvider.d.ts.map +1 -1
- package/dist/src/provider/LDProvider.js +2 -1
- package/dist/src/provider/LDProvider.js.map +1 -1
- package/dist/src/provider/reactContext.d.ts +2 -2
- package/dist/src/provider/reactContext.d.ts.map +1 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.4](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v0.1.3...react-native-client-sdk-v0.1.4) (2024-01-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Add Detox e2e tests. ([#340](https://github.com/launchdarkly/js-core/issues/340)) ([e7b9d29](https://github.com/launchdarkly/js-core/commit/e7b9d299fe1e1c34489f8688099de466a12a3622))
|
|
9
|
+
|
|
10
|
+
## [0.1.3](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v0.1.2...react-native-client-sdk-v0.1.3) (2023-12-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Add more rn sdk unit tests. ([#339](https://github.com/launchdarkly/js-core/issues/339)) ([913bc00](https://github.com/launchdarkly/js-core/commit/913bc0009a39188b6b9785e5c4b4b79078061821))
|
|
16
|
+
|
|
17
|
+
## [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* 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))
|
|
23
|
+
* 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))
|
|
24
|
+
|
|
25
|
+
## [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)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* 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))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Dependencies
|
|
34
|
+
|
|
35
|
+
* The following workspace dependencies were updated
|
|
36
|
+
* dependencies
|
|
37
|
+
* @launchdarkly/js-client-sdk-common bumped from 0.1.0 to 0.1.1
|
|
38
|
+
|
|
39
|
+
## [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)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* 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))
|
|
45
|
+
|
|
46
|
+
## Changelog
|
|
47
|
+
|
|
48
|
+
### Dependencies
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## Changelog
|
|
53
|
+
|
|
3
54
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,oBAYjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const jestConfig = {
|
|
2
|
+
preset: 'ts-jest',
|
|
3
|
+
testEnvironment: 'jsdom',
|
|
4
|
+
transform: {
|
|
5
|
+
'^.+\\.tsx?$': [
|
|
6
|
+
'ts-jest',
|
|
7
|
+
{
|
|
8
|
+
tsconfig: 'tsconfig.test.json',
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
},
|
|
12
|
+
testPathIgnorePatterns: ['node_modules', 'example', 'dist'],
|
|
13
|
+
};
|
|
14
|
+
export default jestConfig;
|
|
15
|
+
//# sourceMappingURL=jest.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAyB;IACvC,MAAM,EAAE,SAAS;IACjB,eAAe,EAAE,OAAO;IACxB,SAAS,EAAE;QACT,aAAa,EAAE;YACb,SAAS;YACT;gBACE,QAAQ,EAAE,oBAAoB;aAC/B;SACF;KACF;IACD,sBAAsB,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC;CAC5D,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@launchdarkly/react-native-client-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"start": "rimraf dist && yarn tsw",
|
|
33
33
|
"lint": "eslint . --ext .ts",
|
|
34
34
|
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
|
|
35
|
-
"test": "
|
|
35
|
+
"test": "jest",
|
|
36
36
|
"coverage": "yarn test --coverage",
|
|
37
37
|
"check": "yarn prettier && yarn lint && yarn build && yarn test",
|
|
38
38
|
"link-dev": "./link-dev.sh",
|
|
@@ -44,14 +44,15 @@
|
|
|
44
44
|
"react-native": "*"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@launchdarkly/js-client-sdk-common": "0.1.
|
|
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"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
+
"@testing-library/react": "^14.1.2",
|
|
53
54
|
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
|
54
|
-
"@types/jest": "^29.5.
|
|
55
|
+
"@types/jest": "^29.5.11",
|
|
55
56
|
"@types/react": "^18.2.31",
|
|
56
57
|
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
57
58
|
"@typescript-eslint/parser": "^6.1.0",
|
|
@@ -61,13 +62,15 @@
|
|
|
61
62
|
"eslint-config-prettier": "^8.8.0",
|
|
62
63
|
"eslint-plugin-import": "^2.27.5",
|
|
63
64
|
"eslint-plugin-prettier": "^5.0.0",
|
|
64
|
-
"jest": "^29.
|
|
65
|
+
"jest": "^29.7.0",
|
|
65
66
|
"launchdarkly-js-test-helpers": "^2.2.0",
|
|
66
67
|
"prettier": "^3.0.0",
|
|
67
68
|
"react": "^18.2.0",
|
|
69
|
+
"react-dom": "^18.2.0",
|
|
68
70
|
"react-native": "^0.73.1",
|
|
69
71
|
"rimraf": "^5.0.5",
|
|
70
|
-
"ts-jest": "^29.1.
|
|
72
|
+
"ts-jest": "^29.1.1",
|
|
73
|
+
"ts-node": "^10.9.2",
|
|
71
74
|
"typedoc": "0.25.0",
|
|
72
75
|
"typescript": "5.1.6"
|
|
73
76
|
},
|
|
@@ -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;
|
|
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,SAAS;YAC7B,mBAAmB,EAAE,2BAA2B;SACjD,CAAC;QAEF,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,kCAAO,OAAO,KAAE,MAAM,KAAI,eAAe,CAAC,CAAC;IACjF,CAAC;IAEQ,mBAAmB,CAAC,OAAkB;QAC7C,OAAO,UAAU,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAS,CAAC,EAAE,CAAC;IACvF,CAAC;CACF"}
|
|
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;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,YAAY;IAC3D;;;;;OAKG;IACH,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,SAAS;YAC7B,mBAAmB,EAAE,2BAA2B;SACjD,CAAC;QAEF,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,kCAAO,OAAO,KAAE,MAAM,KAAI,eAAe,CAAC,CAAC;IACjF,CAAC;IAEQ,mBAAmB,CAAC,OAAkB;QAC7C,OAAO,UAAU,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAS,CAAC,EAAE,CAAC;IACvF,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLDClient.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLDClient.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"useLDClient.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLDClient.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,WAAW,wCAGhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -17,6 +17,6 @@ type LDProps = {
|
|
|
17
17
|
* @param children
|
|
18
18
|
* @constructor
|
|
19
19
|
*/
|
|
20
|
-
declare const LDProvider: ({ client, context, children }: PropsWithChildren<LDProps>) => import("react").JSX.Element;
|
|
20
|
+
declare const LDProvider: ({ client, context, children }: PropsWithChildren<LDProps>) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export default LDProvider;
|
|
22
22
|
//# sourceMappingURL=LDProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LDProvider.d.ts","sourceRoot":"","sources":["../../../src/provider/LDProvider.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"LDProvider.d.ts","sourceRoot":"","sources":["../../../src/provider/LDProvider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AAIzD,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,UAAU,kCAAmC,kBAAkB,OAAO,CAAC,4CAgB5E,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useEffect, useState } from 'react';
|
|
2
3
|
import { Provider } from './reactContext';
|
|
3
4
|
import setupListeners from './setupListeners';
|
|
@@ -23,7 +24,7 @@ const LDProvider = ({ client, context, children }) => {
|
|
|
23
24
|
.catch((e) => client.logger.debug(`LaunchDarkly React Native Sdk identify error: ${e}`));
|
|
24
25
|
}
|
|
25
26
|
}, []);
|
|
26
|
-
return
|
|
27
|
+
return _jsx(Provider, { value: state, children: children });
|
|
27
28
|
};
|
|
28
29
|
export default LDProvider;
|
|
29
30
|
//# sourceMappingURL=LDProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LDProvider.js","sourceRoot":"","sources":["../../../src/provider/LDProvider.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"LDProvider.js","sourceRoot":"","sources":["../../../src/provider/LDProvider.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAqB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKtE,OAAO,EAAE,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;AACxD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAO9C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAA8B,EAAE,EAAE;IAC/E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,EAAE,MAAM,EAAE,CAAC,CAAC;IAE7D,SAAS,CAAC,GAAG,EAAE;QACb,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEjC,IAAI,OAAO,EAAE;YACX,MAAM;iBACH,QAAQ,CAAC,OAAO,CAAC;iBACjB,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAChB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,iDAAiD,CAAC,EAAE,CAAC,CAC1E,CAAC;SACL;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAY,CAAC;AACvD,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type ReactNativeLDClient from '../ReactNativeLDClient';
|
|
2
2
|
export type ReactContext = {
|
|
3
|
-
client:
|
|
3
|
+
client: ReactNativeLDClient;
|
|
4
4
|
};
|
|
5
5
|
export declare const context: import("react").Context<ReactContext>;
|
|
6
6
|
declare const Provider: import("react").Provider<ReactContext>, Consumer: import("react").Consumer<ReactContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactContext.d.ts","sourceRoot":"","sources":["../../../src/provider/reactContext.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"reactContext.d.ts","sourceRoot":"","sources":["../../../src/provider/reactContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,wBAAwB,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,OAAO,uCAElB,CAAC;AAEH,QAAA,MAAQ,QAAQ,0CAAE,QAAQ,wCAAY,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@launchdarkly/react-native-client-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"start": "rimraf dist && yarn tsw",
|
|
33
33
|
"lint": "eslint . --ext .ts",
|
|
34
34
|
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
|
|
35
|
-
"test": "
|
|
35
|
+
"test": "jest",
|
|
36
36
|
"coverage": "yarn test --coverage",
|
|
37
37
|
"check": "yarn prettier && yarn lint && yarn build && yarn test",
|
|
38
38
|
"link-dev": "./link-dev.sh",
|
|
@@ -44,14 +44,15 @@
|
|
|
44
44
|
"react-native": "*"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@launchdarkly/js-client-sdk-common": "0.1.
|
|
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"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
+
"@testing-library/react": "^14.1.2",
|
|
53
54
|
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
|
54
|
-
"@types/jest": "^29.5.
|
|
55
|
+
"@types/jest": "^29.5.11",
|
|
55
56
|
"@types/react": "^18.2.31",
|
|
56
57
|
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
57
58
|
"@typescript-eslint/parser": "^6.1.0",
|
|
@@ -61,13 +62,15 @@
|
|
|
61
62
|
"eslint-config-prettier": "^8.8.0",
|
|
62
63
|
"eslint-plugin-import": "^2.27.5",
|
|
63
64
|
"eslint-plugin-prettier": "^5.0.0",
|
|
64
|
-
"jest": "^29.
|
|
65
|
+
"jest": "^29.7.0",
|
|
65
66
|
"launchdarkly-js-test-helpers": "^2.2.0",
|
|
66
67
|
"prettier": "^3.0.0",
|
|
67
68
|
"react": "^18.2.0",
|
|
69
|
+
"react-dom": "^18.2.0",
|
|
68
70
|
"react-native": "^0.73.1",
|
|
69
71
|
"rimraf": "^5.0.5",
|
|
70
|
-
"ts-jest": "^29.1.
|
|
72
|
+
"ts-jest": "^29.1.1",
|
|
73
|
+
"ts-node": "^10.9.2",
|
|
71
74
|
"typedoc": "0.25.0",
|
|
72
75
|
"typescript": "5.1.6"
|
|
73
76
|
},
|