Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client

Fix up polyfills, remove unused deps (#9946)

authored by samuel.fm and committed by

GitHub 49272be3 85ffc779

+7 -60
+1 -1
docs/build.md
··· 164 164 `./platform/polyfills.*.ts` adds polyfills to the environment. Currently, this includes: 165 165 166 166 - TextEncoder / TextDecoder 167 - - react-native-url-polyfill 168 167 - Array#findLast (on web) 168 + - setImmediate (on web) 169 169 170 170 ### Sentry sourcemaps 171 171
-2
eslint.config.mjs
··· 23 23 { 24 24 ignores: [ 25 25 '**/__mocks__/*.ts', 26 - 'src/platform/polyfills.ts', 27 - 'src/third-party/**', 28 26 'ios/**', 29 27 'android/**', 30 28 'coverage/**',
-2
jest/jestSetup.js
··· 1 1 /* global jest */ 2 2 import 'react-native-gesture-handler/jestSetup' 3 - // IMPORTANT: this is what's used in the native runtime 4 - import 'react-native-url-polyfill/auto' 5 3 6 4 import {configure} from '@testing-library/react-native' 7 5
+1 -6
package.json
··· 132 132 "@types/invariant": "^2.2.37", 133 133 "@types/lodash.throttle": "^4.1.9", 134 134 "@types/node": "^20.14.3", 135 - "@zxing/text-encoding": "^0.9.0", 136 135 "array.prototype.findlast": "^1.2.3", 137 - "await-lock": "^2.2.2", 138 136 "babel-plugin-transform-remove-console": "^6.9.4", 139 137 "bcp-47": "^2.1.0", 140 138 "bcp-47-match": "^2.0.3", ··· 172 170 "expo-sms": "^14.0.7", 173 171 "expo-splash-screen": "~31.0.12", 174 172 "expo-system-ui": "~6.0.9", 175 - "expo-task-manager": "~14.0.9", 176 173 "expo-updates": "~29.0.14", 177 174 "expo-video": "~3.0.15", 178 175 "expo-video-thumbnails": "^10.0.8", 179 176 "expo-web-browser": "~15.0.10", 180 177 "fast-deep-equal": "^3.1.3", 181 178 "fast-text-encoding": "^1.0.6", 182 - "history": "^5.3.0", 183 179 "hls.js": "^1.6.2", 184 180 "idb-keyval": "^6.2.2", 185 181 "js-sha256": "^0.9.0", ··· 210 206 "react-native-drawer-layout": "^4.2.1", 211 207 "react-native-edge-to-edge": "^1.6.0", 212 208 "react-native-gesture-handler": "~2.28.0", 213 - "react-native-get-random-values": "~1.11.0", 214 209 "react-native-keyboard-controller": "^1.20.7", 215 210 "react-native-pager-view": "6.8.0", 216 211 "react-native-progress": "bluesky-social/react-native-progress", ··· 220 215 "react-native-screens": "^4.19.0", 221 216 "react-native-svg": "15.12.1", 222 217 "react-native-uitextview": "^1.4.0", 223 - "react-native-url-polyfill": "^1.3.0", 224 218 "react-native-uuid": "^2.0.3", 225 219 "react-native-view-shot": "^4.0.3", 226 220 "react-native-web": "^0.21.0", ··· 229 223 "react-remove-scroll-bar": "^2.3.8", 230 224 "react-responsive": "^10.0.1", 231 225 "react-textarea-autosize": "^8.5.3", 226 + "setimmediate": "^1.0.5", 232 227 "sonner": "^2.0.7", 233 228 "sonner-native": "^0.21.0", 234 229 "tippy.js": "^6.3.7",
+1 -1
src/platform/polyfills.ts
··· 1 - import 'react-native-url-polyfill/auto' 2 1 import 'fast-text-encoding' 2 + 3 3 export {}
+3 -4
src/platform/polyfills.web.ts
··· 1 1 import 'array.prototype.findlast/auto' 2 - /// <reference lib="dom" /> 3 - 4 - // @ts-ignore whatever typescript wants to complain about here, I dont care about -prf 5 - window.setImmediate = (cb: () => void) => setTimeout(cb, 0) 2 + import 'setimmediate' 6 3 7 4 if (process.env.NODE_ENV !== 'production') { 8 5 // In development, react-native-web's <View> tries to validate that ··· 32 29 } 33 30 } 34 31 } 32 + 33 + export {}
+1 -44
yarn.lock
··· 3427 3427 resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" 3428 3428 integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== 3429 3429 3430 - "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.6", "@babel/runtime@^7.20.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4": 3430 + "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.6", "@babel/runtime@^7.20.0", "@babel/runtime@^7.8.4": 3431 3431 version "7.22.10" 3432 3432 resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682" 3433 3433 integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ== ··· 8479 8479 js-yaml "^3.10.0" 8480 8480 tslib "^2.4.0" 8481 8481 8482 - "@zxing/text-encoding@^0.9.0": 8483 - version "0.9.0" 8484 - resolved "https://registry.yarnpkg.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz#fb50ffabc6c7c66a0c96b4c03e3d9be74864b70b" 8485 - integrity sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA== 8486 - 8487 8482 abab@^2.0.5, abab@^2.0.6: 8488 8483 version "2.0.6" 8489 8484 resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" ··· 11975 11970 "@react-native/normalize-colors" "0.81.5" 11976 11971 debug "^4.3.2" 11977 11972 11978 - expo-task-manager@~14.0.9: 11979 - version "14.0.9" 11980 - resolved "https://registry.yarnpkg.com/expo-task-manager/-/expo-task-manager-14.0.9.tgz#7e410711cf3fd0c465a191916d699c6560c93192" 11981 - integrity sha512-GKWtXrkedr4XChHfTm5IyTcSfMtCPxzx89y4CMVqKfyfROATibrE/8UI5j7UC/pUOfFoYlQvulQEvECMreYuUA== 11982 - dependencies: 11983 - unimodules-app-loader "~6.0.8" 11984 - 11985 11973 expo-updates-interface@~2.0.0: 11986 11974 version "2.0.0" 11987 11975 resolved "https://registry.yarnpkg.com/expo-updates-interface/-/expo-updates-interface-2.0.0.tgz#7721cb64c37bcb46b23827b2717ef451a9378749" ··· 12095 12083 type-is "~1.6.18" 12096 12084 utils-merge "1.0.1" 12097 12085 vary "~1.1.2" 12098 - 12099 - fast-base64-decode@^1.0.0: 12100 - version "1.0.0" 12101 - resolved "https://registry.yarnpkg.com/fast-base64-decode/-/fast-base64-decode-1.0.0.tgz#b434a0dd7d92b12b43f26819300d2dafb83ee418" 12102 - integrity sha512-qwaScUgUGBYeDNRnbc/KyllVU88Jk1pRHPStuF/lO7B0/RTRLj7U0lkdTAutlBblY08rwZDff6tNU9cjv6j//Q== 12103 12086 12104 12087 fast-deep-equal@^3, fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: 12105 12088 version "3.1.3" ··· 12966 12949 dependencies: 12967 12950 hermes-estree "0.25.1" 12968 12951 12969 - history@^5.3.0: 12970 - version "5.3.0" 12971 - resolved "https://registry.yarnpkg.com/history/-/history-5.3.0.tgz#1548abaa245ba47992f063a0783db91ef201c73b" 12972 - integrity sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ== 12973 - dependencies: 12974 - "@babel/runtime" "^7.7.6" 12975 - 12976 12952 hls.js@^1.6.2: 12977 12953 version "1.6.2" 12978 12954 resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.6.2.tgz#02272bea644b5f61f71741256618d6b629ae7834" ··· 17368 17344 hoist-non-react-statics "^3.3.0" 17369 17345 invariant "^2.2.4" 17370 17346 17371 - react-native-get-random-values@~1.11.0: 17372 - version "1.11.0" 17373 - resolved "https://registry.yarnpkg.com/react-native-get-random-values/-/react-native-get-random-values-1.11.0.tgz#1ca70d1271f4b08af92958803b89dccbda78728d" 17374 - integrity sha512-4BTbDbRmS7iPdhYLRcz3PGFIpFJBwNZg9g42iwa2P6FOv9vZj/xJc678RZXnLNZzd0qd7Q3CCF6Yd+CU2eoXKQ== 17375 - dependencies: 17376 - fast-base64-decode "^1.0.0" 17377 - 17378 17347 react-native-is-edge-to-edge@1.1.7: 17379 17348 version "1.1.7" 17380 17349 resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.1.7.tgz#28947688f9fafd584e73a4f935ea9603bd9b1939" ··· 17455 17424 version "1.4.0" 17456 17425 resolved "https://registry.yarnpkg.com/react-native-uitextview/-/react-native-uitextview-1.4.0.tgz#d1b583cc173cec00f4fdd03744cca76c54a12fbb" 17457 17426 integrity sha512-itm/frzkn/ma3+lwmKn2CkBOXPNo4bL8iVwQwjlzix5gVO59T2+axdfoj/Wi+Ra6F76KzNKxSah+7Y8dYmCHbQ== 17458 - 17459 - react-native-url-polyfill@^1.3.0: 17460 - version "1.3.0" 17461 - resolved "https://registry.yarnpkg.com/react-native-url-polyfill/-/react-native-url-polyfill-1.3.0.tgz#c1763de0f2a8c22cc3e959b654c8790622b6ef6a" 17462 - integrity sha512-w9JfSkvpqqlix9UjDvJjm1EjSt652zVQ6iwCIj1cVVkwXf4jQhQgTNXY6EVTwuAmUjg6BC6k9RHCBynoLFo3IQ== 17463 - dependencies: 17464 - whatwg-url-without-unicode "8.0.0-3" 17465 17427 17466 17428 react-native-uuid@^2.0.3: 17467 17429 version "2.0.3" ··· 19782 19744 version "0.14.5" 19783 19745 resolved "https://registry.yarnpkg.com/unicode-segmenter/-/unicode-segmenter-0.14.5.tgz#c658f6dd30de172cdcd94542adc205ba43fb63c6" 19784 19746 integrity sha512-jHGmj2LUuqDcX3hqY12Ql+uhUTn8huuxNZGq7GvtF6bSybzH3aFgedYu/KTzQStEgt1Ra2F3HxadNXsNjb3m3g== 19785 - 19786 - unimodules-app-loader@~6.0.8: 19787 - version "6.0.8" 19788 - resolved "https://registry.yarnpkg.com/unimodules-app-loader/-/unimodules-app-loader-6.0.8.tgz#81c868b726e24b7e37d708fe0117e1869c721cdb" 19789 - integrity sha512-fqS8QwT/MC/HAmw1NKCHdzsPA6WaLm0dNmoC5Pz6lL+cDGYeYCNdHMO9fy08aL2ZD7cVkNM0pSR/AoNRe+rslA== 19790 19747 19791 19748 unique-string@~2.0.0: 19792 19749 version "2.0.0"