@launchdarkly/react-native-client-sdk 10.0.1 → 10.0.3

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
@@ -4,6 +4,29 @@
4
4
 
5
5
 
6
6
 
7
+ ## [10.0.3](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.0.2...react-native-client-sdk-v10.0.3) (2024-03-15)
8
+
9
+
10
+ ### Dependencies
11
+
12
+ * The following workspace dependencies were updated
13
+ * dependencies
14
+ * @launchdarkly/js-client-sdk-common bumped from 1.0.1 to 1.0.2
15
+
16
+ ## [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)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * 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))
22
+
23
+
24
+ ### Dependencies
25
+
26
+ * The following workspace dependencies were updated
27
+ * dependencies
28
+ * @launchdarkly/js-client-sdk-common bumped from 1.0.0 to 1.0.1
29
+
7
30
  ## [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)
8
31
 
9
32
  ### Introducing `@launchdarkly/react-native-client-sdk` as a replacement for `launchdarkly-react-native-client-sdk`.
package/README.md CHANGED
@@ -15,6 +15,19 @@ It is implemented purely in JS and supports Expo. Please consider updating your
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
+ ## Known Android identify issue
19
+ On Android, Flipper interferes with the SDK's streaming connections. As a result the `identify` call never resolves. The long term solution is the removal of Flipper from react-native. The Facebook team are [working on this](https://reactnative.dev/blog/2023/12/06/0.73-debugging-improvements-stable-symlinks#flipper--react-native-integration).
20
+
21
+ In the meantime, we recommend one of these workarounds:
22
+
23
+ - If you are using Expo, you'll need to do a native build in release `expo run:android --variant release`.
24
+
25
+ - If you are using Expo and want to debug and hot reload, you'll need to do a native build in debug `expo run:android --variant debug` and then go to the `android` folder and manually find and remove all references to flipper. This is a [reported issue](https://github.com/facebook/flipper/issues/1326#issuecomment-652946496) in the Flipper repo.
26
+
27
+ - If you are using the expo-go app on Android, unfortunately there is no known easy way to disable Flipper in Expo Go. Please use one of two previous native build options.
28
+
29
+ - If you are not using Expo, go to the `android` folder and manually find and remove all references to flipper.
30
+
18
31
  ## Install
19
32
 
20
33
  ```shell
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/react-native-client-sdk",
3
- "version": "10.0.1",
3
+ "version": "10.0.3",
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": {
@@ -43,7 +43,7 @@
43
43
  "react-native": "*"
44
44
  },
45
45
  "dependencies": {
46
- "@launchdarkly/js-client-sdk-common": "1.0.0",
46
+ "@launchdarkly/js-client-sdk-common": "1.0.2",
47
47
  "@react-native-async-storage/async-storage": "^1.21.0",
48
48
  "base64-js": "^1.5.1",
49
49
  "event-target-shim": "^6.0.2"
@@ -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":["../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AAK;IAE3B,MAAM;IAEN,uEAAuE;IACvE,2BAA2B;IAC3B,EAAE,EAAE,EAAE;IACN,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,wCAAwC;IACxC,GAAG,EAAE,EAAE;IACP,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC;QAC5B,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.1",
3
+ "version": "10.0.3",
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": {
@@ -43,7 +43,7 @@
43
43
  "react-native": "*"
44
44
  },
45
45
  "dependencies": {
46
- "@launchdarkly/js-client-sdk-common": "1.0.0",
46
+ "@launchdarkly/js-client-sdk-common": "1.0.2",
47
47
  "@react-native-async-storage/async-storage": "^1.21.0",
48
48
  "base64-js": "^1.5.1",
49
49
  "event-target-shim": "^6.0.2"