Fix transpiling. Recursive error and React hasOwnProperty errors are fixed

This commit is contained in:
Mustafa Gezen 2023-08-26 03:08:04 +02:00
parent d6cf82f811
commit c02a30aaa8
5 changed files with 93 additions and 85 deletions

13
.swcrc
View File

@ -1,25 +1,24 @@
{
"module": {
"type": "commonjs",
"type": "es6",
"strict": true,
"strictMode": true
"strictMode": false
},
"jsc": {
"parser": {
"syntax": "typescript",
"jsx": true,
"dynamicImport": false,
"dynamicImport": true,
"privateMethod": false,
"functionBind": false,
"exportDefaultFrom": true,
"exportNamespaceFrom": false,
"exportNamespaceFrom": true,
"decorators": true,
"decoratorsBeforeExport": false,
"topLevelAwait": true,
"importMeta": false,
"topLevelAwait": false,
"importMeta": true,
"tsx": true
},
"transform": null,
"target": "es2017",
"loose": true,
"externalHelpers": false,

View File

@ -12,11 +12,11 @@
"devDependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.3",
"@mui/icons-material": "^5.14.6",
"@mui/lab": "5.0.0-alpha.141",
"@mui/material": "^5.14.6",
"@swc/core": "1.3.75",
"@types/react": "^18.2.20",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"await-to-js": "^3.0.0",
"prettier": "^3.0.2",

View File

@ -3,11 +3,11 @@ lockfileVersion: 5.4
specifiers:
'@emotion/react': ^11.11.1
'@emotion/styled': ^11.11.0
'@mui/icons-material': ^5.14.3
'@mui/icons-material': ^5.14.6
'@mui/lab': 5.0.0-alpha.141
'@mui/material': ^5.14.6
'@swc/core': 1.3.75
'@types/react': ^18.2.20
'@types/react': ^18.2.21
'@types/react-dom': ^18.2.7
await-to-js: ^3.0.0
prettier: ^3.0.2
@ -18,13 +18,13 @@ specifiers:
tslib: ^2.6.2
devDependencies:
'@emotion/react': 11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy
'@emotion/styled': 11.11.0_yteb73ll6h6uyykb3t5anncyhm
'@mui/icons-material': 5.14.3_673mxxvtl56vebfkk734u4v73i
'@mui/lab': 5.0.0-alpha.141_f7gnbtiirv56mm335hdhfqhdam
'@mui/material': 5.14.6_ho7f4muyxo2kcc3eb2wgnvahca
'@emotion/react': 11.11.1_gq4reeurwxuj4hvyerswzzqthy
'@emotion/styled': 11.11.0_rra5sb3jh6znd7zvpi7zwpaeky
'@mui/icons-material': 5.14.6_75sn5m6smxso6qw47m6gix63iq
'@mui/lab': 5.0.0-alpha.141_ikl3qzuejbxlivat7fk5o34fnu
'@mui/material': 5.14.6_mcyaowhjtk6juxjmabqaayfcxi
'@swc/core': 1.3.75
'@types/react': 18.2.20
'@types/react': 18.2.21
'@types/react-dom': 18.2.7
await-to-js: 3.0.0
prettier: 3.0.2
@ -48,7 +48,7 @@ packages:
resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.22.10
'@babel/types': 7.22.11
dev: true
/@babel/helper-string-parser/7.22.5:
@ -70,15 +70,15 @@ packages:
js-tokens: 4.0.0
dev: true
/@babel/runtime/7.22.10:
resolution: {integrity: sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==}
/@babel/runtime/7.22.11:
resolution: {integrity: sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==}
engines: {node: '>=6.9.0'}
dependencies:
regenerator-runtime: 0.14.0
dev: true
/@babel/types/7.22.10:
resolution: {integrity: sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==}
/@babel/types/7.22.11:
resolution: {integrity: sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/helper-string-parser': 7.22.5
@ -90,7 +90,7 @@ packages:
resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==}
dependencies:
'@babel/helper-module-imports': 7.22.5
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
'@emotion/hash': 0.9.1
'@emotion/memoize': 0.8.1
'@emotion/serialize': 1.1.2
@ -126,7 +126,7 @@ packages:
resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==}
dev: true
/@emotion/react/11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy:
/@emotion/react/11.11.1_gq4reeurwxuj4hvyerswzzqthy:
resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==}
peerDependencies:
'@types/react': '*'
@ -135,14 +135,14 @@ packages:
'@types/react':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
'@emotion/babel-plugin': 11.11.0
'@emotion/cache': 11.11.0
'@emotion/serialize': 1.1.2
'@emotion/use-insertion-effect-with-fallbacks': 1.0.1_react@18.2.0
'@emotion/utils': 1.2.1
'@emotion/weak-memoize': 0.3.1
'@types/react': 18.2.20
'@types/react': 18.2.21
hoist-non-react-statics: 3.3.2
react: 18.2.0
dev: true
@ -161,7 +161,7 @@ packages:
resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==}
dev: true
/@emotion/styled/11.11.0_yteb73ll6h6uyykb3t5anncyhm:
/@emotion/styled/11.11.0_rra5sb3jh6znd7zvpi7zwpaeky:
resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==}
peerDependencies:
'@emotion/react': ^11.0.0-rc.0
@ -171,14 +171,14 @@ packages:
'@types/react':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
'@emotion/babel-plugin': 11.11.0
'@emotion/is-prop-valid': 1.2.1
'@emotion/react': 11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy
'@emotion/react': 11.11.1_gq4reeurwxuj4hvyerswzzqthy
'@emotion/serialize': 1.1.2
'@emotion/use-insertion-effect-with-fallbacks': 1.0.1_react@18.2.0
'@emotion/utils': 1.2.1
'@types/react': 18.2.20
'@types/react': 18.2.21
react: 18.2.0
dev: true
@ -230,7 +230,7 @@ packages:
resolution: {integrity: sha512-m0G6wlnhm/AX0H12IOWtK8gASEMffnX08RtKkCgTdHb9JpHKGloI7icFfLg9ZmQeavcvR0PKmzxClyuFPSjKWw==}
dev: true
/@mui/base/5.0.0-beta.12_qflmzdebv2ewfrqz6op6ohcc2q:
/@mui/base/5.0.0-beta.12_vnxzf5c44dqo4vncfl2mrh2gwm:
resolution: {integrity: sha512-tZjjXNAyUpwSDT1uRliZMhRQkWYzELJ8Qi61EuOMRpi36HIwnK2T7Nr4RI423Sv8G2EEikDAZj7je33eNd73NQ==}
engines: {node: '>=12.0.0'}
peerDependencies:
@ -241,13 +241,13 @@ packages:
'@types/react':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
'@emotion/is-prop-valid': 1.2.1
'@floating-ui/react-dom': 2.0.1_biqbaboplfbrettd7655fr4n2y
'@mui/types': 7.2.4_@types+react@18.2.20
'@mui/types': 7.2.4_@types+react@18.2.21
'@mui/utils': 5.14.6_react@18.2.0
'@popperjs/core': 2.11.8
'@types/react': 18.2.20
'@types/react': 18.2.21
clsx: 2.0.0
prop-types: 15.8.1
react: 18.2.0
@ -259,8 +259,8 @@ packages:
resolution: {integrity: sha512-QZEU3pyGWLuaHbxvOlShol7U1FVgzWBR0OH9H8D7L8w4/vto5N5jJVvlqFQS3T0zbR6YGHxFaiL6Ky87jQg7aw==}
dev: true
/@mui/icons-material/5.14.3_673mxxvtl56vebfkk734u4v73i:
resolution: {integrity: sha512-XkxWPhageu1OPUm2LWjo5XqeQ0t2xfGe8EiLkRW9oz2LHMMZmijvCxulhgquUVTF1DnoSh+3KoDLSsoAFtVNVw==}
/@mui/icons-material/5.14.6_75sn5m6smxso6qw47m6gix63iq:
resolution: {integrity: sha512-7Cujy7lRGTj2T3SvY9C9ZOTFDtrXJogeNnRcU/ODyNoxwskMNPFOcc15F+98MAdJenBVLJPYu+vPP6DUvEpNrA==}
engines: {node: '>=12.0.0'}
peerDependencies:
'@mui/material': ^5.0.0
@ -270,13 +270,13 @@ packages:
'@types/react':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@mui/material': 5.14.6_ho7f4muyxo2kcc3eb2wgnvahca
'@types/react': 18.2.20
'@babel/runtime': 7.22.11
'@mui/material': 5.14.6_mcyaowhjtk6juxjmabqaayfcxi
'@types/react': 18.2.21
react: 18.2.0
dev: true
/@mui/lab/5.0.0-alpha.141_f7gnbtiirv56mm335hdhfqhdam:
/@mui/lab/5.0.0-alpha.141_ikl3qzuejbxlivat7fk5o34fnu:
resolution: {integrity: sha512-PsW55xX2ieNLldca2hLxL1SYtZgRQv++lj1W/Jyi5Z2MHuFDcdqI7yKGrOzyIWw7ctQrmHa1FTShBiCa2wkEoQ==}
engines: {node: '>=12.0.0'}
peerDependencies:
@ -294,15 +294,15 @@ packages:
'@types/react':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@emotion/react': 11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy
'@emotion/styled': 11.11.0_yteb73ll6h6uyykb3t5anncyhm
'@mui/base': 5.0.0-beta.12_qflmzdebv2ewfrqz6op6ohcc2q
'@mui/material': 5.14.6_ho7f4muyxo2kcc3eb2wgnvahca
'@mui/system': 5.14.6_zdbjtzkah63cptavg4ofw4cz7y
'@mui/types': 7.2.4_@types+react@18.2.20
'@babel/runtime': 7.22.11
'@emotion/react': 11.11.1_gq4reeurwxuj4hvyerswzzqthy
'@emotion/styled': 11.11.0_rra5sb3jh6znd7zvpi7zwpaeky
'@mui/base': 5.0.0-beta.12_vnxzf5c44dqo4vncfl2mrh2gwm
'@mui/material': 5.14.6_mcyaowhjtk6juxjmabqaayfcxi
'@mui/system': 5.14.6_7pp4cy7snrbkjtpb7zlzzmlqnq
'@mui/types': 7.2.4_@types+react@18.2.21
'@mui/utils': 5.14.6_react@18.2.0
'@types/react': 18.2.20
'@types/react': 18.2.21
clsx: 2.0.0
prop-types: 15.8.1
react: 18.2.0
@ -310,7 +310,7 @@ packages:
react-is: 18.2.0
dev: true
/@mui/material/5.14.6_ho7f4muyxo2kcc3eb2wgnvahca:
/@mui/material/5.14.6_mcyaowhjtk6juxjmabqaayfcxi:
resolution: {integrity: sha512-C3UgGrmtvcGkQkm0ONBU7bTdapTjQc2Se3b2354xMmU7lgSgW7VM6EP9wIH5XqqoJ60m9l/s9kbTWX0Y+EaWvA==}
engines: {node: '>=12.0.0'}
peerDependencies:
@ -327,15 +327,15 @@ packages:
'@types/react':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@emotion/react': 11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy
'@emotion/styled': 11.11.0_yteb73ll6h6uyykb3t5anncyhm
'@mui/base': 5.0.0-beta.12_qflmzdebv2ewfrqz6op6ohcc2q
'@babel/runtime': 7.22.11
'@emotion/react': 11.11.1_gq4reeurwxuj4hvyerswzzqthy
'@emotion/styled': 11.11.0_rra5sb3jh6znd7zvpi7zwpaeky
'@mui/base': 5.0.0-beta.12_vnxzf5c44dqo4vncfl2mrh2gwm
'@mui/core-downloads-tracker': 5.14.6
'@mui/system': 5.14.6_zdbjtzkah63cptavg4ofw4cz7y
'@mui/types': 7.2.4_@types+react@18.2.20
'@mui/system': 5.14.6_7pp4cy7snrbkjtpb7zlzzmlqnq
'@mui/types': 7.2.4_@types+react@18.2.21
'@mui/utils': 5.14.6_react@18.2.0
'@types/react': 18.2.20
'@types/react': 18.2.21
'@types/react-transition-group': 4.4.6
clsx: 2.0.0
csstype: 3.1.2
@ -346,7 +346,7 @@ packages:
react-transition-group: 4.4.5_biqbaboplfbrettd7655fr4n2y
dev: true
/@mui/private-theming/5.14.6_j3ahe22lw6ac2w6qvqp4kjqnqy:
/@mui/private-theming/5.14.6_gq4reeurwxuj4hvyerswzzqthy:
resolution: {integrity: sha512-3VBLFGizBXfofyk33bwRg6t9L648aKnLmOKPfY1wFuiXq3AEYwobK65iDci/tHKxm/VKbZ6A7PFjLejvB3EvRQ==}
engines: {node: '>=12.0.0'}
peerDependencies:
@ -356,9 +356,9 @@ packages:
'@types/react':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
'@mui/utils': 5.14.6_react@18.2.0
'@types/react': 18.2.20
'@types/react': 18.2.21
prop-types: 15.8.1
react: 18.2.0
dev: true
@ -376,16 +376,16 @@ packages:
'@emotion/styled':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
'@emotion/cache': 11.11.0
'@emotion/react': 11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy
'@emotion/styled': 11.11.0_yteb73ll6h6uyykb3t5anncyhm
'@emotion/react': 11.11.1_gq4reeurwxuj4hvyerswzzqthy
'@emotion/styled': 11.11.0_rra5sb3jh6znd7zvpi7zwpaeky
csstype: 3.1.2
prop-types: 15.8.1
react: 18.2.0
dev: true
/@mui/system/5.14.6_zdbjtzkah63cptavg4ofw4cz7y:
/@mui/system/5.14.6_7pp4cy7snrbkjtpb7zlzzmlqnq:
resolution: {integrity: sha512-/n0ae1MegWjiV1BpRU8jgg4E0zBjeB2VYsT/68ag/xaDuq3/TaDKJeT9REIvyBvwlG3CI3S2O+tRELktxCD1kg==}
engines: {node: '>=12.0.0'}
peerDependencies:
@ -401,21 +401,21 @@ packages:
'@types/react':
optional: true
dependencies:
'@babel/runtime': 7.22.10
'@emotion/react': 11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy
'@emotion/styled': 11.11.0_yteb73ll6h6uyykb3t5anncyhm
'@mui/private-theming': 5.14.6_j3ahe22lw6ac2w6qvqp4kjqnqy
'@babel/runtime': 7.22.11
'@emotion/react': 11.11.1_gq4reeurwxuj4hvyerswzzqthy
'@emotion/styled': 11.11.0_rra5sb3jh6znd7zvpi7zwpaeky
'@mui/private-theming': 5.14.6_gq4reeurwxuj4hvyerswzzqthy
'@mui/styled-engine': 5.14.6_5uavjbr3lmuxf4a3t6dmknaeea
'@mui/types': 7.2.4_@types+react@18.2.20
'@mui/types': 7.2.4_@types+react@18.2.21
'@mui/utils': 5.14.6_react@18.2.0
'@types/react': 18.2.20
'@types/react': 18.2.21
clsx: 2.0.0
csstype: 3.1.2
prop-types: 15.8.1
react: 18.2.0
dev: true
/@mui/types/7.2.4_@types+react@18.2.20:
/@mui/types/7.2.4_@types+react@18.2.21:
resolution: {integrity: sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA==}
peerDependencies:
'@types/react': '*'
@ -423,7 +423,7 @@ packages:
'@types/react':
optional: true
dependencies:
'@types/react': 18.2.20
'@types/react': 18.2.21
dev: true
/@mui/utils/5.14.6_react@18.2.0:
@ -432,7 +432,7 @@ packages:
peerDependencies:
react: ^17.0.0 || ^18.0.0
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
'@types/prop-types': 15.7.5
'@types/react-is': 18.2.1
prop-types: 15.8.1
@ -572,23 +572,23 @@ packages:
/@types/react-dom/18.2.7:
resolution: {integrity: sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==}
dependencies:
'@types/react': 18.2.20
'@types/react': 18.2.21
dev: true
/@types/react-is/18.2.1:
resolution: {integrity: sha512-wyUkmaaSZEzFZivD8F2ftSyAfk6L+DfFliVj/mYdOXbVjRcS87fQJLTnhk6dRZPuJjI+9g6RZJO4PNCngUrmyw==}
dependencies:
'@types/react': 18.2.20
'@types/react': 18.2.21
dev: true
/@types/react-transition-group/4.4.6:
resolution: {integrity: sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew==}
dependencies:
'@types/react': 18.2.20
'@types/react': 18.2.21
dev: true
/@types/react/18.2.20:
resolution: {integrity: sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw==}
/@types/react/18.2.21:
resolution: {integrity: sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==}
dependencies:
'@types/prop-types': 15.7.5
'@types/scheduler': 0.16.3
@ -615,7 +615,7 @@ packages:
resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==}
engines: {node: '>=10', npm: '>=6'}
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
cosmiconfig: 7.1.0
resolve: 1.22.4
dev: true
@ -671,7 +671,7 @@ packages:
/dom-helpers/5.2.1:
resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==}
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
csstype: 3.1.2
dev: true
@ -846,7 +846,7 @@ packages:
react: '>=16.6.0'
react-dom: '>=16.6.0'
dependencies:
'@babel/runtime': 7.22.10
'@babel/runtime': 7.22.11
dom-helpers: 5.2.1
loose-envify: 1.4.0
prop-types: 15.8.1

