[FSSDK-10316] crypto and text encoder polyfill addition for React native by junaed-optimizely · Pull Request #936 · optimizely/javascript-sdk

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@junaed-optimizely

Copy link Copy Markdown

Contributor

Summary

  • crypto module is not supported by React native. Our SDK currently throws "crypto.getRandomValues() not available" error. A polyfill has been added to avoid that issue.
  • Hermes (React native: JS engine) did not have TextEncoder support until recently. A polyfill has been added for react-native <= 0.73

Test plan

Modified existing React Native test to adjust with the current changes. Existing test should pass

Issues

FSSDK-10316

@coveralls

Copy link Copy Markdown

Coverage Status

coverage: 90.307%. remained the same
when pulling ff8c3c2 on junaed/fssdk-10316
into 4909efb on master.

@coveralls

Copy link Copy Markdown

Coverage Status

coverage: 90.307%. remained the same
when pulling bf50567 on junaed/fssdk-10316
into 4909efb on master.

Copy link Copy Markdown

Contributor

@mikechu-optimizely mikechu-optimizely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some nit but LGTM. Thanks for const+let

junaed-optimizely reacted with heart emoji

@coveralls

Copy link Copy Markdown

Coverage Status

coverage: 90.307%. remained the same
when pulling e0170f3 on junaed/fssdk-10316
into 4909efb on master.

@junaed-optimizely junaed-optimizely merged commit 46e2ab4 into master

Jun 28, 2024

@junaed-optimizely junaed-optimizely deleted the junaed/fssdk-10316 branch

June 28, 2024 14:08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mikechu-optimizely mikechu-optimizely mikechu-optimizely approved these changes

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@junaed-optimizely @coveralls @mikechu-optimizely