@launchdarkly/react-native-client-sdk 10.0.0 → 10.0.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,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ### Dependencies
4
+
5
+
6
+
7
+ ## [10.0.2](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.0.1...react-native-client-sdk-v10.0.2) (2024-03-05)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * Guard against null auto env attributes and async-storage. ([#384](https://github.com/launchdarkly/js-core/issues/384)) ([14ce392](https://github.com/launchdarkly/js-core/commit/14ce392ade486fa8168d2dae8375e4c201912f83))
13
+
14
+
15
+ ### Dependencies
16
+
17
+ * The following workspace dependencies were updated
18
+ * dependencies
19
+ * @launchdarkly/js-client-sdk-common bumped from 1.0.0 to 1.0.1
20
+
3
21
  ## [10.0.0](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v0.2.1...react-native-client-sdk-v10.0.0) (2024-02-08)
4
22
 
5
23
  ### Introducing `@launchdarkly/react-native-client-sdk` as a replacement for `launchdarkly-react-native-client-sdk`.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/react-native-client-sdk",
3
- "version": "10.0.0",
3
+ "version": "10.0.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": {
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "scripts": {
29
29
  "clean": "rimraf dist",
30
- "build": "npx tsc && yarn link-dev",
30
+ "build": "npx tsc",
31
31
  "tsw": "yarn tsc --watch",
32
32
  "start": "rimraf dist && yarn tsw",
33
33
  "lint": "eslint . --ext .ts,.tsx",
@@ -35,7 +35,6 @@
35
35
  "test": "jest",
36
36
  "coverage": "yarn test --coverage",
37
37
  "check": "yarn prettier && yarn lint && yarn build && yarn test",
38
- "link-dev": "./link-dev.sh",
39
38
  "android": "yarn && yarn ./example && yarn build && (cd example/ && yarn android-release)",
40
39
  "ios": "yarn && yarn ./example && yarn build && (cd example/ && yarn ios-go)"
41
40
  },
@@ -44,7 +43,7 @@
44
43
  "react-native": "*"
45
44
  },
46
45
  "dependencies": {
47
- "@launchdarkly/js-client-sdk-common": "1.0.0",
46
+ "@launchdarkly/js-client-sdk-common": "1.0.1",
48
47
  "@react-native-async-storage/async-storage": "^1.21.0",
49
48
  "base64-js": "^1.5.1",
50
49
  "event-target-shim": "^6.0.2"
@@ -76,8 +75,5 @@
76
75
  "ts-node": "^10.9.2",
77
76
  "typedoc": "0.25.0",
78
77
  "typescript": "5.1.6"
79
- },
80
- "installConfig": {
81
- "hoistingLimits": "workspaces"
82
78
  }
83
79
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * For react-native version >= 0.71, the LaunchDarkly React-Native SDK uses
2
+ * The LaunchDarkly React-Native SDK uses
3
3
  * @react-native-async-storage/async-storage for bootstrapping. This is a native
4
4
  * dependency.
5
5
  *
@@ -12,8 +12,6 @@
12
12
  * does not work with transitive dependencies:
13
13
  * https://github.com/react-native-community/cli/issues/1347
14
14
  *
15
- * For react-native version < 0.71, the built-in react-native AsyncStorage
16
- * module is used.
17
15
  */
18
16
  declare let ConditionalAsyncStorage: any;
