@launchdarkly/react-native-client-sdk 0.1.2 → 0.1.5
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 +23 -0
- package/README.md +4 -0
- 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/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,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.5](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v0.1.4...react-native-client-sdk-v0.1.5) (2024-01-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @launchdarkly/js-client-sdk-common bumped from 0.1.1 to 0.1.2
|
|
11
|
+
|
|
12
|
+
## [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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* Add Detox e2e tests. ([#340](https://github.com/launchdarkly/js-core/issues/340)) ([e7b9d29](https://github.com/launchdarkly/js-core/commit/e7b9d299fe1e1c34489f8688099de466a12a3622))
|
|
18
|
+
|
|
19
|
+
## [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)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* Add more rn sdk unit tests. ([#339](https://github.com/launchdarkly/js-core/issues/339)) ([913bc00](https://github.com/launchdarkly/js-core/commit/913bc0009a39188b6b9785e5c4b4b79078061821))
|
|
25
|
+
|
|
3
26
|
## [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
27
|
|
|
5
28
|
|
package/README.md
CHANGED
|
@@ -98,6 +98,10 @@ echo "MOBILE_KEY=mob-abc" >> packages/sdk/react-native/example/.env
|
|
|
98
98
|
yarn && yarn ios-go
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
## Verifying SDK build provenance with the SLSA framework
|
|
102
|
+
|
|
103
|
+
LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages. To learn more, see the [provenance guide](PROVENANCE.md).
|
|
104
|
+
|
|
101
105
|
## About LaunchDarkly
|
|
102
106
|
|
|
103
107
|
- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
|
|
@@ -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.5",
|
|
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.2",
|
|
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 +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.5",
|
|
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.2",
|
|
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
|
},
|