@launchdarkly/react-native-client-sdk 10.7.0 → 10.8.0
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 +20 -0
- package/dist/package.json +2 -3
- package/dist/src/polyfills/btoa.d.ts.map +1 -1
- package/dist/src/polyfills/btoa.js +3 -8
- package/dist/src/polyfills/btoa.js.map +1 -1
- package/dist/src/polyfills/toUtf8Array.d.ts +2 -0
- package/dist/src/polyfills/toUtf8Array.d.ts.map +1 -0
- package/dist/src/polyfills/toUtf8Array.js +48 -0
- package/dist/src/polyfills/toUtf8Array.js.map +1 -0
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [10.8.0](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.7.0...react-native-client-sdk-v10.8.0) (2024-10-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Add support for hooks. ([#605](https://github.com/launchdarkly/js-core/issues/605)) ([04d347b](https://github.com/launchdarkly/js-core/commit/04d347b25e01015134a2545be22bfd8b1d1e85cc))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Ensure client logger is always wrapped in a safe logger. ([#599](https://github.com/launchdarkly/js-core/issues/599)) ([980e4da](https://github.com/launchdarkly/js-core/commit/980e4daaf32864e18f14b1e5e28e308dff0ae94f))
|
|
14
|
+
* Fix base64 encoding of unicode characters. ([#613](https://github.com/launchdarkly/js-core/issues/613)) ([35ec8d1](https://github.com/launchdarkly/js-core/commit/35ec8d1ecc07ddb68f4d02b19e1f238f7ff14df7))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* The following workspace dependencies were updated
|
|
20
|
+
* dependencies
|
|
21
|
+
* @launchdarkly/js-client-sdk-common bumped from 1.8.0 to 1.9.0
|
|
22
|
+
|
|
3
23
|
## [10.7.0](https://github.com/launchdarkly/js-core/compare/react-native-client-sdk-v10.6.1...react-native-client-sdk-v10.7.0) (2024-09-26)
|
|
4
24
|
|
|
5
25
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@launchdarkly/react-native-client-sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.8.0",
|
|
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,12 +41,11 @@
|
|
|
41
41
|
"react-native": "*"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@launchdarkly/js-client-sdk-common": "1.
|
|
44
|
+
"@launchdarkly/js-client-sdk-common": "1.9.0",
|
|
45
45
|
"@react-native-async-storage/async-storage": "^1.21.0",
|
|
46
46
|
"base64-js": "^1.5.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@launchdarkly/private-js-mocks": "0.0.1",
|
|
50
49
|
"@testing-library/react": "^14.1.2",
|
|
51
50
|
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
|
52
51
|
"@types/jest": "^29.5.11",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"btoa.d.ts","sourceRoot":"","sources":["../../../src/polyfills/btoa.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"btoa.d.ts","sourceRoot":"","sources":["../../../src/polyfills/btoa.ts"],"names":[],"mappings":"AAKA,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,UAE7B;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,UAAU,UAEhD"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
+
/* eslint-disable no-bitwise */
|
|
1
2
|
import { fromByteArray } from 'base64-js';
|
|
2
|
-
|
|
3
|
-
const b = [];
|
|
4
|
-
for (let i = 0; i < s.length; i += 1) {
|
|
5
|
-
b.push(s.charCodeAt(i));
|
|
6
|
-
}
|
|
7
|
-
return Uint8Array.from(b);
|
|
8
|
-
}
|
|
3
|
+
import toUtf8Array from './toUtf8Array';
|
|
9
4
|
export function btoa(s) {
|
|
10
|
-
return fromByteArray(
|
|
5
|
+
return fromByteArray(toUtf8Array(s));
|
|
11
6
|
}
|
|
12
7
|
export function base64FromByteArray(a) {
|
|
13
8
|
return fromByteArray(a);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"btoa.js","sourceRoot":"","sources":["../../../src/polyfills/btoa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,
|
|
1
|
+
{"version":3,"file":"btoa.js","sourceRoot":"","sources":["../../../src/polyfills/btoa.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,UAAU,IAAI,CAAC,CAAS;IAC5B,OAAO,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,CAAa;IAC/C,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toUtf8Array.d.ts","sourceRoot":"","sources":["../../../src/polyfills/toUtf8Array.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CA4B3D"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* eslint-disable no-plusplus */
|
|
2
|
+
/* eslint-disable no-bitwise */
|
|
3
|
+
// Originally from: https://github.com/google/closure-library/blob/a1f5a029c1b32eb4793a2d920aa52abc085e1bf7/closure/goog/crypt/crypt.js
|
|
4
|
+
// Once React Native versions uniformly support TextEncoder this code can be removed.
|
|
5
|
+
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
|
|
6
|
+
//
|
|
7
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
// you may not use this file except in compliance with the License.
|
|
9
|
+
// You may obtain a copy of the License at
|
|
10
|
+
//
|
|
11
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
//
|
|
13
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
// distributed under the License is distributed on an "AS-IS" BASIS,
|
|
15
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
// See the License for the specific language governing permissions and
|
|
17
|
+
// limitations under the License.
|
|
18
|
+
export default function toUtf8Array(str) {
|
|
19
|
+
const out = [];
|
|
20
|
+
let p = 0;
|
|
21
|
+
for (let i = 0; i < str.length; i += 1) {
|
|
22
|
+
let c = str.charCodeAt(i);
|
|
23
|
+
if (c < 128) {
|
|
24
|
+
out[p++] = c;
|
|
25
|
+
}
|
|
26
|
+
else if (c < 2048) {
|
|
27
|
+
out[p++] = (c >> 6) | 192;
|
|
28
|
+
out[p++] = (c & 63) | 128;
|
|
29
|
+
}
|
|
30
|
+
else if ((c & 0xfc00) === 0xd800 &&
|
|
31
|
+
i + 1 < str.length &&
|
|
32
|
+
(str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
|
|
33
|
+
// Surrogate Pair
|
|
34
|
+
c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);
|
|
35
|
+
out[p++] = (c >> 18) | 240;
|
|
36
|
+
out[p++] = ((c >> 12) & 63) | 128;
|
|
37
|
+
out[p++] = ((c >> 6) & 63) | 128;
|
|
38
|
+
out[p++] = (c & 63) | 128;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
out[p++] = (c >> 12) | 224;
|
|
42
|
+
out[p++] = ((c >> 6) & 63) | 128;
|
|
43
|
+
out[p++] = (c & 63) | 128;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return Uint8Array.from(out);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=toUtf8Array.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toUtf8Array.js","sourceRoot":"","sources":["../../../src/polyfills/toUtf8Array.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,+BAA+B;AAE/B,uIAAuI;AAEvI,qFAAqF;AAErF,mEAAmE;AACnE,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAW;IAC7C,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACtC,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,GAAG,GAAG,EAAE;YACX,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;SACd;aAAM,IAAI,CAAC,GAAG,IAAI,EAAE;YACnB,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;YAC1B,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC;SAC3B;aAAM,IACL,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;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10.
|
|
3
|
+
"version": "10.8.0",
|
|
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,12 +41,11 @@
|
|
|
41
41
|
"react-native": "*"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@launchdarkly/js-client-sdk-common": "1.
|
|
44
|
+
"@launchdarkly/js-client-sdk-common": "1.9.0",
|
|
45
45
|
"@react-native-async-storage/async-storage": "^1.21.0",
|
|
46
46
|
"base64-js": "^1.5.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@launchdarkly/private-js-mocks": "0.0.1",
|
|
50
49
|
"@testing-library/react": "^14.1.2",
|
|
51
50
|
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
|
52
51
|
"@types/jest": "^29.5.11",
|