19
17
  export default ConditionalAsyncStorage;
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalAsyncStorage.d.ts","sourceRoot":"","sources":["../../../src/platform/ConditionalAsyncStorage.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,IAAI,uBAAuB,EAAE,GAAG,CAAC;AAUjC,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"ConditionalAsyncStorage.d.ts","sourceRoot":"","sources":["../../../src/platform/ConditionalAsyncStorage.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,QAAA,IAAI,uBAAuB,EAAE,GAAG,CAAC;AAajC,eAAe,uBAAuB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable import/no-mutable-exports,global-require */
2
2
  /**
3
- * For react-native version >= 0.71, the LaunchDarkly React-Native SDK uses
3
+ * The LaunchDarkly React-Native SDK uses
4
4
  * @react-native-async-storage/async-storage for bootstrapping. This is a native
5
5
  * dependency.
6
6
  *
@@ -13,17 +13,18 @@
13
13
  * does not work with transitive dependencies:
14
14
  * https://github.com/react-native-community/cli/issues/1347
15
15
  *
16
- * For react-native version < 0.71, the built-in react-native AsyncStorage
17
- * module is used.
18
16
  */
19
17
  let ConditionalAsyncStorage;
20
18
  try {
21
- // react-native version < 0.71
22
- ConditionalAsyncStorage = require('react-native').AsyncStorage;
19
+ ConditionalAsyncStorage = require('@react-native-async-storage/async-storage').default;
23
20
  }
24
21
  catch (e) {
25
- // react-native version >= 0.71
26
- ConditionalAsyncStorage = require('@react-native-async-storage/async-storage').default;
22
+ // Use a mock if async-storage is unavailable
23
+ ConditionalAsyncStorage = {
24
+ getItem: (_key) => Promise.resolve(null),
25
+ setItem: (_key, _value) => Promise.resolve(),
26
+ removeItem: (_key) => Promise.resolve(),
27
+ };
27
28
  }
28
29
  export default ConditionalAsyncStorage;
29
30
  //# sourceMappingURL=ConditionalAsyncStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalAsyncStorage.js","sourceRoot":"","sources":["../../../src/platform/ConditionalAsyncStorage.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;;;;;;;;;;;GAgBG;AACH,IAAI,uBAA4B,CAAC;AAEjC,IAAI;IACF,8BAA8B;IAC9B,uBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,YAAY,CAAC;CAChE;AAAC,OAAO,CAAC,EAAE;IACV,+BAA+B;IAC/B,uBAAuB,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC,OAAO,CAAC;CACxF;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"ConditionalAsyncStorage.js","sourceRoot":"","sources":["../../../src/platform/ConditionalAsyncStorage.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;;;;;;;;;GAcG;AACH,IAAI,uBAA4B,CAAC;AAEjC,IAAI;IACF,uBAAuB,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC,OAAO,CAAC;CACxF;AAAC,OAAO,CAAC,EAAE;IACV,6CAA6C;IAC7C,uBAAuB,GAAG;QACxB,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;QAChD,OAAO,EAAE,CAAC,IAAY,EAAE,MAAc,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;QAC5D,UAAU,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;KAChD,CAAC;CACH;AAED,eAAe,uBAAuB,CAAC"}
@@ -1,3 +1,4 @@
1
+ var _a;
1
2
  import { Platform } from 'react-native';
2
3
  import locale from './locale';
3
4
  export const ldApplication = {
@@ -30,7 +31,7 @@ export const ldDevice = {
30
31
  default: Platform.OS,
31
32
  }),
32
33
  name: Platform.OS,
33
- version: Platform.Version.toString(),
34
+ version: (_a = Platform.Version) === null || _a === void 0 ? void 0 : _a.toString(),
34
35
  },
35
36
  };
