-
Notifications
You must be signed in to change notification settings - Fork 1
FF-2139 Fix base64 encoding/decoding for React Native 0.72.x #75
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
3db16e3
to
d9ea513
Compare
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.
EXCELLENT job reproducing this and finding a solution that works 💪 💪 💪
"homepage": "https://github.com/Eppo-exp/js-client-sdk-common#readme", | ||
"devDependencies": { | ||
"@types/jest": "^29.5.11", | ||
"@types/js-base64": "^3.3.1", |
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.
📈
"md5": "^2.3.0", | ||
"pino": "^8.19.0", | ||
"semver": "^7.5.4", | ||
"universal-base64": "^2.1.0" |
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.
🪓
d9ea513
to
f330deb
Compare
yarn.lock
Outdated
"@types/react-native-base64@^0.2.2": | ||
version "0.2.2" | ||
resolved "https://registry.yarnpkg.com/@types/react-native-base64/-/react-native-base64-0.2.2.tgz#d4e1d537e6d547d23d96a1e64627acc13587ae6b" | ||
integrity sha512-obr+/L9Jaxdr+xCVS/IQcYgreg5xtnui4Wqw/G1acBUtW2CnqVJj6lK6F/5F3+5d2oZEo5xDDLqy8GVn2HbEmw== | ||
|
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.
whoops, I forgot to remove this. I was testing with this library at one point.
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.
Great find! Thank you for the thorough testing, makes me feel like we will deliver a solution to the customer reliably.
labels: mergeable
Fixes FF-2139
Motivation and Context
Fixes
Property 'atob' doesn't exist
error in React Native 0.72.xDescription
atob
andbtoa
are not built in to React Native's JS runtime for react-native 0.72. Theatob
andbtoa
were being used by theuniversal-base64
package. Replacing this package withjs-base64
provides a base64 implementation that doesn't rely on atob, btoa or Buffer existing.How has this been tested?
dist
dist
files, along with the newly installedjs-base64
module to mynode_modules/@eppo/js-client-sdk-common/dist
folder andnode_modules/
folders respectivelybtoa('asdf')
then decoding the result via the library.Before
After