View File

@ -43,15 +43,23 @@ def ui_bundle(name, srcs = [], data = [], deps = [], css = False):
"//:node_modules/tslib",
],
output_dir = True,
splitting = True,
splitting = False,
entry_point = "entrypoint.tsx",
format = "iife",
# The transpiling is done with swc, so we don't need to do it here.
target = "esnext",
sourcemap = "inline",
minify = select({
"//base:minify_esbuild_enabled": True,
"//conditions:default": False,
}),
define = select({
"//base:minify_esbuild_enabled": {
"process.env.NODE_ENV": '"production"',
},
"//conditions:default": {
"process.env.NODE_ENV": '"development"',
},
}),
tsconfig = "//:tsconfig",
config = "//tools/build_rules/ui_bundle:esbuild_config",
**esbuild_kwargs

View File

@ -12,15 +12,16 @@
"experimentalDecorators": true,
"importHelpers": true,
"lib": ["es2016", "es2018", "es2019", "dom", "dom.iterable"],
"target": "es2019",
"target": "esnext",
"allowSyntheticDefaultImports": true,
"preserveSymlinks": true,
"esModuleInterop": true,
"baseUrl": ".",
"module": "es2020",
"module": "esnext",
"paths": {
"*": ["*"],
"bazel-bin/*": ["bazel-bin/*"]
"bazel-bin/*": ["bazel-bin/*"],
"bazel-bin": ["."]
}
},
"exclude": ["node_modules", "bazel-peridot", "bazel-bin", "bazel-out", "bazel-testlogs"]