Skip to content

Commit

Permalink
chore: upgrade webview to get rid of polyfill (#130)
Browse files Browse the repository at this point in the history
* chore: add todo in crypto polyfill

* chore: replace with webview crypto package
  • Loading branch information
im-adithya authored Sep 18, 2024
1 parent 4f05700 commit bc4f0c2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 187 deletions.
2 changes: 1 addition & 1 deletion app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as React from "react";
import { SafeAreaView } from "react-native";
import { NAV_THEME } from "~/lib/constants";
import { useColorScheme } from "~/lib/useColorScheme";
import PolyfillCrypto from "~/polyfill";
import PolyfillCrypto from "react-native-webview-crypto";
import { SWRConfig } from "swr";
import { swrConfiguration } from "lib/swr";
import Toast from "react-native-toast-message";
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"react-native-toast-message": "^2.2.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-webview": "13.8.6",
"webview-crypto": "^0.1.13",
"react-native-webview-crypto": "^0.0.26",
"swr": "^2.2.5",
"tailwind-merge": "^2.3.0",
"text-encoding": "^0.7.0",
Expand All @@ -66,4 +66,4 @@
"typescript": "~5.3.3"
},
"private": true
}
}
183 changes: 0 additions & 183 deletions polyfill/index.js

This file was deleted.

16 changes: 15 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3541,7 +3541,7 @@ emoji-regex@^9.2.2:
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==

encode-utf8@^1.0.3:
encode-utf8@^1.0.2, encode-utf8@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda"
integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==
Expand Down Expand Up @@ -3911,6 +3911,11 @@ fast-base64-decode@^1.0.0:
resolved "https://registry.yarnpkg.com/fast-base64-decode/-/fast-base64-decode-1.0.0.tgz#b434a0dd7d92b12b43f26819300d2dafb83ee418"
integrity sha512-qwaScUgUGBYeDNRnbc/KyllVU88Jk1pRHPStuF/lO7B0/RTRLj7U0lkdTAutlBblY08rwZDff6tNU9cjv6j//Q==

fast-base64-encode@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fast-base64-encode/-/fast-base64-encode-1.0.0.tgz#883945eb67e139dbf5a877bcca57a89e6824c7d4"
integrity sha512-z2XCzVK4fde2cuTEHu2QGkLD6BPtJNKJPn0Z7oINvmhq/quUuIIVPYKUdN0gYeZqOyurjJjBH/bUzK5gafyHvw==

fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
Expand Down Expand Up @@ -6542,6 +6547,15 @@ react-native-url-polyfill@^2.0.0:
dependencies:
whatwg-url-without-unicode "8.0.0-3"

react-native-webview-crypto@^0.0.26:
version "0.0.26"
resolved "https://registry.yarnpkg.com/react-native-webview-crypto/-/react-native-webview-crypto-0.0.26.tgz#bce360876ed3367e677cb5cfa88564ca892ba72f"
integrity sha512-RshjQDik60LOhh7Q+SKIsXjnCgCIBZqZOB+v4MWa7l+0uAEyeZyMkWKL0xJRzWfTQ9vnLu4nHyn6qjEEi0uHnA==
dependencies:
encode-utf8 "^1.0.2"
fast-base64-encode "^1.0.0"
webview-crypto "^0.1.13"

[email protected]:
version "13.8.6"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.8.6.tgz#5d4a62cb311d5ef8d910a8e112b3f1f2807bcd18"
Expand Down

0 comments on commit bc4f0c2

Please sign in to comment.