36
37
  //# sourceMappingURL=autoEnv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"autoEnv.js","sourceRoot":"","sources":["../../../src/platform/autoEnv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA8B,MAAM,cAAc,CAAC;AAIpE,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,wCAAwC;IACxC,GAAG,EAAE,EAAE;IACP,oBAAoB,EAAE,KAAK;IAE3B,MAAM;IAEN,uEAAuE;IACvE,2BAA2B;IAC3B,EAAE,EAAE,EAAE;IACN,IA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AC5B,GAAG,EAAE,OAAO;QACZ,OAAO,EAAG,QAAkC,CAAC,SAAS,CAAC,YAAY;KACpE,CAAC;IACF,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC;QACrB,wCAAwC;QACxC,OAAO,EAAG,QAAkC,CAAC,SAAS,CAAC,KAAK;KAC7D,CAAC;IACF,EAAE,EAAE;QACF,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC;YACtB,GAAG,EAAE,OAAO;YACZ,OAAO,EAAE,QAAQ,CAAC,EAAE;SACrB,CAAC;QACF,IAAI,EAAE,QAAQ,CAAC,EAAE;QACjB,OAAO,EAAE,MAAA,QAAQ,CAAC,OAAO,0CAAE,QAAQ,EAAE;KACtC;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../src/platform/locale.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,QAAA,MAAM,MAAM,KAGoC,CAAC;AAEjD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../src/platform/locale.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,QAAA,MAAM,MAAM,KAGqC,CAAC;AAElD,eAAe,MAAM,CAAC"}
@@ -1,3 +1,4 @@
1
+ var _a;
1
2
  import { NativeModules, Platform } from 'react-native';
2
3
  /**
3
4
  * Ripped from:
@@ -5,6 +6,6 @@ import { NativeModules, Platform } from 'react-native';
5
6
  */
6
7
  const locale = Platform.OS === 'ios'
7
8
  ? NativeModules.SettingsManager.settings.AppleLocale // iOS
8
- : NativeModules.I18nManager.localeIdentifier; // Android and rest
9
+ : (_a = NativeModules.I18nManager) === null || _a === void 0 ? void 0 : _a.localeIdentifier;
9
10
  export default locale;
10
11
  //# sourceMappingURL=locale.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"locale.js","sourceRoot":"","sources":["../../../src/platform/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,GACV,QAAQ,CAAC,EAAE,KAAK,KAAK;IACnB,CAAC,CAAC,aAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM;IAC3D,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,mBAAmB;AAErE,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"locale.js","sourceRoot":"","sources":["../../../src/platform/locale.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,GACV,QAAQ,CAAC,EAAE,KAAK,KAAK;IACnB,CAAC,CAAC,aAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM;IAC3D,CAAC,CAAC,MAAA,aAAa,CAAC,WAAW,0CAAE,gBAAgB,CAAC;AAElD,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/react-native-client-sdk",
3
- "version": "10.0.0",
3
+ "version": "10.0.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": {
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "scripts": {
29
29
  "clean": "rimraf dist",
30
- "build": "npx tsc && yarn link-dev",
30
+ "build": "npx tsc",
31
31
  "tsw": "yarn tsc --watch",
32
32
  "start": "rimraf dist && yarn tsw",
33
33
  "lint": "eslint . --ext .ts,.tsx",
@@ -35,7 +35,6 @@
35
35
  "test": "jest",
36
36
  "coverage": "yarn test --coverage",
37
37
  "check": "yarn prettier && yarn lint && yarn build && yarn test",
38
- "link-dev": "./link-dev.sh",
39
38
  "android": "yarn && yarn ./example && yarn build && (cd example/ && yarn android-release)",
40
39
  "ios": "yarn && yarn ./example && yarn build && (cd example/ && yarn ios-go)"
41
40
  },
@@ -44,7 +43,7 @@
44
43
  "react-native": "*"
45
44
  },
46
45
  "dependencies": {
47
- "@launchdarkly/js-client-sdk-common": "1.0.0",
46
+ "@launchdarkly/js-client-sdk-common": "1.0.1",
48
47
  "@react-native-async-storage/async-storage": "^1.21.0",
49
48
  "base64-js": "^1.5.1",
50
49
  "event-target-shim": "^6.0.2"
@@ -76,8 +75,5 @@
76
75
  "ts-node": "^10.9.2",
77
76
  "typedoc": "0.25.0",
78
77
  "typescript": "5.1.6"
79
- },
80
- "installConfig": {
81
- "hoistingLimits": "workspaces"
82
78
  }
83
79
  }