-
Notifications
You must be signed in to change notification settings - Fork 25
fix: Fix base64 encoding of unicode characters. #613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
import { fromByteArray } from 'base64-js'; | ||
|
||
function convertToByteArray(s: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code would only work for ASCII basically.
@@ -0,0 +1,13 @@ | |||
import PlatformEncoding from '../../src/platform/PlatformEncoding'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied the tests from the browser implementation.
@@ -0,0 +1,50 @@ | |||
/* eslint-disable no-plusplus */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few packages we could use instead, but all have more things in them than we need. The closure library seems like a reasonable source for an implementation.
🤖 I have created a release *beep* *boop* --- <details><summary>akamai-edgeworker-sdk-common: 1.2.1</summary> ## [1.2.1](akamai-edgeworker-sdk-common-v1.2.0...akamai-edgeworker-sdk-common-v1.2.1) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from ^2.7.0 to ^2.8.0 </details> <details><summary>akamai-server-base-sdk: 2.1.17</summary> ## [2.1.17](akamai-server-base-sdk-v2.1.16...akamai-server-base-sdk-v2.1.17) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.2.0 to ^1.2.1 * @launchdarkly/js-server-sdk-common bumped from ^2.7.0 to ^2.8.0 </details> <details><summary>akamai-server-edgekv-sdk: 1.1.17</summary> ## [1.1.17](akamai-server-edgekv-sdk-v1.1.16...akamai-server-edgekv-sdk-v1.1.17) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.2.0 to ^1.2.1 * @launchdarkly/js-server-sdk-common bumped from ^2.7.0 to ^2.8.0 </details> <details><summary>cloudflare-server-sdk: 2.5.15</summary> ## [2.5.15](cloudflare-server-sdk-v2.5.14...cloudflare-server-sdk-v2.5.15) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/js-server-sdk-common-edge bumped from 2.4.0 to 2.4.1 </details> <details><summary>js-client-sdk-common: 1.9.0</summary> ## [1.9.0](js-client-sdk-common-v1.8.0...js-client-sdk-common-v1.9.0) (2024-10-09) ### Features * Add basic secure mode support for browser SDK. ([#598](#598)) ([3389983](3389983)) * Add bootstrap support. ([#600](#600)) ([4e5dbee](4e5dbee)) * Add ESM support for common and common-client (rollup) ([#604](#604)) ([8cd0cdc](8cd0cdc)) * Add support for hooks. ([#605](#605)) ([04d347b](04d347b)) * Add visibility handling to allow proactive event flushing. ([#607](#607)) ([819a311](819a311)) * adds datasource status to sdk-client ([#590](#590)) ([6f26204](6f26204)) * adds support for individual flag change listeners ([#608](#608)) ([da31436](da31436)) * Browser-SDK Automatically start streaming based on event handlers. ([#592](#592)) ([f2e5cbf](f2e5cbf)) ### Bug Fixes * Ensure client logger is always wrapped in a safe logger. ([#599](#599)) ([980e4da](980e4da)) * Use flagVersion in analytics events. ([#611](#611)) ([35fa033](35fa033)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-sdk-common bumped from 2.9.0 to 2.10.0 </details> <details><summary>js-sdk-common: 2.10.0</summary> ## [2.10.0](js-sdk-common-v2.9.0...js-sdk-common-v2.10.0) (2024-10-09) ### Features * Add ESM support for common and common-client (rollup) ([#604](#604)) ([8cd0cdc](8cd0cdc)) * Add visibility handling to allow proactive event flushing. ([#607](#607)) ([819a311](819a311)) * adds datasource status to sdk-client ([#590](#590)) ([6f26204](6f26204)) </details> <details><summary>js-server-sdk-common: 2.8.0</summary> ## [2.8.0](js-server-sdk-common-v2.7.0...js-server-sdk-common-v2.8.0) (2024-10-09) ### Features * adds datasource status to sdk-client ([#590](#590)) ([6f26204](6f26204)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-sdk-common bumped from 2.9.0 to 2.10.0 </details> <details><summary>js-server-sdk-common-edge: 2.4.1</summary> ## [2.4.1](js-server-sdk-common-edge-v2.4.0...js-server-sdk-common-edge-v2.4.1) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.7.0 to 2.8.0 </details> <details><summary>node-server-sdk: 9.6.1</summary> ## [9.6.1](node-server-sdk-v9.6.0...node-server-sdk-v9.6.1) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.7.0 to 2.8.0 </details> <details><summary>node-server-sdk-dynamodb: 6.1.23</summary> ## [6.1.23](node-server-sdk-dynamodb-v6.1.22...node-server-sdk-dynamodb-v6.1.23) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.6.0 to 9.6.1 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.6.1 </details> <details><summary>node-server-sdk-otel: 1.0.15</summary> ## [1.0.15](node-server-sdk-otel-v1.0.14...node-server-sdk-otel-v1.0.15) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.6.0 to 9.6.1 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.6.1 </details> <details><summary>node-server-sdk-redis: 4.1.23</summary> ## [4.1.23](node-server-sdk-redis-v4.1.22...node-server-sdk-redis-v4.1.23) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.6.0 to 9.6.1 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.6.1 </details> <details><summary>react-native-client-sdk: 10.8.0</summary> ## [10.8.0](react-native-client-sdk-v10.7.0...react-native-client-sdk-v10.8.0) (2024-10-09) ### Features * Add support for hooks. ([#605](#605)) ([04d347b](04d347b)) ### Bug Fixes * Ensure client logger is always wrapped in a safe logger. ([#599](#599)) ([980e4da](980e4da)) * Fix base64 encoding of unicode characters. ([#613](#613)) ([35ec8d1](35ec8d1)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk-common bumped from 1.8.0 to 1.9.0 </details> <details><summary>vercel-server-sdk: 1.3.18</summary> ## [1.3.18](vercel-server-sdk-v1.3.17...vercel-server-sdk-v1.3.18) (2024-10-09) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common-edge bumped from 2.4.0 to 2.4.1 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
No description provided.