Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

React compiler beta and reenable rule (#5898)

* use react compiler beta and reenable rule

* use react-compiler-runtime

* error -> warn

* move runtime out of dev deps

authored by

Samuel Newman and committed by
GitHub
1fc684aa a22685c3

+30 -125
+1 -2
.eslintrc.js
··· 79 79 }, 80 80 ], 81 81 'simple-import-sort/exports': 'error', 82 - // TODO: Reenable when we figure out why it gets stuck on CI. 83 - // 'react-compiler/react-compiler': 'error', 82 + 'react-compiler/react-compiler': 'warn', 84 83 'no-restricted-imports': [ 85 84 'error', 86 85 {
+1 -6
babel.config.js
··· 17 17 ], 18 18 plugins: [ 19 19 'macros', 20 - [ 21 - 'babel-plugin-react-compiler', 22 - { 23 - runtimeModule: 'react-compiler-runtime', 24 - }, 25 - ], 20 + ['babel-plugin-react-compiler', {target: '18'}], 26 21 [ 27 22 'module:react-native-dotenv', 28 23 {
-21
lib/react-compiler-runtime/index.js
··· 1 - const React = require('react') 2 - const $empty = Symbol.for('react.memo_cache_sentinel') 3 - /** 4 - * DANGER: this hook is NEVER meant to be called directly! 5 - * 6 - * Note that this is a temporary userspace implementation of this function 7 - * from React 19. It is not as efficient and may invalidate more frequently 8 - * than the official API. Please upgrade to React 19 as soon as you can. 9 - **/ 10 - export function c(size) { 11 - // eslint-disable-next-line react-hooks/rules-of-hooks 12 - return React.useState(() => { 13 - const $ = new Array(size) 14 - for (let ii = 0; ii < size; ii++) { 15 - $[ii] = $empty 16 - } 17 - // @ts-ignore 18 - $[$empty] = true 19 - return $ 20 - })[0] 21 - }
-9
lib/react-compiler-runtime/package.json
··· 1 - { 2 - "name": "react-compiler-runtime", 3 - "version": "0.0.1", 4 - "license": "MIT", 5 - "main": "index.js", 6 - "peerDependencies": { 7 - "react": "^18.2.0" 8 - } 9 - }
+3 -3
package.json
··· 164 164 "postinstall-postinstall": "^2.1.0", 165 165 "psl": "^1.9.0", 166 166 "react": "18.2.0", 167 - "react-compiler-runtime": "file:./lib/react-compiler-runtime", 167 + "react-compiler-runtime": "^19.0.0-beta-6fc168f-20241025", 168 168 "react-dom": "^18.2.0", 169 169 "react-image-crop": "^11.0.7", 170 170 "react-keyed-flatten-children": "^3.0.0", ··· 241 241 "babel-loader": "^9.1.2", 242 242 "babel-plugin-macros": "^3.1.0", 243 243 "babel-plugin-module-resolver": "^5.0.0", 244 - "babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517", 244 + "babel-plugin-react-compiler": "^19.0.0-beta-6fc168f-20241025", 245 245 "babel-plugin-react-native-web": "^0.18.12", 246 246 "babel-preset-expo": "^10.0.0", 247 247 "eslint": "^8.19.0", ··· 249 249 "eslint-plugin-ft-flow": "^2.0.3", 250 250 "eslint-plugin-lingui": "^0.2.0", 251 251 "eslint-plugin-react": "^7.33.2", 252 - "eslint-plugin-react-compiler": "^0.0.0-experimental-c8b3f72-20240517", 252 + "eslint-plugin-react-compiler": "^19.0.0-beta-6fc168f-20241025", 253 253 "eslint-plugin-react-native-a11y": "^3.3.0", 254 254 "eslint-plugin-simple-import-sort": "^12.0.0", 255 255 "html-webpack-plugin": "^5.5.0",
+25 -84
yarn.lock
··· 1253 1253 eslint-visitor-keys "^2.1.0" 1254 1254 semver "^6.3.1" 1255 1255 1256 - "@babel/generator@7.2.0": 1257 - version "7.2.0" 1258 - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.0.tgz#eaf3821fa0301d9d4aef88e63d4bcc19b73ba16c" 1259 - integrity sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg== 1260 - dependencies: 1261 - "@babel/types" "^7.2.0" 1262 - jsesc "^2.5.1" 1263 - lodash "^4.17.10" 1264 - source-map "^0.5.0" 1265 - trim-right "^1.0.1" 1266 - 1267 1256 "@babel/generator@^7.20.0", "@babel/generator@^7.22.10", "@babel/generator@^7.7.2": 1268 1257 version "7.22.10" 1269 1258 resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722" ··· 2953 2942 "@babel/helper-validator-identifier" "^7.22.5" 2954 2943 to-fast-properties "^2.0.0" 2955 2944 2956 - "@babel/types@^7.19.0", "@babel/types@^7.2.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5": 2945 + "@babel/types@^7.19.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5": 2957 2946 version "7.24.5" 2958 2947 resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.5.tgz#7661930afc638a5383eb0c4aee59b74f38db84d7" 2959 2948 integrity sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ== ··· 4706 4695 slash "^3.0.0" 4707 4696 write-file-atomic "^4.0.2" 4708 4697 4709 - "@jest/types@^24.9.0": 4710 - version "24.9.0" 4711 - resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" 4712 - integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== 4713 - dependencies: 4714 - "@types/istanbul-lib-coverage" "^2.0.0" 4715 - "@types/istanbul-reports" "^1.1.1" 4716 - "@types/yargs" "^13.0.0" 4717 - 4718 4698 "@jest/types@^26.6.2": 4719 4699 version "26.6.2" 4720 4700 resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" ··· 7182 7162 dependencies: 7183 7163 "@types/istanbul-lib-coverage" "*" 7184 7164 7185 - "@types/istanbul-reports@^1.1.1": 7186 - version "1.1.2" 7187 - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" 7188 - integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== 7189 - dependencies: 7190 - "@types/istanbul-lib-coverage" "*" 7191 - "@types/istanbul-lib-report" "*" 7192 - 7193 7165 "@types/istanbul-reports@^3.0.0": 7194 7166 version "3.0.1" 7195 7167 resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" ··· 7488 7460 resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" 7489 7461 integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== 7490 7462 7491 - "@types/yargs@^13.0.0": 7492 - version "13.0.12" 7493 - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.12.tgz#d895a88c703b78af0465a9de88aa92c61430b092" 7494 - integrity sha512-qCxJE1qgz2y0hA4pIxjBR+PelCH0U5CK1XJXFwCNqfmliatKp47UCXXE9Dyk1OXBDLvsCF57TqQEJaeLfDYEOQ== 7495 - dependencies: 7496 - "@types/yargs-parser" "*" 7497 - 7498 7463 "@types/yargs@^15.0.0": 7499 7464 version "15.0.15" 7500 7465 resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.15.tgz#e609a2b1ef9e05d90489c2f5f45bbfb2be092158" ··· 7990 7955 resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" 7991 7956 integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== 7992 7957 7993 - ansi-regex@^4.0.0, ansi-regex@^4.1.0: 7958 + ansi-regex@^4.1.0: 7994 7959 version "4.1.1" 7995 7960 resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" 7996 7961 integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== ··· 8515 8480 dependencies: 8516 8481 "@babel/helper-define-polyfill-provider" "^0.4.2" 8517 8482 8518 - babel-plugin-react-compiler@^0.0.0-experimental-592953e-20240517: 8519 - version "0.0.0-experimental-592953e-20240517" 8520 - resolved "https://registry.yarnpkg.com/babel-plugin-react-compiler/-/babel-plugin-react-compiler-0.0.0-experimental-592953e-20240517.tgz#e800fa1550d03573cd5637218dc711f12f642249" 8521 - integrity sha512-OjG1SVaeQZaJrqkMFJatg8W/MTow8Ak5rx2SI0ETQBO1XvOk/XZGMbltNCPdFJLKghBYoBjC+Y3Ap/Xr7B01mA== 8483 + babel-plugin-react-compiler@^19.0.0-beta-6fc168f-20241025: 8484 + version "19.0.0-beta-6fc168f-20241025" 8485 + resolved "https://registry.yarnpkg.com/babel-plugin-react-compiler/-/babel-plugin-react-compiler-19.0.0-beta-6fc168f-20241025.tgz#b9cb5dfa309cce094d35c753e92cca2730fcfc39" 8486 + integrity sha512-wFVeXhF0hkiRe4bEM0jzeTFMlMbcKNTwhXcFvqUIVB6WXf+3vdwOWGWnw7jwvDb2mzvsIZOFt/96itOFt1rwjw== 8522 8487 dependencies: 8523 - "@babel/generator" "7.2.0" 8524 8488 "@babel/types" "^7.19.0" 8525 - chalk "4" 8526 - invariant "^2.2.4" 8527 - pretty-format "^24" 8528 - zod "^3.22.4" 8529 - zod-validation-error "^2.1.0" 8530 8489 8531 8490 babel-plugin-react-native-web@^0.18.12, babel-plugin-react-native-web@~0.18.10: 8532 8491 version "0.18.12" ··· 9065 9024 resolved "https://registry.yarnpkg.com/cborg/-/cborg-1.10.2.tgz#83cd581b55b3574c816f82696307c7512db759a1" 9066 9025 integrity sha512-b3tFPA9pUr2zCUiCfRd2+wok2/LBSNUMKOuRRok+WlvvAgEt/PlbgPTsZUcwCOs53IJvLgTp0eotwtosE6njug== 9067 9026 9068 - chalk@4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: 9069 - version "4.1.2" 9070 - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" 9071 - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== 9072 - dependencies: 9073 - ansi-styles "^4.1.0" 9074 - supports-color "^7.1.0" 9075 - 9076 9027 chalk@5.3.0: 9077 9028 version "5.3.0" 9078 9029 resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" ··· 9091 9042 version "3.0.0" 9092 9043 resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" 9093 9044 integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== 9045 + dependencies: 9046 + ansi-styles "^4.1.0" 9047 + supports-color "^7.1.0" 9048 + 9049 + chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: 9050 + version "4.1.2" 9051 + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" 9052 + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== 9094 9053 dependencies: 9095 9054 ansi-styles "^4.1.0" 9096 9055 supports-color "^7.1.0" ··· 10930 10889 dependencies: 10931 10890 prettier-linter-helpers "^1.0.0" 10932 10891 10933 - eslint-plugin-react-compiler@^0.0.0-experimental-c8b3f72-20240517: 10934 - version "0.0.0-experimental-c8b3f72-20240517" 10935 - resolved "https://registry.yarnpkg.com/eslint-plugin-react-compiler/-/eslint-plugin-react-compiler-0.0.0-experimental-c8b3f72-20240517.tgz#56b512aa0d6dbf051be0d297bde1d696e412bc50" 10936 - integrity sha512-cxUTFNMEKiLX6uFaRfrr2GHnB7KUHDMYLjEGzDec82ka6WyBCHg906nGSf3JvVnQKHaBDfUk7Mmv/JMvdgQB8Q== 10892 + eslint-plugin-react-compiler@^19.0.0-beta-6fc168f-20241025: 10893 + version "19.0.0-beta-6fc168f-20241025" 10894 + resolved "https://registry.yarnpkg.com/eslint-plugin-react-compiler/-/eslint-plugin-react-compiler-19.0.0-beta-6fc168f-20241025.tgz#dbd1f54b1019a437f09fc9547bea53f82e6026af" 10895 + integrity sha512-mHn5tYt9dT4GiXHF5muiz6p+4Lirgi0Oc87N2KrbB/ciSkT+VZ8iJA+6bbS4//ljYzYbxBbPMHWS/dZWhQrbpQ== 10937 10896 dependencies: 10938 10897 "@babel/core" "^7.24.4" 10939 10898 "@babel/parser" "^7.24.4" ··· 15171 15130 resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" 15172 15131 integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== 15173 15132 15174 - lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: 15133 + lodash@^4.17.13, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: 15175 15134 version "4.17.21" 15176 15135 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" 15177 15136 integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== ··· 17527 17486 lodash "^4.17.20" 17528 17487 renderkid "^3.0.0" 17529 17488 17530 - pretty-format@^24: 17531 - version "24.9.0" 17532 - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" 17533 - integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== 17534 - dependencies: 17535 - "@jest/types" "^24.9.0" 17536 - ansi-regex "^4.0.0" 17537 - ansi-styles "^3.2.0" 17538 - react-is "^16.8.4" 17539 - 17540 17489 pretty-format@^26.5.2, pretty-format@^26.6.2: 17541 17490 version "26.6.2" 17542 17491 resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" ··· 17978 17927 regenerator-runtime "^0.13.9" 17979 17928 whatwg-fetch "^3.6.2" 17980 17929 17981 - "react-compiler-runtime@file:./lib/react-compiler-runtime": 17982 - version "0.0.1" 17930 + react-compiler-runtime@^19.0.0-beta-6fc168f-20241025: 17931 + version "19.0.0-beta-6fc168f-20241025" 17932 + resolved "https://registry.yarnpkg.com/react-compiler-runtime/-/react-compiler-runtime-19.0.0-beta-6fc168f-20241025.tgz#008434181820f449b355e9bf36e1af2a9c8e5b5e" 17933 + integrity sha512-XY5p6GUVaz8P0c/B/2ebqz/xdp0YOtidtOSuiYyQB05fMws0Qys+zubDH7IKQBEtw4AKoCzrJ6ReeTtFLOKniw== 17983 17934 17984 17935 react-dev-utils@^12.0.1: 17985 17936 version "12.0.1" ··· 18047 17998 resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" 18048 17999 integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== 18049 18000 18050 - react-is@^16.13.0, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.4: 18001 + react-is@^16.13.0, react-is@^16.13.1, react-is@^16.7.0: 18051 18002 version "16.13.1" 18052 18003 resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" 18053 18004 integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== ··· 19467 19418 resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 19468 19419 integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 19469 19420 19470 - source-map@^0.5.0, source-map@^0.5.6: 19421 + source-map@^0.5.6: 19471 19422 version "0.5.7" 19472 19423 resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" 19473 19424 integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== ··· 20395 20346 resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.7.tgz#46961cd2d57dd8706c36664acde06a248f1173fe" 20396 20347 integrity sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg== 20397 20348 20398 - trim-right@^1.0.1: 20399 - version "1.0.1" 20400 - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" 20401 - integrity sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw== 20402 - 20403 20349 tryer@^1.0.1: 20404 20350 version "1.0.1" 20405 20351 resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" ··· 21795 21741 "@radix-ui/react-context-menu" "^2.0.1" 21796 21742 "@radix-ui/react-dropdown-menu" "^2.0.1" 21797 21743 sf-symbols-typescript "^1.0.0" 21798 - 21799 - zod-validation-error@^2.1.0: 21800 - version "2.1.0" 21801 - resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-2.1.0.tgz#208eac75237dfed47c0018d2fe8fd03501bfc9ac" 21802 - integrity sha512-VJh93e2wb4c3tWtGgTa0OF/dTt/zoPCPzXq4V11ZjxmEAFaPi/Zss1xIZdEB5RD8GD00U0/iVXgqkF77RV7pdQ== 21803 21744 21804 21745 zod-validation-error@^3.0.3: 21805 21746 version "3.3.0"