@launchdarkly/react-native-client-sdk 10.12.2 → 10.12.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 +18 -0
- package/dist/src/RNOptions.d.ts +5 -1
- package/dist/src/RNOptions.d.ts.map +1 -1
- package/dist/src/platform/ConditionalAsyncStorage.d.ts +2 -2
- package/dist/src/platform/ConditionalAsyncStorage.d.ts.map +1 -1
- package/dist/src/platform/ConditionalAsyncStorage.js +14 -28
- package/dist/src/platform/ConditionalAsyncStorage.js.map +1 -1
- package/dist/src/platform/PlatformInfo.js +1 -1
- package/dist/src/platform/PlatformStorage.d.ts +1 -0
- package/dist/src/platform/PlatformStorage.d.ts.map +1 -1
- package/dist/src/platform/PlatformStorage.js +5 -4
- package/dist/src/platform/PlatformStorage.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [10.12.4](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.12.3...react-native-client-sdk-v10.12.4) (2026-01-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @launchdarkly/js-client-sdk-common bumped from 1.16.0 to 1.17.0
|
|
11
|
+
|
|
12
|
+
## [10.12.3](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.12.2...react-native-client-sdk-v10.12.3) (2025-12-18)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* The following workspace dependencies were updated
|
|
18
|
+
* dependencies
|
|
19
|
+
* @launchdarkly/js-client-sdk-common bumped from 1.15.2 to 1.16.0
|
|
20
|
+
|
|
3
21
|
## [10.12.2](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.12.1...react-native-client-sdk-v10.12.2) (2025-12-05)
|
|
4
22
|
|
|
5
23
|
|
package/dist/src/RNOptions.d.ts
CHANGED
|
@@ -85,7 +85,11 @@ export interface RNSpecificOptions {
|
|
|
85
85
|
* Storage is used used for caching flag values for context as well as persisting generated
|
|
86
86
|
* identifiers. Storage could be used for additional features in the future.
|
|
87
87
|
*
|
|
88
|
-
* Defaults to
|
|
88
|
+
* Defaults to `@react-native-async-storage/async-storage` see [their documentation](https://react-native-async-storage.github.io/2.0/) for more information.
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* If there is an issue with the storage implementation, then generated keys and context caches may not be persisted. This will cause the SDK to
|
|
92
|
+
* generate new keys and context caches on every startup.
|
|
89
93
|
*/
|
|
90
94
|
readonly storage?: RNStorage;
|
|
91
95
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNOptions.d.ts","sourceRoot":"","sources":["../../src/RNOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IAEH;;;;;;OAMG;IACH,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAE7C;;;;;;OAMG;IACH,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;;;;;;;OAQG;IACH,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IAEnC;;;;;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"}
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* https://github.com/react-native-community/cli/issues/1347
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
export default
|
|
16
|
+
import type { LDLogger } from '@launchdarkly/js-client-sdk-common';
|
|
17
|
+
export default function getAsyncStorage(logger: LDLogger): any;
|
|
18
18
|
//# sourceMappingURL=ConditionalAsyncStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalAsyncStorage.d.ts","sourceRoot":"","sources":["../../../src/platform/ConditionalAsyncStorage.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"ConditionalAsyncStorage.d.ts","sourceRoot":"","sources":["../../../src/platform/ConditionalAsyncStorage.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAEnE,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,EAAE,QAAQ,GAAG,GAAG,CAc7D"}
|
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
/* eslint-disable
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
let ConditionalAsyncStorage;
|
|
18
|
-
try {
|
|
19
|
-
ConditionalAsyncStorage = require('@react-native-async-storage/async-storage').default;
|
|
1
|
+
/* eslint-disable global-require */
|
|
2
|
+
export default function getAsyncStorage(logger) {
|
|
3
|
+
try {
|
|
4
|
+
return require('@react-native-async-storage/async-storage').default;
|
|
5
|
+
}
|
|
6
|
+
catch (e) {
|
|
7
|
+
// Use a mock if async-storage is unavailable
|
|
8
|
+
logger.warn('AsyncStorage is not available, generated keys and context caches will not be persisted. Please see https://launchdarkly.github.io/js-core/packages/sdk/react-native/docs/interfaces/LDOptions.html#storage for more information.');
|
|
9
|
+
return {
|
|
10
|
+
getItem: (_key) => Promise.resolve(null),
|
|
11
|
+
setItem: (_key, _value) => Promise.resolve(),
|
|
12
|
+
removeItem: (_key) => Promise.resolve(),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
20
15
|
}
|
|
21
|
-
catch (e) {
|
|
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
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export default ConditionalAsyncStorage;
|
|
30
16
|
//# sourceMappingURL=ConditionalAsyncStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalAsyncStorage.js","sourceRoot":"","sources":["../../../src/platform/ConditionalAsyncStorage.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ConditionalAsyncStorage.js","sourceRoot":"","sources":["../../../src/platform/ConditionalAsyncStorage.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAmBnC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAgB;IACtD,IAAI;QACF,OAAO,OAAO,CAAC,2CAA2C,CAAC,CAAC,OAAO,CAAC;KACrE;IAAC,OAAO,CAAC,EAAE;QACV,6CAA6C;QAC7C,MAAM,CAAC,IAAI,CACT,kOAAkO,CACnO,CAAC;QACF,OAAO;YACL,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;YAChD,OAAO,EAAE,CAAC,IAAY,EAAE,MAAc,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;YAC5D,UAAU,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;SAChD,CAAC;KACH;AACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ldApplication, ldDevice } from './autoEnv';
|
|
2
2
|
const sdkName = '@launchdarkly/react-native-client-sdk';
|
|
3
|
-
const sdkVersion = '10.12.
|
|
3
|
+
const sdkVersion = '10.12.4'; // x-release-please-version
|
|
4
4
|
export default class PlatformInfo {
|
|
5
5
|
constructor(_logger, _config) {
|
|
6
6
|
this._logger = _logger;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LDLogger, Storage } from '@launchdarkly/js-client-sdk-common';
|
|
2
2
|
export default class PlatformStorage implements Storage {
|
|
3
3
|
private readonly _logger;
|
|
4
|
+
private _asyncStorage;
|
|
4
5
|
constructor(_logger: LDLogger);
|
|
5
6
|
clear(key: string): Promise<void>;
|
|
6
7
|
get(key: string): Promise<string | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformStorage.d.ts","sourceRoot":"","sources":["../../../src/platform/PlatformStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAI5E,MAAM,CAAC,OAAO,OAAO,eAAgB,YAAW,OAAO;
|
|
1
|
+
{"version":3,"file":"PlatformStorage.d.ts","sourceRoot":"","sources":["../../../src/platform/PlatformStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAI5E,MAAM,CAAC,OAAO,OAAO,eAAgB,YAAW,OAAO;IAEzC,OAAO,CAAC,QAAQ,CAAC,OAAO;IADpC,OAAO,CAAC,aAAa,CAAM;gBACE,OAAO,EAAE,QAAQ;IAIxC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAUxC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAOrD"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import getAsyncStorage from './ConditionalAsyncStorage';
|
|
2
2
|
export default class PlatformStorage {
|
|
3
3
|
constructor(_logger) {
|
|
4
4
|
this._logger = _logger;
|
|
5
|
+
this._asyncStorage = getAsyncStorage(_logger);
|
|
5
6
|
}
|
|
6
7
|
async clear(key) {
|
|
7
|
-
await
|
|
8
|
+
await this._asyncStorage.removeItem(key);
|
|
8
9
|
}
|
|
9
10
|
async get(key) {
|
|
10
11
|
try {
|
|
11
|
-
const value = await
|
|
12
|
+
const value = await this._asyncStorage.getItem(key);
|
|
12
13
|
return value !== null && value !== void 0 ? value : null;
|
|
13
14
|
}
|
|
14
15
|
catch (error) {
|
|
@@ -18,7 +19,7 @@ export default class PlatformStorage {
|
|
|
18
19
|
}
|
|
19
20
|
async set(key, value) {
|
|
20
21
|
try {
|
|
21
|
-
await
|
|
22
|
+
await this._asyncStorage.setItem(key, value);
|
|
22
23
|
}
|
|
23
24
|
catch (error) {
|
|
24
25
|
this._logger.debug(`Error saving AsyncStorage key: ${key}, value: ${value}, error: ${error}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformStorage.js","sourceRoot":"","sources":["../../../src/platform/PlatformStorage.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"PlatformStorage.js","sourceRoot":"","sources":["../../../src/platform/PlatformStorage.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,MAAM,CAAC,OAAO,OAAO,eAAe;IAElC,YAA6B,OAAiB;QAAjB,YAAO,GAAP,OAAO,CAAU;QAC5C,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,GAAW;QACrB,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAW;QACnB,IAAI;YACF,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACpD,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC;SACtB;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,mCAAmC,GAAG,YAAY,KAAK,EAAE,CAAC,CAAC;YAC9E,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAW,EAAE,KAAa;QAClC,IAAI;YACF,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC9C;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,kCAAkC,GAAG,YAAY,KAAK,YAAY,KAAK,EAAE,CAAC,CAAC;SAC/F;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@launchdarkly/react-native-client-sdk",
|
|
3
|
-
"version": "10.12.
|
|
3
|
+
"version": "10.12.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": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react-native": "*"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@launchdarkly/js-client-sdk-common": "1.
|
|
44
|
+
"@launchdarkly/js-client-sdk-common": "1.17.0",
|
|
45
45
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
46
46
|
"base64-js": "^1.5.1"
|
|
47
47
|
},
|