@launchdarkly/react-native-client-sdk 0.1.2 → 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 CHANGED
@@ -1,5 +1,19 @@
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
+
3
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)
4
18
 
5
19
 
@@ -0,0 +1,4 @@
1
+ import type { JestConfigWithTsJest } from 'ts-jest';
2
+ declare const jestConfig: JestConfigWithTsJest;
3
+ export default jestConfig;
4
+ //# sourceMappingURL=jest.config.d.ts.map
@@ -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.2",
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": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --ci --runInBand",
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",
@@ -50,8 +50,9 @@
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.0",
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.5.0",
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.0",
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,3 +1,3 @@
1
- declare const useLDClient: () => import("@launchdarkly/js-client-sdk-common").LDClient;
1
+ declare const useLDClient: () => import("..").ReactNativeLDClient;
2
2
  export default useLDClient;
3
3
  //# sourceMappingURL=useLDClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLDClient.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLDClient.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,WAAW,6DAGhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
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,OAAO,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAE/D,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,gCAgB5E,CAAC;AAEF,eAAe,UAAU,CAAC"}
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 <Provider value={state}>{children}</Provider>;
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,OAAO,EAAqB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAK/D,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,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
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 { LDClient } from '@launchdarkly/js-client-sdk-common';
1
+ import type ReactNativeLDClient from '../ReactNativeLDClient';
2
2
  export type ReactContext = {
3
- client: LDClient;
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,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,OAAO,uCAElB,CAAC;AAEH,QAAA,MAAQ,QAAQ,0CAAE,QAAQ,wCAAY,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
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.2",
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": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --ci --runInBand",
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",
@@ -50,8 +50,9 @@
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.0",
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.5.0",
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.0",
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
  },