From 6432dca518188ebf7e606ba36f07ffb49b968bb0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:44:15 +0200 Subject: [PATCH 01/33] Update all non-major dependencies (#2581) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 187 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 97 insertions(+), 90 deletions(-) diff --git a/yarn.lock b/yarn.lock index e01d496c..cbd880bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,10 +31,10 @@ "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.25.2": - version "7.25.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.2.tgz#e41928bd33475305c586f6acbbb7e3ade7a6f7f5" - integrity sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ== +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.25.2", "@babel/compat-data@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" + integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== "@babel/core@^7.16.5", "@babel/core@^7.18.5", "@babel/core@^7.21.3", "@babel/core@^7.24.5": version "7.25.2" @@ -57,12 +57,12 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.0.tgz#f858ddfa984350bc3d3b7f125073c9af6988f18e" - integrity sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw== +"@babel/generator@^7.25.0", "@babel/generator@^7.25.4": + version "7.25.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.5.tgz#b31cf05b3fe8c32d206b6dad03bb0aacbde73450" + integrity sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w== dependencies: - "@babel/types" "^7.25.0" + "@babel/types" "^7.25.4" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" @@ -93,20 +93,20 @@ lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.24.7": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.0.tgz#a109bf9c3d58dfed83aaf42e85633c89f43a6253" - integrity sha512-GYM6BxeQsETc9mnct+nIIpf63SAyzvyYN7UB/IlTyd+MBg06afFGp0mIeUqGyWgS2mxad6vqbMrHVlaL3m70sQ== +"@babel/helper-create-class-features-plugin@^7.24.7", "@babel/helper-create-class-features-plugin@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz#57eaf1af38be4224a9d9dd01ddde05b741f50e14" + integrity sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" "@babel/helper-member-expression-to-functions" "^7.24.8" "@babel/helper-optimise-call-expression" "^7.24.7" "@babel/helper-replace-supers" "^7.25.0" "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" - "@babel/traverse" "^7.25.0" + "@babel/traverse" "^7.25.4" semver "^6.3.1" -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.24.7", "@babel/helper-create-regexp-features-plugin@^7.25.0": +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.24.7", "@babel/helper-create-regexp-features-plugin@^7.25.0", "@babel/helper-create-regexp-features-plugin@^7.25.2": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.2.tgz#24c75974ed74183797ffd5f134169316cd1808d9" integrity sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g== @@ -260,12 +260,12 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== -"@babel/parser@^7.25.0", "@babel/parser@^7.25.3": - version "7.25.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" - integrity sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw== +"@babel/parser@^7.25.0", "@babel/parser@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a" + integrity sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA== dependencies: - "@babel/types" "^7.25.2" + "@babel/types" "^7.25.4" "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.3": version "7.25.3" @@ -459,15 +459,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-async-generator-functions@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.0.tgz#b785cf35d73437f6276b1e30439a57a50747bddf" - integrity sha512-uaIi2FdqzjpAMvVqvB51S42oC2JEVgh0LDsGfZVDysWE8LrJtQC2jvKmOqEYThKyB7bDEb7BP1GYWDm7tABA0Q== +"@babel/plugin-transform-async-generator-functions@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.4.tgz#2afd4e639e2d055776c9f091b6c0c180ed8cf083" + integrity sha512-jz8cV2XDDTqjKPwVPJBIjORVEmSGYhdRa8e5k5+vN+uwcjSrSxUaebBRa4ko1jqNF2uxyg8G6XYk30Jv285xzg== dependencies: "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-remap-async-to-generator" "^7.25.0" "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/traverse" "^7.25.0" + "@babel/traverse" "^7.25.4" "@babel/plugin-transform-async-to-generator@^7.24.7": version "7.24.7" @@ -492,13 +492,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.8" -"@babel/plugin-transform-class-properties@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz#256879467b57b0b68c7ddfc5b76584f398cd6834" - integrity sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w== +"@babel/plugin-transform-class-properties@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz#bae7dbfcdcc2e8667355cd1fb5eda298f05189fd" + integrity sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g== dependencies: - "@babel/helper-create-class-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.25.4" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-class-static-block@^7.24.7": version "7.24.7" @@ -509,16 +509,16 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-classes@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.0.tgz#63122366527d88e0ef61b612554fe3f8c793991e" - integrity sha512-xyi6qjr/fYU304fiRwFbekzkqVJZ6A7hOjWZd+89FVcBqPV3S9Wuozz82xdpLspckeaafntbzglaW4pqpzvtSw== +"@babel/plugin-transform-classes@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.4.tgz#d29dbb6a72d79f359952ad0b66d88518d65ef89a" + integrity sha512-oexUfaQle2pF/b6E0dwsxQtAol9TLSO88kQvym6HHBWFliV2lGdrPieX+WgMRLSJDVzdYywk7jXbLPuO2KLTLg== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.8" + "@babel/helper-compilation-targets" "^7.25.2" "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-replace-supers" "^7.25.0" - "@babel/traverse" "^7.25.0" + "@babel/traverse" "^7.25.4" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.24.7": @@ -747,13 +747,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-private-methods@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz#e6318746b2ae70a59d023d5cc1344a2ba7a75f5e" - integrity sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ== +"@babel/plugin-transform-private-methods@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.4.tgz#9bbefbe3649f470d681997e0b64a4b254d877242" + integrity sha512-ao8BG7E2b/URaUQGqN3Tlsg+M3KlHY6rJ1O1gXAEUnZoyNQnvKyH87Kfg+FoxSeyWUB8ISZZsC91C44ZuBFytw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.25.4" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-private-property-in-object@^7.24.7": version "7.24.7" @@ -903,20 +903,20 @@ "@babel/helper-create-regexp-features-plugin" "^7.24.7" "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-unicode-sets-regex@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz#d40705d67523803a576e29c63cef6e516b858ed9" - integrity sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg== +"@babel/plugin-transform-unicode-sets-regex@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.4.tgz#be664c2a0697ffacd3423595d5edef6049e8946c" + integrity sha512-qesBxiWkgN1Q+31xUE9RcMk79eOXXDCv6tfyGMRSs4RGlioSg2WVyQAm07k726cSE56pa+Kb0y9epX2qaXzTvA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-regexp-features-plugin" "^7.25.2" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/preset-env@^7.22.20": - version "7.25.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.25.3.tgz#0bf4769d84ac51d1073ab4a86f00f30a3a83c67c" - integrity sha512-QsYW7UeAaXvLPX9tdVliMJE7MD7M6MLYVTovRTIwhoYQVFHR1rM4wO8wqAezYi3/BpSD+NzVCZ69R6smWiIi8g== + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.25.4.tgz#be23043d43a34a2721cd0f676c7ba6f1481f6af6" + integrity sha512-W9Gyo+KmcxjGahtt3t9fb14vFRWvPpu5pT6GBlovAK6BTBcxgjfVMSQCfJl4oi35ODrxP6xx2Wr8LNST57Mraw== dependencies: - "@babel/compat-data" "^7.25.2" + "@babel/compat-data" "^7.25.4" "@babel/helper-compilation-targets" "^7.25.2" "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-validator-option" "^7.24.8" @@ -945,13 +945,13 @@ "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" "@babel/plugin-transform-arrow-functions" "^7.24.7" - "@babel/plugin-transform-async-generator-functions" "^7.25.0" + "@babel/plugin-transform-async-generator-functions" "^7.25.4" "@babel/plugin-transform-async-to-generator" "^7.24.7" "@babel/plugin-transform-block-scoped-functions" "^7.24.7" "@babel/plugin-transform-block-scoping" "^7.25.0" - "@babel/plugin-transform-class-properties" "^7.24.7" + "@babel/plugin-transform-class-properties" "^7.25.4" "@babel/plugin-transform-class-static-block" "^7.24.7" - "@babel/plugin-transform-classes" "^7.25.0" + "@babel/plugin-transform-classes" "^7.25.4" "@babel/plugin-transform-computed-properties" "^7.24.7" "@babel/plugin-transform-destructuring" "^7.24.8" "@babel/plugin-transform-dotall-regex" "^7.24.7" @@ -979,7 +979,7 @@ "@babel/plugin-transform-optional-catch-binding" "^7.24.7" "@babel/plugin-transform-optional-chaining" "^7.24.8" "@babel/plugin-transform-parameters" "^7.24.7" - "@babel/plugin-transform-private-methods" "^7.24.7" + "@babel/plugin-transform-private-methods" "^7.25.4" "@babel/plugin-transform-private-property-in-object" "^7.24.7" "@babel/plugin-transform-property-literals" "^7.24.7" "@babel/plugin-transform-regenerator" "^7.24.7" @@ -992,10 +992,10 @@ "@babel/plugin-transform-unicode-escapes" "^7.24.7" "@babel/plugin-transform-unicode-property-regex" "^7.24.7" "@babel/plugin-transform-unicode-regex" "^7.24.7" - "@babel/plugin-transform-unicode-sets-regex" "^7.24.7" + "@babel/plugin-transform-unicode-sets-regex" "^7.25.4" "@babel/preset-modules" "0.1.6-no-external-plugins" babel-plugin-polyfill-corejs2 "^0.4.10" - babel-plugin-polyfill-corejs3 "^0.10.4" + babel-plugin-polyfill-corejs3 "^0.10.6" babel-plugin-polyfill-regenerator "^0.6.1" core-js-compat "^3.37.1" semver "^6.3.1" @@ -1058,7 +1058,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.23.2", "@babel/runtime@^7.24.8", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.23.2", "@babel/runtime@^7.24.8": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.0.tgz#3af9a91c1b739c569d5d80cc917280919c544ecb" integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw== @@ -1072,6 +1072,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.8.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.4.tgz#6ef37d678428306e7d75f054d5b1bdb8cf8aa8ee" + integrity sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.24.7", "@babel/template@^7.25.0": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" @@ -1081,16 +1088,16 @@ "@babel/parser" "^7.25.0" "@babel/types" "^7.25.0" -"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3": - version "7.25.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.3.tgz#f1b901951c83eda2f3e29450ce92743783373490" - integrity sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ== +"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.4.tgz#648678046990f2957407e3086e97044f13c3e18e" + integrity sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.25.0" - "@babel/parser" "^7.25.3" + "@babel/generator" "^7.25.4" + "@babel/parser" "^7.25.4" "@babel/template" "^7.25.0" - "@babel/types" "^7.25.2" + "@babel/types" "^7.25.4" debug "^4.3.1" globals "^11.1.0" @@ -1112,10 +1119,10 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.4.4": - version "7.25.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.2.tgz#55fb231f7dc958cd69ea141a4c2997e819646125" - integrity sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q== +"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4", "@babel/types@^7.4.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f" + integrity sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ== dependencies: "@babel/helper-string-parser" "^7.24.8" "@babel/helper-validator-identifier" "^7.24.7" @@ -4029,7 +4036,7 @@ babel-plugin-polyfill-corejs2@^0.4.10: "@babel/helper-define-polyfill-provider" "^0.6.2" semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.10.4: +babel-plugin-polyfill-corejs3@^0.10.6: version "0.10.6" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz#2deda57caef50f59c525aeb4964d3b2f867710c7" integrity sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA== @@ -4212,9 +4219,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001646: - version "1.0.30001651" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz#52de59529e8b02b1aedcaaf5c05d9e23c0c28138" - integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== + version "1.0.30001653" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz#b8af452f8f33b1c77f122780a4aecebea0caca56" + integrity sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw== chai@^5.1.1: version "5.1.1" @@ -4411,9 +4418,9 @@ core-js-compat@^3.37.0: browserslist "^4.23.0" core-js-compat@^3.37.1, core-js-compat@^3.38.0: - version "3.38.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.38.0.tgz#d93393b1aa346b6ee683377b0c31172ccfe607aa" - integrity sha512-75LAicdLa4OJVwFxFbQR3NdnZjNgX6ILpVcVzcC4T2smerB5lELMrJQQQoWV6TiuC/vlaFqgU2tKQx9w5s0e0A== + version "3.38.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.38.1.tgz#2bc7a298746ca5a7bcb9c164bcb120f2ebc09a09" + integrity sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw== dependencies: browserslist "^4.23.3" @@ -4730,9 +4737,9 @@ dotenv@^16.3.1: integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== electron-to-chromium@^1.5.4: - version "1.5.12" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.12.tgz#ee31756eaa2e06f2aa606f170b7ad06dd402b4e4" - integrity sha512-tIhPkdlEoCL1Y+PToq3zRNehUaKp3wBX/sr7aclAWdIWjvqAe/Im/H0SiCM4c1Q8BLPHCdoJTol+ZblflydehA== + version "1.5.13" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" + integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== emoji-regex@^9.2.2: version "9.2.2" @@ -5761,9 +5768,9 @@ i18next-browser-languagedetector@^8.0.0: "@babel/runtime" "^7.23.2" i18next-http-backend@^2.0.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/i18next-http-backend/-/i18next-http-backend-2.6.0.tgz#e2a2bc391b129c17d4918e9574962df6dc130327" - integrity sha512-WX5pXYNrAz2fj8ajsAuCIsogOEvJL+aHw4RTQAD/uqPoLV1FHqa6IsUULTfa3GtREVQbApp0U3woLhz9EuR2pQ== + version "2.6.1" + resolved "https://registry.yarnpkg.com/i18next-http-backend/-/i18next-http-backend-2.6.1.tgz#186c3a1359e10245c9119a13129f9b5bf328c9a7" + integrity sha512-rCilMAnlEQNeKOZY1+x8wLM5IpYOj10guGvEpeC59tNjj6MMreLIjIW8D1RclhD3ifLwn6d/Y9HEM1RUE6DSog== dependencies: cross-fetch "4.0.0" @@ -5954,9 +5961,9 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.13.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.0.tgz#71c72ec5442ace7e76b306e9d48db361f22699ea" - integrity sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA== + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: hasown "^2.0.2" @@ -6175,9 +6182,9 @@ js-yaml@4.1.0, js-yaml@^4.1.0: argparse "^2.0.1" jsdom@^24.0.0: - version "24.1.1" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-24.1.1.tgz#f41df8f4f3b2fbfa7e1bdc5df62c9804fd14a9d0" - integrity sha512-5O1wWV99Jhq4DV7rCLIoZ/UIhyQeDR7wHVyZAHAshbrvZsLs+Xzz7gtwnlJTJDjleiTKh54F4dXrX70vJQTyJQ== + version "24.1.3" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-24.1.3.tgz#88e4a07cb9dd21067514a619e9f17b090a394a9f" + integrity sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ== dependencies: cssstyle "^4.0.1" data-urls "^5.0.0" From 0e3113edcdf6ec105755fa6b591edbf8ba1a01aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:44:15 +0200 Subject: [PATCH 02/33] Update dependency jsdom to v25 (#2580) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4e2c2ac2..f020b70e 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "eslint-plugin-react-hooks": "^4.5.0", "eslint-plugin-unicorn": "^55.0.0", "i18next-parser": "^9.0.0", - "jsdom": "^24.0.0", + "jsdom": "^25.0.0", "prettier": "^3.0.0", "sass": "^1.42.1", "typescript": "^5.1.6", diff --git a/yarn.lock b/yarn.lock index cbd880bd..0d2de0d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6181,10 +6181,10 @@ js-yaml@4.1.0, js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsdom@^24.0.0: - version "24.1.3" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-24.1.3.tgz#88e4a07cb9dd21067514a619e9f17b090a394a9f" - integrity sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ== +jsdom@^25.0.0: + version "25.0.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-25.0.0.tgz#d1612b4ddab85af56821b2f731e15faae135f4e1" + integrity sha512-OhoFVT59T7aEq75TVw9xxEfkXgacpqAhQaYgP9y/fDqWQCMB/b1H66RfmPm/MaeaAIU9nDwMOVTlPN51+ao6CQ== dependencies: cssstyle "^4.0.1" data-urls "^5.0.0" From 3a754479dcb32148bca3d2dac074a01c6c782917 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 27 Aug 2024 07:47:20 -0400 Subject: [PATCH 03/33] Add simple global controls to put the call in picture-in-picture mode (#2573) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Stop sharing state observables when the view model is destroyed By default, observables running with shareReplay will continue running forever even if there are no subscribers. We need to stop them when the view model is destroyed to avoid memory leaks and other unintuitive behavior. * Hydrate the call view model in a less hacky way This ensures that only a single view model is created per call, unlike the previous solution which would create extra view models in strict mode which it was unable to dispose of. The other way was invalid because React gives us no way to reliably dispose of a resource created in the render phase. This is essentially a memory leak fix. * Add simple global controls to put the call in picture-in-picture mode Our web and mobile apps (will) all support putting calls into a picture-in-picture mode. However, it'd be nice to have a way of doing this that's more explicit than a breakpoint, because PiP views could in theory get fairly large. Specifically, on mobile, we want a way to do this that can tell you whether the call is ongoing, and that works even without the widget API (because we support SPA calls in the Element X apps…) To this end, I've created a simple global "controls" API on the window. Right now it only has methods for controlling the picture-in-picture state, but in theory we can expand it to also control mute states, which is current possible via the widget API only. * Fix footer appearing in large PiP views * Add a method for whether you can enter picture-in-picture mode * Have the controls emit booleans directly --- docs/README.md | 3 +- docs/controls.md | 7 +++ src/@types/global.d.ts | 5 ++ src/controls.ts | 39 ++++++++++++++ src/room/InCallView.module.css | 5 ++ src/room/InCallView.tsx | 41 +++++++++++---- src/state/CallViewModel.ts | 93 +++++++++++----------------------- src/state/MediaViewModel.ts | 19 +++---- src/state/ObservableScope.ts | 28 ++++++++-- 9 files changed, 153 insertions(+), 87 deletions(-) create mode 100644 docs/controls.md create mode 100644 src/controls.ts diff --git a/docs/README.md b/docs/README.md index a78c7253..113b52c5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,5 +2,6 @@ This folder contains documentation for Element Call setup and usage. -- [Url format and parameters](./url-params.md) - [Embedded vs standalone mode](./embedded-standalone.md) +- [Url format and parameters](./url-params.md) +- [Global JS controls](./controls.md) diff --git a/docs/controls.md b/docs/controls.md new file mode 100644 index 00000000..02df61ef --- /dev/null +++ b/docs/controls.md @@ -0,0 +1,7 @@ +# Global JS controls + +A few aspects of Element Call's interface can be controlled through a global API on the `window`: + +- `controls.canEnterPip(): boolean` Determines whether it's possible to enter picture-in-picture mode. +- `controls.enablePip(): void` Puts the call interface into picture-in-picture mode. Throws if not in a call. +- `controls.disablePip(): void` Takes the call interface out of picture-in-picture mode, restoring it to its natural display mode. Throws if not in a call. diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index ad0f6570..fcb86147 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -15,6 +15,7 @@ limitations under the License. */ import "matrix-js-sdk/src/@types/global"; +import { Controls } from "../controls"; declare global { interface Document { @@ -23,6 +24,10 @@ declare global { webkitFullscreenElement: HTMLElement | null; } + interface Window { + controls: Controls; + } + interface HTMLElement { // Safari only supports this prefixed, so tell the type system about it webkitRequestFullscreen: () => void; diff --git a/src/controls.ts b/src/controls.ts new file mode 100644 index 00000000..3f6ecc54 --- /dev/null +++ b/src/controls.ts @@ -0,0 +1,39 @@ +/* +Copyright 2024 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import { Subject } from "rxjs"; + +export interface Controls { + canEnterPip: () => boolean; + enablePip: () => void; + disablePip: () => void; +} + +export const setPipEnabled = new Subject(); + +window.controls = { + canEnterPip(): boolean { + return setPipEnabled.observed; + }, + enablePip(): void { + if (!setPipEnabled.observed) throw new Error("No call is running"); + setPipEnabled.next(true); + }, + disablePip(): void { + if (!setPipEnabled.observed) throw new Error("No call is running"); + setPipEnabled.next(false); + }, +}; diff --git a/src/room/InCallView.module.css b/src/room/InCallView.module.css index 32d34fb7..cfc436c9 100644 --- a/src/room/InCallView.module.css +++ b/src/room/InCallView.module.css @@ -58,6 +58,10 @@ limitations under the License. ); } +.footer.hidden { + display: none; +} + .footer.overlay { position: absolute; inset-block-end: 0; @@ -67,6 +71,7 @@ limitations under the License. } .footer.overlay.hidden { + display: grid; opacity: 0; pointer-events: none; } diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index fcd63fda..22b6be8c 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -69,7 +69,7 @@ import { InviteButton } from "../button/InviteButton"; import { LayoutToggle } from "./LayoutToggle"; import { ECConnectionState } from "../livekit/useECConnectionState"; import { useOpenIDSFU } from "../livekit/openIDSFU"; -import { GridMode, Layout, useCallViewModel } from "../state/CallViewModel"; +import { CallViewModel, GridMode, Layout } from "../state/CallViewModel"; import { Grid, TileProps } from "../grid/Grid"; import { useObservable } from "../state/useObservable"; import { useInitial } from "../useInitial"; @@ -93,7 +93,7 @@ const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {}); const maxTapDurationMs = 400; export interface ActiveCallProps - extends Omit { + extends Omit { e2eeSystem: EncryptionSystem; } @@ -105,6 +105,8 @@ export const ActiveCall: FC = (props) => { sfuConfig, props.e2eeSystem, ); + const connStateObservable = useObservable(connState); + const [vm, setVm] = useState(null); useEffect(() => { return (): void => { @@ -113,17 +115,41 @@ export const ActiveCall: FC = (props) => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - if (!livekitRoom) return null; + useEffect(() => { + if (livekitRoom !== undefined) { + const vm = new CallViewModel( + props.rtcSession.room, + livekitRoom, + props.e2eeSystem.kind !== E2eeType.NONE, + connStateObservable, + ); + setVm(vm); + return (): void => vm.destroy(); + } + }, [ + props.rtcSession.room, + livekitRoom, + props.e2eeSystem.kind, + connStateObservable, + ]); + + if (livekitRoom === undefined || vm === null) return null; return ( - + ); }; export interface InCallViewProps { client: MatrixClient; + vm: CallViewModel; matrixInfo: MatrixInfo; rtcSession: MatrixRTCSession; livekitRoom: Room; @@ -138,6 +164,7 @@ export interface InCallViewProps { export const InCallView: FC = ({ client, + vm, matrixInfo, rtcSession, livekitRoom, @@ -193,12 +220,6 @@ export const InCallView: FC = ({ const reducedControls = boundsValid && bounds.width <= 340; const noControls = reducedControls && bounds.height <= 400; - const vm = useCallViewModel( - rtcSession.room, - livekitRoom, - matrixInfo.e2eeSystem.kind !== E2eeType.NONE, - connState, - ); const windowMode = useObservableEagerState(vm.windowMode); const layout = useObservableEagerState(vm.layout); const gridMode = useObservableEagerState(vm.gridMode); diff --git a/src/state/CallViewModel.ts b/src/state/CallViewModel.ts index c68869f9..0ba14845 100644 --- a/src/state/CallViewModel.ts +++ b/src/state/CallViewModel.ts @@ -26,7 +26,6 @@ import { RemoteParticipant, } from "livekit-client"; import { Room as MatrixRoom, RoomMember } from "matrix-js-sdk/src/matrix"; -import { useEffect, useRef } from "react"; import { EMPTY, Observable, @@ -44,7 +43,6 @@ import { race, sample, scan, - shareReplay, skip, startWith, switchAll, @@ -58,12 +56,10 @@ import { import { logger } from "matrix-js-sdk/src/logger"; import { ViewModel } from "./ViewModel"; -import { useObservable } from "./useObservable"; import { ECAddonConnectionState, ECConnectionState, } from "../livekit/useECConnectionState"; -import { usePrevious } from "../usePrevious"; import { LocalUserMediaViewModel, MediaViewModel, @@ -75,6 +71,7 @@ import { accumulate, finalizeValue } from "../observable-utils"; import { ObservableScope } from "./ObservableScope"; import { duplicateTiles } from "../settings/settings"; import { isFirefox } from "../Platform"; +import { setPipEnabled } from "../controls"; // How long we wait after a focus switch before showing the real participant // list again @@ -194,11 +191,9 @@ class UserMedia { ), ), startWith(false), - distinctUntilChanged(), - this.scope.bind(), // Make this Observable hot so that the timers don't reset when you // resubscribe - shareReplay(1), + this.scope.state(), ); this.presenter = observeParticipantEvents( @@ -261,7 +256,7 @@ function findMatrixMember( export class CallViewModel extends ViewModel { private readonly rawRemoteParticipants = connectedParticipantsObserver( this.livekitRoom, - ).pipe(shareReplay(1)); + ).pipe(this.scope.state()); // Lists of participants to "hold" on display, even if LiveKit claims that // they've left @@ -383,7 +378,7 @@ export class CallViewModel extends ViewModel { finalizeValue((ts) => { for (const t of ts) t.destroy(); }), - shareReplay(1), + this.scope.state(), ); private readonly userMedia: Observable = this.mediaItems.pipe( @@ -402,7 +397,7 @@ export class CallViewModel extends ViewModel { map((mediaItems) => mediaItems.filter((m): m is ScreenShare => m instanceof ScreenShare), ), - shareReplay(1), + this.scope.state(), ); private readonly hasRemoteScreenShares: Observable = @@ -443,9 +438,8 @@ export class CallViewModel extends ViewModel { }, null, ), - distinctUntilChanged(), map((speaker) => speaker.vm), - shareReplay(1), + this.scope.state(), throttleTime(1600, undefined, { leading: true, trailing: true }), ); @@ -513,16 +507,17 @@ export class CallViewModel extends ViewModel { private readonly spotlight: Observable = this.spotlightAndPip.pipe( switchMap(([spotlight]) => spotlight), - shareReplay(1), + this.scope.state(), ); private readonly pip: Observable = this.spotlightAndPip.pipe(switchMap(([, pip]) => pip)); - /** - * The general shape of the window. - */ - public readonly windowMode: Observable = fromEvent( + private readonly pipEnabled: Observable = setPipEnabled.pipe( + startWith(false), + ); + + private readonly naturalWindowMode: Observable = fromEvent( window, "resize", ).pipe( @@ -538,15 +533,21 @@ export class CallViewModel extends ViewModel { if (width <= 600) return "narrow"; return "normal"; }), - distinctUntilChanged(), - shareReplay(1), + this.scope.state(), + ); + + /** + * The general shape of the window. + */ + public readonly windowMode: Observable = this.pipEnabled.pipe( + switchMap((pip) => (pip ? of("pip") : this.naturalWindowMode)), ); private readonly spotlightExpandedToggle = new Subject(); public readonly spotlightExpanded: Observable = this.spotlightExpandedToggle.pipe( accumulate(false, (expanded) => !expanded), - shareReplay(1), + this.scope.state(), ); private readonly gridModeUserSelection = new Subject(); @@ -572,8 +573,7 @@ export class CallViewModel extends ViewModel { ) ).pipe(startWith(userSelection ?? "grid")), ), - distinctUntilChanged(), - shareReplay(1), + this.scope.state(), ); public setGridMode(value: GridMode): void { @@ -629,7 +629,7 @@ export class CallViewModel extends ViewModel { ); private readonly pipLayout: Observable = this.spotlight.pipe( - map((spotlight): Layout => ({ type: "pip", spotlight })), + map((spotlight) => ({ type: "pip", spotlight })), ); public readonly layout: Observable = this.windowMode.pipe( @@ -690,13 +690,12 @@ export class CallViewModel extends ViewModel { return this.pipLayout; } }), - shareReplay(1), + this.scope.state(), ); public showSpotlightIndicators: Observable = this.layout.pipe( map((l) => l.type !== "grid"), - distinctUntilChanged(), - shareReplay(1), + this.scope.state(), ); /** @@ -720,8 +719,7 @@ export class CallViewModel extends ViewModel { public showSpeakingIndicators: Observable = this.layout.pipe( map((l) => l.type !== "one-on-one" && !l.type.startsWith("spotlight-")), - distinctUntilChanged(), - shareReplay(1), + this.scope.state(), ); public readonly toggleSpotlightExpanded: Observable<(() => void) | null> = @@ -741,7 +739,7 @@ export class CallViewModel extends ViewModel { map((enabled) => enabled ? (): void => this.spotlightExpandedToggle.next() : null, ), - shareReplay(1), + this.scope.state(), ); private readonly screenTap = new Subject(); @@ -771,8 +769,7 @@ export class CallViewModel extends ViewModel { public readonly showHeader: Observable = this.windowMode.pipe( map((mode) => mode !== "pip" && mode !== "flat"), - distinctUntilChanged(), - shareReplay(1), + this.scope.state(), ); public readonly showFooter = this.windowMode.pipe( @@ -815,8 +812,7 @@ export class CallViewModel extends ViewModel { ); } }), - distinctUntilChanged(), - shareReplay(1), + this.scope.state(), ); public constructor( @@ -829,34 +825,3 @@ export class CallViewModel extends ViewModel { super(); } } - -export function useCallViewModel( - matrixRoom: MatrixRoom, - livekitRoom: LivekitRoom, - encrypted: boolean, - connectionState: ECConnectionState, -): CallViewModel { - const prevMatrixRoom = usePrevious(matrixRoom); - const prevLivekitRoom = usePrevious(livekitRoom); - const prevEncrypted = usePrevious(encrypted); - const connectionStateObservable = useObservable(connectionState); - - const vm = useRef(); - if ( - matrixRoom !== prevMatrixRoom || - livekitRoom !== prevLivekitRoom || - encrypted !== prevEncrypted - ) { - vm.current?.destroy(); - vm.current = new CallViewModel( - matrixRoom, - livekitRoom, - encrypted, - connectionStateObservable, - ); - } - - useEffect(() => vm.current?.destroy(), []); - - return vm.current!; -} diff --git a/src/state/MediaViewModel.ts b/src/state/MediaViewModel.ts index 197f0341..ff262996 100644 --- a/src/state/MediaViewModel.ts +++ b/src/state/MediaViewModel.ts @@ -36,12 +36,10 @@ import { BehaviorSubject, Observable, combineLatest, - distinctUntilChanged, distinctUntilKeyChanged, fromEvent, map, of, - shareReplay, startWith, switchMap, } from "rxjs"; @@ -84,7 +82,6 @@ function observeTrackReference( source, })), distinctUntilKeyChanged("publication"), - shareReplay(1), ); } @@ -119,15 +116,19 @@ abstract class BaseMediaViewModel extends ViewModel { videoSource: VideoSource, ) { super(); - const audio = observeTrackReference(participant, audioSource); - this.video = observeTrackReference(participant, videoSource); + const audio = observeTrackReference(participant, audioSource).pipe( + this.scope.state(), + ); + this.video = observeTrackReference(participant, videoSource).pipe( + this.scope.state(), + ); this.unencryptedWarning = combineLatest( [audio, this.video], (a, v) => callEncrypted && (a.publication?.isEncrypted === false || v.publication?.isEncrypted === false), - ).pipe(distinctUntilChanged(), shareReplay(1)); + ).pipe(this.scope.state()); } } @@ -151,7 +152,7 @@ abstract class BaseUserMediaViewModel extends BaseMediaViewModel { ParticipantEvent.IsSpeakingChanged, ).pipe( map((p) => p.isSpeaking), - shareReplay(1), + this.scope.state(), ); /** @@ -184,7 +185,7 @@ abstract class BaseUserMediaViewModel extends BaseMediaViewModel { Track.Source.Camera, ); - const media = observeParticipantMedia(participant).pipe(shareReplay(1)); + const media = observeParticipantMedia(participant).pipe(this.scope.state()); this.audioEnabled = media.pipe( map((m) => m.microphoneTrack?.isMuted === false), ); @@ -216,7 +217,7 @@ export class LocalUserMediaViewModel extends BaseUserMediaViewModel { map(() => facingModeFromLocalTrack(track).facingMode === "user"), ); }), - shareReplay(1), + this.scope.state(), ); /** diff --git a/src/state/ObservableScope.ts b/src/state/ObservableScope.ts index cb7cbd17..813e064c 100644 --- a/src/state/ObservableScope.ts +++ b/src/state/ObservableScope.ts @@ -14,7 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MonoTypeOperatorFunction, Subject, takeUntil } from "rxjs"; +import { + distinctUntilChanged, + Observable, + shareReplay, + Subject, + takeUntil, +} from "rxjs"; + +type MonoTypeOperator = (o: Observable) => Observable; /** * A scope which limits the execution lifetime of its bound Observables. @@ -22,12 +30,26 @@ import { MonoTypeOperatorFunction, Subject, takeUntil } from "rxjs"; export class ObservableScope { private readonly ended = new Subject(); + private readonly bindImpl: MonoTypeOperator = takeUntil(this.ended); + /** * Binds an Observable to this scope, so that it completes when the scope * ends. */ - public bind(): MonoTypeOperatorFunction { - return takeUntil(this.ended); + public bind(): MonoTypeOperator { + return this.bindImpl; + } + + private readonly stateImpl: MonoTypeOperator = (o) => + o.pipe(this.bind(), distinctUntilChanged(), shareReplay(1)); + + /** + * Transforms an Observable into a hot state Observable which replays its + * latest value upon subscription, skips updates with identical values, and + * is bound to this scope. + */ + public state(): MonoTypeOperator { + return this.stateImpl; } /** From 5eaabcf74d558990f1c3cc53a1f75d77a457b6f1 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 27 Aug 2024 09:45:39 -0400 Subject: [PATCH 04/33] Clean up our tests in preparation for the testing sprint (#2466) * Fix coverage reporting Codecov hasn't been working recently because Vitest doesn't report coverage by default. * Suppress some noisy log lines Closes https://github.com/element-hq/element-call/issues/686 * Store test files alongside source files This way we benefit from not having to maintain the same directory structure twice, and our linters etc. will actually lint test files by default. * Stop using Vitest globals Vitest provides globals primarily to make the transition from Jest more smooth. But importing its functions explicitly is considered a better pattern, and we have so few tests right now that it's trivial to migrate them all. * Remove Storybook directory We no longer use Storybook. * Configure Codecov Add a coverage gate for all new changes and disable its comments. * upgrade vitest --------- Co-authored-by: Timo --- .github/workflows/test.yaml | 3 +- .storybook/main.js | 25 -- .storybook/preview.jsx | 24 -- codecov.yaml | 13 + package.json | 6 +- src/Avatar.tsx | 2 +- src/ClientContext.tsx | 2 +- src/Toast.test.tsx | 55 ++++ src/Toast.tsx | 2 +- .../UrlParams.test.ts | 11 +- .../__snapshots__/Toast-test.tsx.snap | 1 - src/__snapshots__/Toast.test.tsx.snap | 21 ++ src/analytics/PosthogAnalytics.ts | 2 +- src/auth/useInteractiveLogin.ts | 2 +- src/auth/useInteractiveRegistration.ts | 2 +- src/auth/useRecaptcha.ts | 4 +- src/config/Config.ts | 12 + .../home/CallList.test.tsx | 15 +- src/home/CallList.tsx | 2 +- src/home/RegisteredView.tsx | 2 +- src/home/UnauthenticatedView.tsx | 2 +- .../initializer.test.ts | 2 + .../otel/ObjectFlattener.test.ts | 18 ++ src/room/AppSelectionModal.tsx | 2 +- src/room/GroupCallView.tsx | 2 +- src/room/InviteModal.tsx | 2 +- .../room/checkForParallelCalls.test.ts | 9 +- .../rtcSessionHelper.test.ts | 1 + src/state/CallViewModel.ts | 2 +- .../useCallViewKeyboardShortcuts.test.tsx | 2 +- src/{array-utils.ts => utils/array.ts} | 0 src/{matrix-utils.ts => utils/matrix.ts} | 10 +- src/{media-utils.ts => utils/media.ts} | 0 .../observable.ts} | 0 test/utils.ts => src/utils/test.ts | 0 src/vitest.setup.ts | 39 +++ src/widget.ts | 3 +- test/Toast-test.tsx | 60 ---- tsconfig.json | 5 +- vitest.config.js | 8 +- yarn.lock | 277 +++++++++++++++++- 41 files changed, 470 insertions(+), 180 deletions(-) delete mode 100644 .storybook/main.js delete mode 100644 .storybook/preview.jsx create mode 100644 codecov.yaml create mode 100644 src/Toast.test.tsx rename test/UrlParams-test.ts => src/UrlParams.test.ts (91%) rename {test => src}/__snapshots__/Toast-test.tsx.snap (92%) create mode 100644 src/__snapshots__/Toast.test.tsx.snap rename test/home/CallList-test.tsx => src/home/CallList.test.tsx (85%) rename test/initializer-test.ts => src/initializer.test.ts (96%) rename test/otel/ObjectFlattener-test.ts => src/otel/ObjectFlattener.test.ts (94%) rename test/room/checkForParallelCalls-test.ts => src/room/checkForParallelCalls.test.ts (96%) rename test/rtcSessionHelper-test.ts => src/rtcSessionHelper.test.ts (98%) rename test/useCallViewKeyboardShortcuts-test.tsx => src/useCallViewKeyboardShortcuts.test.tsx (98%) rename src/{array-utils.ts => utils/array.ts} (100%) rename src/{matrix-utils.ts => utils/matrix.ts} (97%) rename src/{media-utils.ts => utils/media.ts} (100%) rename src/{observable-utils.ts => utils/observable.ts} (100%) rename test/utils.ts => src/utils/test.ts (100%) create mode 100644 src/vitest.setup.ts delete mode 100644 test/Toast-test.tsx diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 73358acc..eaefe652 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,8 +18,9 @@ jobs: - name: Install dependencies run: "yarn install" - name: Vitest - run: "yarn run test" + run: "yarn run test:coverage" - name: Upload to codecov uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4 with: flags: unittests + fail_ci_if_error: true diff --git a/.storybook/main.js b/.storybook/main.js deleted file mode 100644 index 9d03e947..00000000 --- a/.storybook/main.js +++ /dev/null @@ -1,25 +0,0 @@ -const svgrPlugin = require("vite-plugin-svgr"); -const path = require("path"); - -module.exports = { - stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"], - framework: "@storybook/react", - core: { - builder: "storybook-builder-vite", - }, - async viteFinal(config) { - config.plugins = config.plugins.filter( - (item) => - !( - Array.isArray(item) && - item.length > 0 && - item[0].name === "vite-plugin-mdx" - ), - ); - config.plugins.push(svgrPlugin()); - config.resolve = config.resolve || {}; - config.resolve.dedupe = config.resolve.dedupe || []; - config.resolve.dedupe.push("react", "react-dom", "matrix-js-sdk"); - return config; - }, -}; diff --git a/.storybook/preview.jsx b/.storybook/preview.jsx deleted file mode 100644 index 928e10eb..00000000 --- a/.storybook/preview.jsx +++ /dev/null @@ -1,24 +0,0 @@ -import { addDecorator } from "@storybook/react"; -import { MemoryRouter } from "react-router-dom"; -import { usePageFocusStyle } from "../src/usePageFocusStyle"; -import { OverlayProvider } from "@react-aria/overlays"; -import "../src/index.css"; - -export const parameters = { - actions: { argTypesRegex: "^on[A-Z].*" }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/, - }, - }, -}; - -addDecorator((story) => { - usePageFocusStyle(); - return ( - - {story()} - - ); -}); diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 00000000..30c038ec --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,13 @@ +# Don't post comments on PRs; they're noisy and the same information can be +# gotten through the checks section at the bottom of the PR anyways +comment: false +coverage: + status: + project: + default: + # Track the impact of changes on overall coverage without blocking PRs + informational: true + patch: + default: + # Expect 80% coverage on all lines that a PR touches + target: 80% diff --git a/package.json b/package.json index f020b70e..175a5655 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "i18n": "node_modules/i18next-parser/bin/cli.js", "i18n:check": "node_modules/i18next-parser/bin/cli.js --fail-on-warnings --fail-on-update", "test": "vitest", - "test:coverage": "vitest run --coverage", + "test:coverage": "vitest --coverage", "backend": "docker-compose -f backend-docker-compose.yml up" }, "dependencies": { @@ -95,7 +95,7 @@ "@types/content-type": "^1.1.5", "@types/dom-screen-wake-lock": "^1.0.1", "@types/dompurify": "^3.0.2", - "@types/grecaptcha": "^3.0.4", + "@types/grecaptcha": "^3.0.9", "@types/node": "^20.0.0", "@types/react-dom": "^18.3.0", "@types/react-router-dom": "^5.3.3", @@ -104,6 +104,7 @@ "@types/uuid": "10", "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^7.0.0", + "@vitest/coverage-v8": "^2.0.5", "babel-loader": "^9.0.0", "babel-plugin-transform-vite-meta-env": "^1.0.3", "eslint": "^8.14.0", @@ -116,6 +117,7 @@ "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.5.0", "eslint-plugin-unicorn": "^55.0.0", + "global-jsdom": "^24.0.0", "i18next-parser": "^9.0.0", "jsdom": "^25.0.0", "prettier": "^3.0.0", diff --git a/src/Avatar.tsx b/src/Avatar.tsx index 06583445..abe01539 100644 --- a/src/Avatar.tsx +++ b/src/Avatar.tsx @@ -17,7 +17,7 @@ limitations under the License. import { useMemo, FC } from "react"; import { Avatar as CompoundAvatar } from "@vector-im/compound-web"; -import { getAvatarUrl } from "./matrix-utils"; +import { getAvatarUrl } from "./utils/matrix"; import { useClient } from "./ClientContext"; export enum Size { diff --git a/src/ClientContext.tsx b/src/ClientContext.tsx index 8d13e315..8516a13d 100644 --- a/src/ClientContext.tsx +++ b/src/ClientContext.tsx @@ -39,7 +39,7 @@ import { CryptoStoreIntegrityError, fallbackICEServerAllowed, initClient, -} from "./matrix-utils"; +} from "./utils/matrix"; import { widget } from "./widget"; import { PosthogAnalytics, diff --git a/src/Toast.test.tsx b/src/Toast.test.tsx new file mode 100644 index 00000000..e35e135c --- /dev/null +++ b/src/Toast.test.tsx @@ -0,0 +1,55 @@ +/* +Copyright 2023 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import { describe, expect, test, vi } from "vitest"; +import { render, configure } from "@testing-library/react"; + +import { Toast } from "../src/Toast"; +import { withFakeTimers } from "./utils/test"; + +configure({ + defaultHidden: true, +}); + +describe("Toast", () => { + test("renders", () => { + const { queryByRole } = render( + {}}> + Hello world! + , + ); + expect(queryByRole("dialog")).toBe(null); + const { getByRole } = render( + {}}> + Hello world! + , + ); + expect(getByRole("dialog")).toMatchSnapshot(); + }); + + test("dismisses itself after the specified timeout", () => { + withFakeTimers(() => { + const onDismiss = vi.fn(); + render( + + Hello world! + , + ); + vi.advanceTimersByTime(2000); + expect(onDismiss).toHaveBeenCalled(); + }); + }); +}); diff --git a/src/Toast.tsx b/src/Toast.tsx index fffbec97..e9c534f1 100644 --- a/src/Toast.tsx +++ b/src/Toast.tsx @@ -86,7 +86,7 @@ export const Toast: FC = ({ - + { - beforeAll(() => { - vi.mocked(Config.defaultServerName).mockReturnValue("call.ems.host"); - }); - describe("handles URL with /room/", () => { it("and nothing else", () => { expect( diff --git a/test/__snapshots__/Toast-test.tsx.snap b/src/__snapshots__/Toast-test.tsx.snap similarity index 92% rename from test/__snapshots__/Toast-test.tsx.snap rename to src/__snapshots__/Toast-test.tsx.snap index 7edfdcf7..2a424474 100644 --- a/test/__snapshots__/Toast-test.tsx.snap +++ b/src/__snapshots__/Toast-test.tsx.snap @@ -2,7 +2,6 @@ exports[`Toast renders 1`] = ` +`; diff --git a/src/analytics/PosthogAnalytics.ts b/src/analytics/PosthogAnalytics.ts index 5cbc552b..b46ebf5f 100644 --- a/src/analytics/PosthogAnalytics.ts +++ b/src/analytics/PosthogAnalytics.ts @@ -144,7 +144,7 @@ export class PosthogAnalytics { advanced_disable_decide: true, }); this.enabled = true; - } else { + } else if (import.meta.env.MODE !== "test") { logger.info( "Posthog is not enabled because there is no api key or no host given in the config", ); diff --git a/src/auth/useInteractiveLogin.ts b/src/auth/useInteractiveLogin.ts index 7ea01811..28b005ff 100644 --- a/src/auth/useInteractiveLogin.ts +++ b/src/auth/useInteractiveLogin.ts @@ -22,7 +22,7 @@ import { MatrixClient, } from "matrix-js-sdk/src/matrix"; -import { initClient } from "../matrix-utils"; +import { initClient } from "../utils/matrix"; import { Session } from "../ClientContext"; export function useInteractiveLogin(): ( diff --git a/src/auth/useInteractiveRegistration.ts b/src/auth/useInteractiveRegistration.ts index f7a7854e..57c62355 100644 --- a/src/auth/useInteractiveRegistration.ts +++ b/src/auth/useInteractiveRegistration.ts @@ -22,7 +22,7 @@ import { RegisterResponse, } from "matrix-js-sdk/src/matrix"; -import { initClient } from "../matrix-utils"; +import { initClient } from "../utils/matrix"; import { Session } from "../ClientContext"; import { Config } from "../config/Config"; import { widget } from "../widget"; diff --git a/src/auth/useRecaptcha.ts b/src/auth/useRecaptcha.ts index 4eea468a..03a9fe49 100644 --- a/src/auth/useRecaptcha.ts +++ b/src/auth/useRecaptcha.ts @@ -13,17 +13,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - +// import "@types/grecaptcha"; import { useEffect, useCallback, useRef, useState } from "react"; import { randomString } from "matrix-js-sdk/src/randomstring"; import { useTranslation } from "react-i18next"; import { logger } from "matrix-js-sdk/src/logger"; import { translatedError } from "../TranslatedError"; - declare global { interface Window { mxOnRecaptchaLoaded: () => void; + // grecaptcha: any; } } diff --git a/src/config/Config.ts b/src/config/Config.ts index a36cec33..382e7eab 100644 --- a/src/config/Config.ts +++ b/src/config/Config.ts @@ -44,6 +44,18 @@ export class Config { return Config.internalInstance.initPromise; } + /** + * This is a alternative initializer that does not load anything + * from a hosted config file but instead just initializes the conifg using the + * default config. + * + * It is supposed to only be used in tests. (It is executed in `vite.setup.js`) + */ + public static initDefault(): void { + Config.internalInstance = new Config(); + Config.internalInstance.config = { ...DEFAULT_CONFIG }; + } + // Convenience accessors public static defaultHomeserverUrl(): string | undefined { return ( diff --git a/test/home/CallList-test.tsx b/src/home/CallList.test.tsx similarity index 85% rename from test/home/CallList-test.tsx rename to src/home/CallList.test.tsx index 3920be89..4703d544 100644 --- a/test/home/CallList-test.tsx +++ b/src/home/CallList.test.tsx @@ -15,20 +15,19 @@ limitations under the License. */ import { render, RenderResult } from "@testing-library/react"; -import { CallList } from "../../src/home/CallList"; import { MatrixClient } from "matrix-js-sdk"; -import { GroupCallRoom } from "../../src/home/useGroupCallRooms"; import { MemoryRouter } from "react-router-dom"; -import { ClientProvider } from "../../src/ClientContext"; +import { describe, expect, it } from "vitest"; + +import { CallList } from "../../src/home/CallList"; +import { GroupCallRoom } from "../../src/home/useGroupCallRooms"; describe("CallList", () => { const renderComponent = (rooms: GroupCallRoom[]): RenderResult => { return render( - - - - - , + + + , ); }; diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index bb22d4e8..f272a61c 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -23,7 +23,7 @@ import { FC } from "react"; import { CopyButton } from "../button"; import { Avatar, Size } from "../Avatar"; import styles from "./CallList.module.css"; -import { getAbsoluteRoomUrl, getRelativeRoomUrl } from "../matrix-utils"; +import { getAbsoluteRoomUrl, getRelativeRoomUrl } from "../utils/matrix"; import { Body } from "../typography/Typography"; import { GroupCallRoom } from "./useGroupCallRooms"; import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement"; diff --git a/src/home/RegisteredView.tsx b/src/home/RegisteredView.tsx index 1c1b0d3a..3d798453 100644 --- a/src/home/RegisteredView.tsx +++ b/src/home/RegisteredView.tsx @@ -26,7 +26,7 @@ import { getRelativeRoomUrl, roomAliasLocalpartFromRoomName, sanitiseRoomNameInput, -} from "../matrix-utils"; +} from "../utils/matrix"; import { useGroupCallRooms } from "./useGroupCallRooms"; import { Header, HeaderLogo, LeftNav, RightNav } from "../Header"; import commonStyles from "./common.module.css"; diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index 35cc832e..8950115e 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -31,7 +31,7 @@ import { getRelativeRoomUrl, roomAliasLocalpartFromRoomName, sanitiseRoomNameInput, -} from "../matrix-utils"; +} from "../utils/matrix"; import { useInteractiveRegistration } from "../auth/useInteractiveRegistration"; import { JoinExistingCallModal } from "./JoinExistingCallModal"; import { useRecaptcha } from "../auth/useRecaptcha"; diff --git a/test/initializer-test.ts b/src/initializer.test.ts similarity index 96% rename from test/initializer-test.ts rename to src/initializer.test.ts index 33cb6854..062e5cac 100644 --- a/test/initializer-test.ts +++ b/src/initializer.test.ts @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +import { expect, test } from "vitest"; + import { Initializer } from "../src/initializer"; test("initBeforeReact sets font family from URL param", () => { diff --git a/test/otel/ObjectFlattener-test.ts b/src/otel/ObjectFlattener.test.ts similarity index 94% rename from test/otel/ObjectFlattener-test.ts rename to src/otel/ObjectFlattener.test.ts index bee81a6e..56a7d648 100644 --- a/test/otel/ObjectFlattener-test.ts +++ b/src/otel/ObjectFlattener.test.ts @@ -1,9 +1,27 @@ +/* +Copyright 2024 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import { GroupCallStatsReport } from "matrix-js-sdk/src/webrtc/groupCall"; import { AudioConcealment, ByteSentStatsReport, ConnectionStatsReport, } from "matrix-js-sdk/src/webrtc/stats/statsReport"; +import { describe, expect, it } from "vitest"; + import { ObjectFlattener } from "../../src/otel/ObjectFlattener"; /* diff --git a/src/room/AppSelectionModal.tsx b/src/room/AppSelectionModal.tsx index 5868c9d8..de0c0b24 100644 --- a/src/room/AppSelectionModal.tsx +++ b/src/room/AppSelectionModal.tsx @@ -22,7 +22,7 @@ import { logger } from "matrix-js-sdk/src/logger"; import { Modal } from "../Modal"; import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement"; -import { getAbsoluteRoomUrl } from "../matrix-utils"; +import { getAbsoluteRoomUrl } from "../utils/matrix"; import styles from "./AppSelectionModal.module.css"; import { editFragmentQuery } from "../UrlParams"; import { E2eeType } from "../e2ee/e2eeType"; diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 6d1438b0..8339e749 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -35,7 +35,7 @@ import { MatrixInfo } from "./VideoPreview"; import { CallEndedView } from "./CallEndedView"; import { PosthogAnalytics } from "../analytics/PosthogAnalytics"; import { useProfile } from "../profile/useProfile"; -import { findDeviceByName } from "../media-utils"; +import { findDeviceByName } from "../utils/media"; import { ActiveCall } from "./InCallView"; import { MUTE_PARTICIPANT_COUNT, MuteStates } from "./MuteStates"; import { useMediaDevices, MediaDevices } from "../livekit/MediaDevicesContext"; diff --git a/src/room/InviteModal.tsx b/src/room/InviteModal.tsx index 8d1a4ead..22209a6c 100644 --- a/src/room/InviteModal.tsx +++ b/src/room/InviteModal.tsx @@ -25,7 +25,7 @@ import { import useClipboard from "react-use-clipboard"; import { Modal } from "../Modal"; -import { getAbsoluteRoomUrl } from "../matrix-utils"; +import { getAbsoluteRoomUrl } from "../utils/matrix"; import styles from "./InviteModal.module.css"; import { Toast } from "../Toast"; import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement"; diff --git a/test/room/checkForParallelCalls-test.ts b/src/room/checkForParallelCalls.test.ts similarity index 96% rename from test/room/checkForParallelCalls-test.ts rename to src/room/checkForParallelCalls.test.ts index 605a2431..584a62a4 100644 --- a/test/room/checkForParallelCalls-test.ts +++ b/src/room/checkForParallelCalls.test.ts @@ -14,15 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { vi, Mocked } from "vitest"; +import { vi, Mocked, test, expect } from "vitest"; import { RoomState } from "matrix-js-sdk/src/models/room-state"; + import { PosthogAnalytics } from "../../src/analytics/PosthogAnalytics"; import { checkForParallelCalls } from "../../src/room/checkForParallelCalls"; -import { withFakeTimers } from "../utils"; +import { withFakeTimers } from "../utils/test"; const withMockedPosthog = ( continuation: (posthog: Mocked) => void, -) => { +): void => { const posthog = vi.mocked({ trackEvent: vi.fn(), } as unknown as PosthogAnalytics); @@ -40,7 +41,7 @@ const mockRoomState = ( groupCallMemberContents: Record[], ): RoomState => { const stateEvents = groupCallMemberContents.map((content) => ({ - getContent: () => content, + getContent: (): Record => content, })); return { getStateEvents: () => stateEvents } as unknown as RoomState; }; diff --git a/test/rtcSessionHelper-test.ts b/src/rtcSessionHelper.test.ts similarity index 98% rename from test/rtcSessionHelper-test.ts rename to src/rtcSessionHelper.test.ts index f9c85964..fc00aa61 100644 --- a/test/rtcSessionHelper-test.ts +++ b/src/rtcSessionHelper.test.ts @@ -15,6 +15,7 @@ limitations under the License. */ import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; +import { expect, test, vi } from "vitest"; import { enterRTCSession } from "../src/rtcSessionHelpers"; import { Config } from "../src/config/Config"; diff --git a/src/state/CallViewModel.ts b/src/state/CallViewModel.ts index 0ba14845..144b0937 100644 --- a/src/state/CallViewModel.ts +++ b/src/state/CallViewModel.ts @@ -67,7 +67,7 @@ import { ScreenShareViewModel, UserMediaViewModel, } from "./MediaViewModel"; -import { accumulate, finalizeValue } from "../observable-utils"; +import { accumulate, finalizeValue } from "../utils/observable"; import { ObservableScope } from "./ObservableScope"; import { duplicateTiles } from "../settings/settings"; import { isFirefox } from "../Platform"; diff --git a/test/useCallViewKeyboardShortcuts-test.tsx b/src/useCallViewKeyboardShortcuts.test.tsx similarity index 98% rename from test/useCallViewKeyboardShortcuts-test.tsx rename to src/useCallViewKeyboardShortcuts.test.tsx index c1826797..7fecf63e 100644 --- a/test/useCallViewKeyboardShortcuts-test.tsx +++ b/src/useCallViewKeyboardShortcuts.test.tsx @@ -16,7 +16,7 @@ limitations under the License. import { render } from "@testing-library/react"; import { FC, useRef } from "react"; -import { test } from "vitest"; +import { expect, test, vi } from "vitest"; import { Button } from "@vector-im/compound-web"; import userEvent from "@testing-library/user-event"; diff --git a/src/array-utils.ts b/src/utils/array.ts similarity index 100% rename from src/array-utils.ts rename to src/utils/array.ts diff --git a/src/matrix-utils.ts b/src/utils/matrix.ts similarity index 97% rename from src/matrix-utils.ts rename to src/utils/matrix.ts index 16904870..a992b5ce 100644 --- a/src/matrix-utils.ts +++ b/src/utils/matrix.ts @@ -32,11 +32,11 @@ import { secureRandomBase64Url } from "matrix-js-sdk/src/randomstring"; import type { MatrixClient } from "matrix-js-sdk/src/client"; import type { Room } from "matrix-js-sdk/src/models/room"; -import IndexedDBWorker from "./IndexedDBWorker?worker"; -import { generateUrlSearchParams, getUrlParams } from "./UrlParams"; -import { Config } from "./config/Config"; -import { E2eeType } from "./e2ee/e2eeType"; -import { EncryptionSystem, saveKeyForRoom } from "./e2ee/sharedKeyManagement"; +import IndexedDBWorker from "../IndexedDBWorker?worker"; +import { generateUrlSearchParams, getUrlParams } from "../UrlParams"; +import { Config } from "../config/Config"; +import { E2eeType } from "../e2ee/e2eeType"; +import { EncryptionSystem, saveKeyForRoom } from "../e2ee/sharedKeyManagement"; export const fallbackICEServerAllowed = import.meta.env.VITE_FALLBACK_STUN_ALLOWED === "true"; diff --git a/src/media-utils.ts b/src/utils/media.ts similarity index 100% rename from src/media-utils.ts rename to src/utils/media.ts diff --git a/src/observable-utils.ts b/src/utils/observable.ts similarity index 100% rename from src/observable-utils.ts rename to src/utils/observable.ts diff --git a/test/utils.ts b/src/utils/test.ts similarity index 100% rename from test/utils.ts rename to src/utils/test.ts diff --git a/src/vitest.setup.ts b/src/vitest.setup.ts new file mode 100644 index 00000000..a97fc335 --- /dev/null +++ b/src/vitest.setup.ts @@ -0,0 +1,39 @@ +/* +Copyright 2024 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import "global-jsdom/register"; + +import i18n from "i18next"; +import posthog from "posthog-js"; +import { initReactI18next } from "react-i18next"; +import { afterEach } from "vitest"; +import { cleanup } from "@testing-library/react"; + +import { Config } from "./config/Config"; + +// Bare-minimum i18n config +i18n.use(initReactI18next).init({ + lng: "en-GB", + fallbackLng: "en-GB", + interpolation: { + escapeValue: false, // React has built-in XSS protections + }, +}); + +Config.initDefault(); +posthog.opt_out_capturing(); + +afterEach(cleanup); diff --git a/src/widget.ts b/src/widget.ts index d3c98867..c376791c 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -200,7 +200,8 @@ export const widget = ((): WidgetHelpers | null => { return { api, lazyActions, client: clientPromise }; } else { - logger.info("No widget API available"); + if (import.meta.env.MODE !== "test") + logger.info("No widget API available"); return null; } } catch (e) { diff --git a/test/Toast-test.tsx b/test/Toast-test.tsx deleted file mode 100644 index 6b573523..00000000 --- a/test/Toast-test.tsx +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { vi } from "vitest"; -import { screen, render } from "@testing-library/react"; -import { Toast } from "../src/Toast"; -import userEvent from "@testing-library/user-event"; -import { withFakeTimers } from "./utils"; - -test("Toast renders", () => { - render( - {}}> - Hello world! - , - ); - expect(screen.queryByRole("dialog")).toBe(null); - render( - {}}> - Hello world! - , - ); - expect(screen.getByRole("dialog")).toMatchSnapshot(); -}); - -test("Toast dismisses when clicked", async () => { - const onDismiss = vi.fn(); - render( - - Hello world! - , - ); - await userEvent.click(screen.getByRole("dialog")); - expect(onDismiss).toHaveBeenCalled(); -}); - -test("Toast dismisses itself after the specified timeout", async () => { - withFakeTimers(() => { - const onDismiss = vi.fn(); - render( - - Hello world! - , - ); - vi.advanceTimersByTime(2000); - expect(onDismiss).toHaveBeenCalled(); - }); -}); diff --git a/tsconfig.json b/tsconfig.json index 099a2ef1..0c970386 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -48,10 +48,7 @@ }, "include": [ "./node_modules/matrix-js-sdk/src/@types/*.d.ts", - "./node_modules/vitest/globals.d.ts", "./src/**/*.ts", - "./src/**/*.tsx", - "./test/**/*.ts", - "./test/**/*.tsx" + "./src/**/*.tsx" ] } diff --git a/vitest.config.js b/vitest.config.js index 9511ab99..b90f74c2 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -6,17 +6,17 @@ export default defineConfig((configEnv) => viteConfig(configEnv), defineConfig({ test: { - globals: true, environment: "jsdom", css: { modules: { classNameStrategy: "non-scoped", }, }, - include: ["test/**/*-test.[jt]s?(x)"], + isolate: false, + setupFiles: ["src/vitest.setup.ts"], coverage: { - reporter: ["text", "html"], - exclude: ["node_modules/"], + reporter: ["html", "json"], + include: ["src/"], }, }, }), diff --git a/yarn.lock b/yarn.lock index 0d2de0d3..ba73d1b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -260,13 +260,20 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== -"@babel/parser@^7.25.0", "@babel/parser@^7.25.4": +"@babel/parser@^7.24.4", "@babel/parser@^7.25.4": version "7.25.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a" integrity sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA== dependencies: "@babel/types" "^7.25.4" +"@babel/parser@^7.25.0": + version "7.25.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" + integrity sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw== + dependencies: + "@babel/types" "^7.25.2" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.3": version "7.25.3" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.3.tgz#dca427b45a6c0f5c095a1c639dfe2476a3daba7f" @@ -1101,7 +1108,7 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7": +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.4.4": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== @@ -1119,7 +1126,7 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4", "@babel/types@^7.4.4": +"@babel/types@^7.24.0", "@babel/types@^7.25.4": version "7.25.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f" integrity sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ== @@ -1128,6 +1135,20 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" +"@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.2.tgz#55fb231f7dc958cd69ea141a4c2997e819646125" + integrity sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + "@bufbuild/protobuf@^1.7.2": version "1.10.0" resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.10.0.tgz#1a67ac889c2d464a3492b3e54c38f80517963b16" @@ -1845,6 +1866,23 @@ dependencies: "@babel/runtime" "^7.6.2" +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" @@ -1869,7 +1907,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== -"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -2127,6 +2165,11 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.0.tgz#f074db930a7feb4d64103a9a576c5fbad046fcac" integrity sha512-yL0jI6Ltuz8R+Opj7jClGrul6pOoYrdfVmzQS4SITXRPH7I5IRZbrwe/6/v8v4WYMa6MYZG480S1+uc/IGfqsA== +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -3411,7 +3454,7 @@ resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.3.tgz#a8ef894305af28d1fc6d2dfdfc98e899591ea529" integrity sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g== -"@types/grecaptcha@^3.0.4": +"@types/grecaptcha@^3.0.9": version "3.0.9" resolved "https://registry.yarnpkg.com/@types/grecaptcha/-/grecaptcha-3.0.9.tgz#9f3b07ec06c8fff221aa6fc124fe5b8a0e2c3349" integrity sha512-fFxMtjAvXXMYTzDFK5NpcVB7WHnrHVLl00QzEGpuFxSAC789io6M+vjcn+g5FTEamIJtJr/IHkCDsqvJxeWDyw== @@ -3677,6 +3720,24 @@ "@types/babel__core" "^7.20.5" react-refresh "^0.14.2" +"@vitest/coverage-v8@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-2.0.5.tgz#411961ce4fd1177a32b4dd74ab576ed3b859155e" + integrity sha512-qeFcySCg5FLO2bHHSa0tAZAOnAUbp4L6/A5JDuj9+bt53JREl8hpLjLHEWF0e/gWc8INVpJaqA7+Ene2rclpZg== + dependencies: + "@ampproject/remapping" "^2.3.0" + "@bcoe/v8-coverage" "^0.2.3" + debug "^4.3.5" + istanbul-lib-coverage "^3.2.2" + istanbul-lib-report "^3.0.1" + istanbul-lib-source-maps "^5.0.6" + istanbul-reports "^3.1.7" + magic-string "^0.30.10" + magicast "^0.3.4" + std-env "^3.7.0" + test-exclude "^7.0.1" + tinyrainbow "^1.2.0" + "@vitest/expect@2.0.5": version "2.0.5" resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-2.0.5.tgz#f3745a6a2c18acbea4d39f5935e913f40d26fa86" @@ -3811,6 +3872,11 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -3818,7 +3884,7 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -3830,6 +3896,11 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + anymatch@^3.1.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" @@ -4446,7 +4517,7 @@ cross-fetch@4.0.0: dependencies: node-fetch "^2.6.12" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -4736,11 +4807,21 @@ dotenv@^16.3.1: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + electron-to-chromium@^1.5.4: version "1.5.13" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + emoji-regex@^9.2.2: version "9.2.2" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" @@ -5360,6 +5441,14 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +foreground-child@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" + integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + form-data@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" @@ -5529,6 +5618,18 @@ glob-stream@^8.0.0: normalize-path "^3.0.0" streamx "^2.12.5" +glob@^10.4.1: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + glob@^7.0.0, glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -5551,6 +5652,11 @@ glob@^9.3.2: minipass "^4.2.4" path-scurry "^1.6.1" +global-jsdom@^24.0.0: + version "24.0.0" + resolved "https://registry.yarnpkg.com/global-jsdom/-/global-jsdom-24.0.0.tgz#be2a5f0392a8626fde76c4d8037618c7a0f1079c" + integrity sha512-CARBUWkqZ3O9VOc2PIVE5kQpdQeJh9eF9kQ7zSeNtmqx5vAFDKMr9XnDt1epVMMrz1s9uK/yFCa4HLwpa6TcPA== + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -5714,6 +5820,11 @@ html-encoding-sniffer@^4.0.0: dependencies: whatwg-encoding "^3.1.1" +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + html-parse-stringify@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz#dfc1017347ce9f77c8141a507f233040c59c55d2" @@ -6000,6 +6111,11 @@ is-finalizationregistry@^1.0.2: dependencies: call-bind "^1.0.2" +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + is-generator-function@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" @@ -6147,6 +6263,37 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-report@^3.0.0, istanbul-lib-report@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^5.0.6: + version "5.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz#acaef948df7747c8eb5fbf1265cb980f6353a441" + integrity sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A== + dependencies: + "@jridgewell/trace-mapping" "^0.3.23" + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + +istanbul-reports@^3.1.7: + version "3.1.7" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + iterator.prototype@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0" @@ -6158,6 +6305,15 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jaeger-client@^3.15.0: version "3.19.0" resolved "https://registry.yarnpkg.com/jaeger-client/-/jaeger-client-3.19.0.tgz#9b5bd818ebd24e818616ee0f5cffe1722a53ae6e" @@ -6462,6 +6618,22 @@ magic-string@^0.30.10: dependencies: "@jridgewell/sourcemap-codec" "^1.5.0" +magicast@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/magicast/-/magicast-0.3.4.tgz#bbda1791d03190a24b00ff3dd18151e7fd381d19" + integrity sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q== + dependencies: + "@babel/parser" "^7.24.4" + "@babel/types" "^7.24.0" + source-map-js "^1.2.0" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + matcher-collection@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/matcher-collection/-/matcher-collection-2.0.1.tgz#90be1a4cf58d6f2949864f65bb3b0f3e41303b29" @@ -6574,7 +6746,7 @@ minipass@^4.2.4: resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== @@ -6877,6 +7049,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + pako@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" @@ -6956,7 +7133,7 @@ path-posix@^1.0.0: resolved "https://registry.yarnpkg.com/path-posix/-/path-posix-1.0.0.tgz#06b26113f56beab042545a23bfa88003ccac260f" integrity sha512-1gJ0WpNIiYcQydgg3Ed8KzvIqTsDpNwq+cjBCssvBtuTWjEqY1AW+i+OepiEMqDCzyro9B2sLAe4RBPajMYFiA== -path-scurry@^1.6.1: +path-scurry@^1.11.1, path-scurry@^1.6.1: version "1.11.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== @@ -7908,12 +8085,12 @@ semver@^7.5.2: dependencies: lru-cache "^6.0.0" -semver@^7.6.0: +semver@^7.5.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -semver@^7.6.1: +semver@^7.6.0, semver@^7.6.1: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -7981,7 +8158,7 @@ siginfo@^2.0.0: resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== -signal-exit@^4.1.0: +signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== @@ -8082,6 +8259,33 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw== +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string.prototype.includes@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string.prototype.includes/-/string.prototype.includes-2.0.0.tgz#8986d57aee66d5460c144620a6d873778ad7289f" @@ -8158,13 +8362,27 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -8233,6 +8451,15 @@ teex@^1.0.1: dependencies: streamx "^2.12.5" +test-exclude@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-7.0.1.tgz#20b3ba4906ac20994e275bbcafd68d510264c2a2" + integrity sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^10.4.1" + minimatch "^9.0.4" + text-decoder@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.1.1.tgz#5df9c224cebac4a7977720b9f083f9efa1aefde8" @@ -8278,9 +8505,9 @@ tinybench@^2.8.0: integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== tinypool@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-1.0.0.tgz#a68965218e04f4ad9de037d2a1cd63cda9afb238" - integrity sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ== + version "1.0.1" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-1.0.1.tgz#c64233c4fac4304e109a64340178760116dbe1fe" + integrity sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA== tinyqueue@^3.0.0: version "3.0.0" @@ -8898,6 +9125,24 @@ why-is-node-running@^2.3.0: siginfo "^2.0.0" stackback "0.0.2" +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" From 7e3e17a3e84e6d33b55dcbdb3897c2d797fa6fd4 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Tue, 27 Aug 2024 15:55:38 +0200 Subject: [PATCH 05/33] Link "Create an account" button to registration page (#2583) Fixes: #2328 Signed-off-by: Johannes Marbach --- src/room/RoomAuthView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/room/RoomAuthView.tsx b/src/room/RoomAuthView.tsx index 272b82e4..83bed2b3 100644 --- a/src/room/RoomAuthView.tsx +++ b/src/room/RoomAuthView.tsx @@ -117,7 +117,7 @@ export const RoomAuthView: FC = () => { Not registered yet?{" "} Create an account From 6521c8055ccb11274b3e29c30ef246dbd8fdd3ca Mon Sep 17 00:00:00 2001 From: fkwp Date: Tue, 27 Aug 2024 21:22:16 +0200 Subject: [PATCH 06/33] set codecov token from secrets --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index eaefe652..f5afb7d5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,4 +23,5 @@ jobs: uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4 with: flags: unittests + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true From 7bca541cb66a060f6da5b7e4de0db0661f09ba9c Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 27 Aug 2024 20:06:57 -0400 Subject: [PATCH 07/33] Perform dead code analysis with Knip (#2575) * Install Knip * Clarify an import that was confusing Knip * Fix issues detected by Knip Including cleaning up some unused code and dependencies, using a React hook that we unintentionally stopped using, and also adding some previously undeclared dependencies. * Run dead code analysis in lint script and CI --------- Co-authored-by: Timo --- .github/workflows/lint.yaml | 2 + .github/workflows/test.yaml | 3 +- knip.ts | 30 ++ package.json | 109 +++--- renovate.json | 11 +- src/Banner.tsx | 27 -- src/home/RegisteredView.tsx | 7 +- src/home/UnauthenticatedView.tsx | 7 +- src/livekit/LivekitFocus.ts | 0 src/room/RoomPage.tsx | 7 +- src/room/usePageUnload.ts | 64 ---- src/settings/SettingsModal.tsx | 4 +- src/useEvents.ts | 18 - src/useLocalStorage.ts | 3 - src/usePrevious.ts | 27 -- src/utils/array.ts | 44 --- src/utils/matrix.ts | 32 -- src/widget.ts | 21 -- vitest.config.js | 2 +- yarn.lock | 627 ++++++++----------------------- 20 files changed, 271 insertions(+), 774 deletions(-) create mode 100644 knip.ts delete mode 100644 src/Banner.tsx delete mode 100644 src/livekit/LivekitFocus.ts delete mode 100644 src/room/usePageUnload.ts delete mode 100644 src/usePrevious.ts delete mode 100644 src/utils/array.ts diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 4b2361d2..5c676a7c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -23,3 +23,5 @@ jobs: run: "yarn run lint:eslint" - name: Type check run: "yarn run lint:types" + - name: Dead code analysis + run: "yarn run lint:knip" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f5afb7d5..870dabe1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,7 +21,8 @@ jobs: run: "yarn run test:coverage" - name: Upload to codecov uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: flags: unittests - token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true diff --git a/knip.ts b/knip.ts new file mode 100644 index 00000000..becafc2e --- /dev/null +++ b/knip.ts @@ -0,0 +1,30 @@ +import { KnipConfig } from "knip"; + +export default { + entry: ["src/main.tsx", "i18next-parser.config.ts"], + ignoreBinaries: [ + // This is deprecated, so Knip doesn't actually recognize it as a globally + // installed binary. TODO We should switch to Compose v2: + // https://docs.docker.com/compose/migrate/ + "docker-compose", + ], + ignoreDependencies: [ + // Used in CSS + "normalize.css", + // Used for its global type declarations + "@types/grecaptcha", + // Because we use matrix-js-sdk as a Git dependency rather than consuming + // the proper release artifacts, and also import directly from src/, we're + // forced to re-install some of the types that it depends on even though + // these look unused to Knip + "@types/content-type", + "@types/sdp-transform", + "@types/uuid", + // We obviously use this, but if the package has been linked with yarn link, + // then Knip will flag it as a false positive + // https://github.com/webpro-nl/knip/issues/766 + "@vector-im/compound-web", + "matrix-widget-api", + ], + ignoreExportsUsedInFile: true, +} satisfies KnipConfig; diff --git a/package.json b/package.json index 175a5655..fa2e6bb8 100644 --- a/package.json +++ b/package.json @@ -8,32 +8,39 @@ "serve": "vite preview", "prettier:check": "prettier -c .", "prettier:format": "prettier -w .", - "lint": "yarn lint:types && yarn lint:eslint", + "lint": "yarn lint:types && yarn lint:eslint && yarn lint:knip", "lint:eslint": "eslint --max-warnings 0 src", "lint:eslint-fix": "eslint --max-warnings 0 src --fix", + "lint:knip": "knip", "lint:types": "tsc", - "i18n": "node_modules/i18next-parser/bin/cli.js", - "i18n:check": "node_modules/i18next-parser/bin/cli.js --fail-on-warnings --fail-on-update", + "i18n": "i18next", + "i18n:check": "i18next --fail-on-warnings --fail-on-update", "test": "vitest", "test:coverage": "vitest --coverage", "backend": "docker-compose -f backend-docker-compose.yml up" }, - "dependencies": { + "devDependencies": { + "@babel/core": "^7.16.5", + "@babel/preset-env": "^7.22.20", + "@babel/preset-react": "^7.22.15", + "@babel/preset-typescript": "^7.23.0", "@juggle/resize-observer": "^3.3.1", "@livekit/components-core": "^0.11.0", "@livekit/components-react": "^2.0.0", "@opentelemetry/api": "^1.4.0", - "@opentelemetry/context-zone": "^1.9.1", - "@opentelemetry/exporter-jaeger": "^1.9.1", + "@opentelemetry/core": "^1.25.1", "@opentelemetry/exporter-trace-otlp-http": "^0.52.0", - "@opentelemetry/instrumentation-document-load": "^0.39.0", - "@opentelemetry/instrumentation-user-interaction": "^0.39.0", + "@opentelemetry/resources": "^1.25.1", + "@opentelemetry/sdk-trace-base": "^1.25.1", "@opentelemetry/sdk-trace-web": "^1.9.1", + "@opentelemetry/semantic-conventions": "^1.25.1", "@radix-ui/react-dialog": "^1.0.4", "@radix-ui/react-slider": "^1.1.2", "@radix-ui/react-visually-hidden": "^1.0.3", "@react-aria/button": "^3.3.4", "@react-aria/focus": "^3.5.0", + "@react-aria/interactions": "^3.9.1", + "@react-aria/listbox": "^3.5.1", "@react-aria/menu": "^3.3.0", "@react-aria/overlays": "^3.7.3", "@react-aria/select": "^3.6.0", @@ -42,71 +49,40 @@ "@react-aria/utils": "^3.10.0", "@react-spring/web": "^9.4.4", "@react-stately/collections": "^3.3.4", + "@react-stately/list": "^3.5.1", + "@react-stately/menu": "^3.3.1", "@react-stately/select": "^3.1.3", + "@react-stately/tabs": "^3.1.1", "@react-stately/tooltip": "^3.0.5", "@react-stately/tree": "^3.2.0", - "@sentry/react": "^8.0.0", - "@sentry/tracing": "^7.0.0", - "@types/lodash": "^4.14.199", - "@use-gesture/react": "^10.2.11", - "@vector-im/compound-design-tokens": "^1.0.0", - "@vector-im/compound-web": "^6.0.0", - "@vitejs/plugin-basic-ssl": "^1.0.1", - "@vitejs/plugin-react": "^4.0.1", - "buffer": "^6.0.3", - "classnames": "^2.3.1", - "events": "^3.3.0", - "i18next": "^23.0.0", - "i18next-browser-languagedetector": "^8.0.0", - "i18next-http-backend": "^2.0.0", - "livekit-client": "^2.0.2", - "lodash": "^4.17.21", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#467908703bc67fa3e23d978f5549e2709d4acf74", - "matrix-widget-api": "^1.8.2", - "normalize.css": "^8.0.1", - "observable-hooks": "^4.2.3", - "pako": "^2.0.4", - "postcss-preset-env": "^10.0.0", - "posthog-js": "^1.29.0", - "react": "18", - "react-dom": "18", - "react-i18next": "^15.0.0", - "react-router-dom": "^5.2.0", - "react-use-clipboard": "^1.0.7", - "react-use-measure": "^2.1.1", - "rxjs": "^7.8.1", - "sdp-transform": "^2.14.1", - "tinyqueue": "^3.0.0", - "unique-names-generator": "^4.6.0", - "uuid": "10", - "vaul": "^0.9.0" - }, - "devDependencies": { - "@babel/core": "^7.16.5", - "@babel/preset-env": "^7.22.20", - "@babel/preset-react": "^7.22.15", - "@babel/preset-typescript": "^7.23.0", - "@react-spring/rafz": "^9.7.3", "@react-types/dialog": "^3.5.5", + "@react-types/menu": "^3.6.1", + "@react-types/overlays": "^3.6.1", + "@react-types/shared": "^3.13.1", + "@react-types/tabs": "^3.1.1", + "@sentry/react": "^8.0.0", "@sentry/vite-plugin": "^2.0.0", "@testing-library/dom": "^10.1.0", "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.1", "@types/content-type": "^1.1.5", - "@types/dom-screen-wake-lock": "^1.0.1", - "@types/dompurify": "^3.0.2", "@types/grecaptcha": "^3.0.9", + "@types/lodash": "^4.14.199", "@types/node": "^20.0.0", "@types/react-dom": "^18.3.0", "@types/react-router-dom": "^5.3.3", - "@types/request": "^2.48.8", "@types/sdp-transform": "^2.4.5", "@types/uuid": "10", "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^7.0.0", + "@use-gesture/react": "^10.2.11", + "@vector-im/compound-design-tokens": "^1.0.0", + "@vector-im/compound-web": "^6.0.0", + "@vitejs/plugin-basic-ssl": "^1.0.1", + "@vitejs/plugin-react": "^4.0.1", "@vitest/coverage-v8": "^2.0.5", - "babel-loader": "^9.0.0", "babel-plugin-transform-vite-meta-env": "^1.0.3", + "classnames": "^2.3.1", "eslint": "^8.14.0", "eslint-config-google": "^0.14.0", "eslint-config-prettier": "^9.0.0", @@ -118,12 +94,37 @@ "eslint-plugin-react-hooks": "^4.5.0", "eslint-plugin-unicorn": "^55.0.0", "global-jsdom": "^24.0.0", + "history": "^4.0.0", + "i18next": "^23.0.0", + "i18next-browser-languagedetector": "^8.0.0", + "i18next-http-backend": "^2.0.0", "i18next-parser": "^9.0.0", "jsdom": "^25.0.0", + "knip": "^5.27.2", + "livekit-client": "^2.0.2", + "lodash": "^4.17.21", + "loglevel": "^1.9.1", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#467908703bc67fa3e23d978f5549e2709d4acf74", + "matrix-widget-api": "^1.8.2", + "normalize.css": "^8.0.1", + "observable-hooks": "^4.2.3", + "pako": "^2.0.4", + "postcss": "^8.4.41", + "postcss-preset-env": "^10.0.0", + "posthog-js": "^1.29.0", "prettier": "^3.0.0", + "react": "18", + "react-dom": "18", + "react-i18next": "^15.0.0", + "react-router-dom": "^5.2.0", + "react-use-clipboard": "^1.0.7", + "react-use-measure": "^2.1.1", + "rxjs": "^7.8.1", "sass": "^1.42.1", "typescript": "^5.1.6", "typescript-eslint-language-service": "^5.0.5", + "unique-names-generator": "^4.6.0", + "vaul": "^0.9.0", "vite": "^5.0.0", "vite-plugin-html-template": "^1.1.0", "vite-plugin-svgr": "^4.0.0", diff --git a/renovate.json b/renovate.json index 10dfca5d..009174f4 100644 --- a/renovate.json +++ b/renovate.json @@ -48,6 +48,8 @@ "ignoreDeps": [ "@react-aria/button", "@react-aria/focus", + "@react-aria/interactions", + "@react-aria/listbox", "@react-aria/menu", "@react-aria/overlays", "@react-aria/select", @@ -55,9 +57,16 @@ "@react-aria/tooltip", "@react-aria/utils", "@react-stately/collections", + "@react-stately/list", + "@react-stately/menu", "@react-stately/select", + "@react-stately/tabs", "@react-stately/tooltip", "@react-stately/tree", - "@react-types/dialog" + "@react-types/dialog", + "@react-types/menu", + "@react-types/overlays", + "@react-types/shared", + "@react-types/tabs" ] } diff --git a/src/Banner.tsx b/src/Banner.tsx deleted file mode 100644 index 87ce8a96..00000000 --- a/src/Banner.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { FC, ReactNode } from "react"; - -import styles from "./Banner.module.css"; - -interface Props { - children: ReactNode; -} - -export const Banner: FC = ({ children }) => { - return
{children}
; -}; diff --git a/src/home/RegisteredView.tsx b/src/home/RegisteredView.tsx index 3d798453..f3b8d229 100644 --- a/src/home/RegisteredView.tsx +++ b/src/home/RegisteredView.tsx @@ -40,10 +40,7 @@ import { Caption } from "../typography/Typography"; import { Form } from "../form/Form"; import { AnalyticsNotice } from "../analytics/AnalyticsNotice"; import { E2eeType } from "../e2ee/e2eeType"; -import { - useSetting, - optInAnalytics as optInAnalyticsSetting, -} from "../settings/settings"; +import { useOptInAnalytics } from "../settings/settings"; interface Props { client: MatrixClient; @@ -52,7 +49,7 @@ interface Props { export const RegisteredView: FC = ({ client }) => { const [loading, setLoading] = useState(false); const [error, setError] = useState(); - const [optInAnalytics] = useSetting(optInAnalyticsSetting); + const [optInAnalytics] = useOptInAnalytics(); const history = useHistory(); const { t } = useTranslation(); const [joinExistingCallModalOpen, setJoinExistingCallModalOpen] = diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index 8950115e..82e44991 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -43,16 +43,13 @@ import { generateRandomName } from "../auth/generateRandomName"; import { AnalyticsNotice } from "../analytics/AnalyticsNotice"; import { Config } from "../config/Config"; import { E2eeType } from "../e2ee/e2eeType"; -import { - useSetting, - optInAnalytics as optInAnalyticsSetting, -} from "../settings/settings"; +import { useOptInAnalytics } from "../settings/settings"; export const UnauthenticatedView: FC = () => { const { setClient } = useClient(); const [loading, setLoading] = useState(false); const [error, setError] = useState(); - const [optInAnalytics] = useSetting(optInAnalyticsSetting); + const [optInAnalytics] = useOptInAnalytics(); const { recaptchaKey, register } = useInteractiveRegistration(); const { execute, reset, recaptchaId } = useRecaptcha(recaptchaKey); diff --git a/src/livekit/LivekitFocus.ts b/src/livekit/LivekitFocus.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/src/room/RoomPage.tsx b/src/room/RoomPage.tsx index bfcf94fd..00071331 100644 --- a/src/room/RoomPage.tsx +++ b/src/room/RoomPage.tsx @@ -35,10 +35,7 @@ import { LobbyView } from "./LobbyView"; import { E2eeType } from "../e2ee/e2eeType"; import { useProfile } from "../profile/useProfile"; import { useMuteStates } from "./MuteStates"; -import { - useSetting, - optInAnalytics as optInAnalyticsSetting, -} from "../settings/settings"; +import { useOptInAnalytics } from "../settings/settings"; export const RoomPage: FC = () => { const { @@ -83,7 +80,7 @@ export const RoomPage: FC = () => { registerPasswordlessUser, ]); - const [optInAnalytics, setOptInAnalytics] = useSetting(optInAnalyticsSetting); + const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics(); useEffect(() => { // During the beta, opt into analytics by default if (optInAnalytics === null && setOptInAnalytics) setOptInAnalytics(true); diff --git a/src/room/usePageUnload.ts b/src/room/usePageUnload.ts deleted file mode 100644 index 679ae9e9..00000000 --- a/src/room/usePageUnload.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { useEffect } from "react"; - -import { platform } from "../Platform"; - -export function usePageUnload(callback: () => void): void { - useEffect(() => { - let pageVisibilityTimeout: ReturnType; - - function onBeforeUnload(event: PageTransitionEvent): void { - if (event.type === "visibilitychange") { - if (document.visibilityState === "visible") { - clearTimeout(pageVisibilityTimeout); - } else { - // Wait 5 seconds before closing the page to avoid accidentally leaving - // TODO: Make this configurable? - pageVisibilityTimeout = setTimeout(() => { - callback(); - }, 5000); - } - } else { - callback(); - } - } - - // iOS doesn't fire beforeunload event, so leave the call when you hide the page. - if (platform === "ios") { - window.addEventListener("pagehide", onBeforeUnload); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - document.addEventListener("visibilitychange", onBeforeUnload); - } - - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - window.addEventListener("beforeunload", onBeforeUnload); - - return (): void => { - window.removeEventListener("pagehide", onBeforeUnload); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - document.removeEventListener("visibilitychange", onBeforeUnload); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - window.removeEventListener("beforeunload", onBeforeUnload); - clearTimeout(pageVisibilityTimeout); - }; - }, [callback]); -} diff --git a/src/settings/SettingsModal.tsx b/src/settings/SettingsModal.tsx index 6763cc5d..20e5875d 100644 --- a/src/settings/SettingsModal.tsx +++ b/src/settings/SettingsModal.tsx @@ -42,9 +42,9 @@ import { import { widget } from "../widget"; import { useSetting, - optInAnalytics as optInAnalyticsSetting, developerSettingsTab as developerSettingsTabSetting, duplicateTiles as duplicateTilesSetting, + useOptInAnalytics, } from "./settings"; import { isFirefox } from "../Platform"; @@ -77,7 +77,7 @@ export const SettingsModal: FC = ({ }) => { const { t } = useTranslation(); - const [optInAnalytics, setOptInAnalytics] = useSetting(optInAnalyticsSetting); + const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics(); const [developerSettingsTab, setDeveloperSettingsTab] = useSetting( developerSettingsTabSetting, ); diff --git a/src/useEvents.ts b/src/useEvents.ts index 66c5084a..6e883599 100644 --- a/src/useEvents.ts +++ b/src/useEvents.ts @@ -15,7 +15,6 @@ limitations under the License. */ import { useEffect } from "react"; -import EventEmitter, { EventMap } from "typed-emitter"; import type { Listener, @@ -60,20 +59,3 @@ export function useTypedEventEmitter< }; }, [emitter, eventType, listener]); } - -// Shortcut for registering a listener on an eventemitter3 EventEmitter (ie. what the LiveKit SDK uses) -export function useEventEmitterThree< - EventType extends keyof T, - T extends EventMap, ->( - emitter: EventEmitter, - eventType: EventType, - listener: T[EventType], -): void { - useEffect(() => { - emitter.on(eventType, listener); - return (): void => { - emitter.off(eventType, listener); - }; - }, [emitter, eventType, listener]); -} diff --git a/src/useLocalStorage.ts b/src/useLocalStorage.ts index 318c691f..c2ce9e78 100644 --- a/src/useLocalStorage.ts +++ b/src/useLocalStorage.ts @@ -50,9 +50,6 @@ export const useLocalStorage = ( ]; }; -export const getLocalStorageItem = (key: string): LocalStorageItem => - localStorage.getItem(key); - export const setLocalStorageItem = (key: string, value: string): void => { localStorage.setItem(key, value); localStorageBus.emit(key, value); diff --git a/src/usePrevious.ts b/src/usePrevious.ts deleted file mode 100644 index b298c10e..00000000 --- a/src/usePrevious.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { useRef } from "react"; - -/** - * React hook that returns the value given on the previous render. - */ -export function usePrevious(value: T): T | undefined { - const ref = useRef(); - const previous = ref.current; - ref.current = value; - return previous; -} diff --git a/src/utils/array.ts b/src/utils/array.ts deleted file mode 100644 index 0bb0270d..00000000 --- a/src/utils/array.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/** - * Gets the index of the last element in the array to satsify the given - * predicate. - */ -// TODO: remove this once TypeScript recognizes the existence of -// Array.prototype.findLastIndex -export function findLastIndex( - array: T[], - predicate: (item: T, index: number) => boolean, -): number | null { - for (let i = array.length - 1; i >= 0; i--) { - if (predicate(array[i], i)) return i; - } - - return null; -} - -/** - * Counts the number of elements in an array that satsify the given predicate. - */ -export const count = ( - array: T[], - predicate: (item: T, index: number) => boolean, -): number => - array.reduce( - (acc, item, index) => (predicate(item, index) ? acc + 1 : acc), - 0, - ); diff --git a/src/utils/matrix.ts b/src/utils/matrix.ts index a992b5ce..6955072b 100644 --- a/src/utils/matrix.ts +++ b/src/utils/matrix.ts @@ -246,38 +246,6 @@ export function sanitiseRoomNameInput(input: string): string { return input; } -/** - * XXX: What is this trying to do? It looks like it's getting the localpart from - * a room alias, but why is it splitting on hyphens and then putting spaces in?? - * @param roomId - * @returns - */ -export function roomNameFromRoomId(roomId: string): string { - return roomId - .match(/([^:]+):.*$/)![1] - .substring(1) - .split("-") - .map((part) => - part.length > 0 ? part.charAt(0).toUpperCase() + part.slice(1) : part, - ) - .join(" ") - .toLowerCase(); -} - -export function isLocalRoomId(roomId: string, client: MatrixClient): boolean { - if (!roomId) { - return false; - } - - const parts = roomId.match(/[^:]+:(.*)$/)!; - - if (parts.length < 2) { - return false; - } - - return parts[1] === client.getDomain(); -} - interface CreateRoomResult { roomId: string; alias?: string; diff --git a/src/widget.ts b/src/widget.ts index c376791c..8ce55ace 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -31,21 +31,6 @@ export enum ElementWidgetActions { HangupCall = "im.vector.hangup", TileLayout = "io.element.tile_layout", SpotlightLayout = "io.element.spotlight_layout", - - // Element Call -> host requesting to start a screenshare - // (ie. expects a ScreenshareStart once the user has picked a source) - // Element Call -> host requesting to start a screenshare - // (ie. expects a ScreenshareStart once the user has picked a source) - // replies with { pending } where pending is true if the host has asked - // the user to choose a window and false if not (ie. if the host isn't - // running within Electron) - ScreenshareRequest = "io.element.screenshare_request", - // host -> Element Call telling EC to start screen sharing with - // the given source - ScreenshareStart = "io.element.screenshare_start", - // host -> Element Call telling EC to stop screen sharing, or that - // the user cancelled when selecting a source after a ScreenshareRequest - ScreenshareStop = "io.element.screenshare_stop", // This can be sent as from or to widget // fromWidget: updates the client about the current device mute state // toWidget: the client requests a specific device mute configuration @@ -68,10 +53,6 @@ export interface JoinCallData { videoInput: string | null; } -export interface ScreenshareStartData { - desktopCapturerSourceId: string; -} - export interface WidgetHelpers { api: WidgetApi; lazyActions: LazyEventEmitter; @@ -101,8 +82,6 @@ export const widget = ((): WidgetHelpers | null => { ElementWidgetActions.HangupCall, ElementWidgetActions.TileLayout, ElementWidgetActions.SpotlightLayout, - ElementWidgetActions.ScreenshareStart, - ElementWidgetActions.ScreenshareStop, ElementWidgetActions.DeviceMute, ].forEach((action) => { api.on(`action:${action}`, (ev: CustomEvent) => { diff --git a/vitest.config.js b/vitest.config.js index b90f74c2..43b407b7 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -1,5 +1,5 @@ import { defineConfig, mergeConfig } from "vitest/config"; -import viteConfig from "./vite.config"; +import viteConfig from "./vite.config.js"; export default defineConfig((configEnv) => mergeConfig( diff --git a/yarn.lock b/yarn.lock index ba73d1b0..9c97f098 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1108,7 +1108,7 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.20.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== @@ -1135,7 +1135,7 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" -"@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2": +"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.4.4": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.2.tgz#55fb231f7dc958cd69ea141a4c2997e819646125" integrity sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q== @@ -1968,7 +1968,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@1.2.8", "@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -1988,43 +1988,13 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== -"@opentelemetry/context-zone-peer-dep@1.25.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.25.1.tgz#e7c6400bad864c34342d4429e64d58e416f26ac0" - integrity sha512-UxSY9K90xOg2eI7qZStx0HV6DZT6tcRX+IiAWTvROi6h9Td2c2vlQhBZ9F1JH7kINmNCZN1f1//O9rSioPEMlg== - -"@opentelemetry/context-zone@^1.9.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/context-zone/-/context-zone-1.25.1.tgz#b984d5ed71f346ceb708b34835db7d16af78b583" - integrity sha512-kHbMs95mKNJPpfd1LE1/IRxUw5D1fyTOM+0R1yDOOzffs9ZZsQqgQ1Q7q0bWZ/kVLWjL43fiALe+rPtQvRShdg== - dependencies: - "@opentelemetry/context-zone-peer-dep" "1.25.1" - zone.js "^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0" - -"@opentelemetry/core@1.19.0", "@opentelemetry/core@^1.8.0": - version "1.19.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.19.0.tgz#6563bb65465bf232d8435553b9a122d9351c0fbb" - integrity sha512-w42AukJh3TP8R0IZZOVJVM/kMWu8g+lm4LzT70WtuKqhwq7KVhcDzZZuZinWZa6TtQCl7Smt2wolEYzpHabOgw== - dependencies: - "@opentelemetry/semantic-conventions" "1.19.0" - -"@opentelemetry/core@1.25.1": +"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.1.tgz#ff667d939d128adfc7c793edae2f6bca177f829d" integrity sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ== dependencies: "@opentelemetry/semantic-conventions" "1.25.1" -"@opentelemetry/exporter-jaeger@^1.9.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-jaeger/-/exporter-jaeger-1.25.1.tgz#0f4d4c233b0b5875533beaa990dec51e7bd043e3" - integrity sha512-6/HwzrwUx0fpkFXrouF0IJp+hpN8xkx8RqEk+BZfeoMAHydpyigyYsKyAtAZRwfJe45WWJbJUqoK8aBjiC9iLQ== - dependencies: - "@opentelemetry/core" "1.25.1" - "@opentelemetry/sdk-trace-base" "1.25.1" - "@opentelemetry/semantic-conventions" "1.25.1" - jaeger-client "^3.15.0" - "@opentelemetry/exporter-trace-otlp-http@^0.52.0": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.52.1.tgz#99549e05f581050d0df2c1c684d1a819c480ebc6" @@ -2036,38 +2006,6 @@ "@opentelemetry/resources" "1.25.1" "@opentelemetry/sdk-trace-base" "1.25.1" -"@opentelemetry/instrumentation-document-load@^0.39.0": - version "0.39.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-document-load/-/instrumentation-document-load-0.39.0.tgz#d20b85b2d39fd29cc42cb7e5e12298b228556eb2" - integrity sha512-M8QTHM1fFoJvQ1EYaxAF7V5RJhG4c+o4gWHLSFQl6dvQJuGiSdhM3azenRFcTe88Sn6AmVYRGiUjlac9GSVQ2g== - dependencies: - "@opentelemetry/core" "^1.8.0" - "@opentelemetry/instrumentation" "^0.52.0" - "@opentelemetry/sdk-trace-base" "^1.0.0" - "@opentelemetry/sdk-trace-web" "^1.15.0" - "@opentelemetry/semantic-conventions" "^1.22.0" - -"@opentelemetry/instrumentation-user-interaction@^0.39.0": - version "0.39.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-user-interaction/-/instrumentation-user-interaction-0.39.0.tgz#318f273fd7d52a98d3ee36318842331513e78a69" - integrity sha512-hO/D1g8/P1fo5lEEHpxHHnxXDRfysjBZdFGwR6oSIoZWAQW1EasxZRe2mYDnxc37vEZsFFxTWXayH+XMKOo/sw== - dependencies: - "@opentelemetry/core" "^1.8.0" - "@opentelemetry/instrumentation" "^0.52.0" - "@opentelemetry/sdk-trace-web" "^1.8.0" - -"@opentelemetry/instrumentation@^0.52.0": - version "0.52.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.1.tgz#2e7e46a38bd7afbf03cf688c862b0b43418b7f48" - integrity sha512-uXJbYU/5/MBHjMp1FqrILLRuiJCs3Ofk0MeRDk8g1S1gD47U8X3JnSwcMO1rtRo1x1a7zKaQHaoYu49p/4eSKw== - dependencies: - "@opentelemetry/api-logs" "0.52.1" - "@types/shimmer" "^1.0.2" - import-in-the-middle "^1.8.1" - require-in-the-middle "^7.1.1" - semver "^7.5.2" - shimmer "^1.2.1" - "@opentelemetry/otlp-exporter-base@0.52.1": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.52.1.tgz#657d9b27c55bd42ab6a8bb181006b57f9c84b91d" @@ -2089,15 +2027,7 @@ "@opentelemetry/sdk-trace-base" "1.25.1" protobufjs "^7.3.0" -"@opentelemetry/resources@1.19.0": - version "1.19.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.19.0.tgz#2df9e0e8623cd390569243e2c9c15d7cce063c2f" - integrity sha512-RgxvKuuMOf7nctOeOvpDjt2BpZvZGr9Y0vf7eGtY5XYZPkh2p7e2qub1S2IArdBMf9kEbz0SfycqCviOu9isqg== - dependencies: - "@opentelemetry/core" "1.19.0" - "@opentelemetry/semantic-conventions" "1.19.0" - -"@opentelemetry/resources@1.25.1": +"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.25.1.tgz#bb9a674af25a1a6c30840b755bc69da2796fefbb" integrity sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ== @@ -2123,7 +2053,7 @@ "@opentelemetry/resources" "1.25.1" lodash.merge "^4.6.2" -"@opentelemetry/sdk-trace-base@1.25.1": +"@opentelemetry/sdk-trace-base@1.25.1", "@opentelemetry/sdk-trace-base@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz#cbc1e60af255655d2020aa14cde17b37bd13df37" integrity sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw== @@ -2132,16 +2062,7 @@ "@opentelemetry/resources" "1.25.1" "@opentelemetry/semantic-conventions" "1.25.1" -"@opentelemetry/sdk-trace-base@^1.0.0": - version "1.19.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.19.0.tgz#87e629e7080945d955d53c2c12352915f5797cd3" - integrity sha512-+IRvUm+huJn2KqfFW3yW/cjvRwJ8Q7FzYHoUNx5Fr0Lws0LxjMJG1uVB8HDpLwm7mg5XXH2M5MF+0jj5cM8BpQ== - dependencies: - "@opentelemetry/core" "1.19.0" - "@opentelemetry/resources" "1.19.0" - "@opentelemetry/semantic-conventions" "1.19.0" - -"@opentelemetry/sdk-trace-web@^1.15.0", "@opentelemetry/sdk-trace-web@^1.8.0", "@opentelemetry/sdk-trace-web@^1.9.1": +"@opentelemetry/sdk-trace-web@^1.9.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.25.1.tgz#65b48c0b68636e6905b02969d04b860e234a4391" integrity sha512-SS6JaSkHngcBCNdWGthzcvaKGRnDw2AeP57HyTEileLToJ7WLMeV+064iRlVyoT4+e77MRp2T2dDSrmaUyxoNg== @@ -2150,20 +2071,15 @@ "@opentelemetry/sdk-trace-base" "1.25.1" "@opentelemetry/semantic-conventions" "1.25.1" -"@opentelemetry/semantic-conventions@1.19.0": - version "1.19.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.19.0.tgz#0c17f80b45de1c8778dfdf17acb1e9d4c4aa4ba8" - integrity sha512-14jRpC8f5c0gPSwoZ7SbEJni1PqI+AhAE8m1bMz6v+RPM4OlP1PT2UHBJj5Qh/ALLPjhVU/aZUK3YyjTUqqQVg== - "@opentelemetry/semantic-conventions@1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz#0deecb386197c5e9c2c28f2f89f51fb8ae9f145e" integrity sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ== -"@opentelemetry/semantic-conventions@^1.22.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.0.tgz#f074db930a7feb4d64103a9a576c5fbad046fcac" - integrity sha512-yL0jI6Ltuz8R+Opj7jClGrul6pOoYrdfVmzQS4SITXRPH7I5IRZbrwe/6/v8v4WYMa6MYZG480S1+uc/IGfqsA== +"@opentelemetry/semantic-conventions@^1.25.1": + version "1.26.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.26.0.tgz#42da14476529ca86d0af4c11f58910f242a0a232" + integrity sha512-U9PJlOswJPSgQVPI+XEuNLElyFWkb0hAiMg+DExD9V0St03X2lPHGMdxMY/LrVmoukuIpXJ12oyrOtEZ4uXFkw== "@pkgjs/parseargs@^0.11.0": version "0.11.0" @@ -2746,7 +2662,7 @@ "@react-spring/shared" "~9.7.4" "@react-spring/types" "~9.7.4" -"@react-spring/rafz@^9.7.3", "@react-spring/rafz@~9.7.4": +"@react-spring/rafz@~9.7.4": version "9.7.4" resolved "https://registry.yarnpkg.com/@react-spring/rafz/-/rafz-9.7.4.tgz#d53aa45a8cb116b81b27ba29e0cc15470ccfd449" integrity sha512-mqDI6rW0Ca8IdryOMiXRhMtVGiEGLIO89vIOyFQXRIwwIMX30HLya24g9z4olDvFyeDW3+kibiKwtZnA4xhldA== @@ -3107,15 +3023,6 @@ "@sentry/types" "8.26.0" "@sentry/utils" "8.26.0" -"@sentry-internal/tracing@7.114.0": - version "7.114.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.114.0.tgz#bdcd364f511e2de45db6e3004faf5685ca2e0f86" - integrity sha512-dOuvfJN7G+3YqLlUY4HIjyWHaRP8vbOgF+OsE5w2l7ZEn1rMAaUbPntAR8AF9GBA6j2zWNoSo8e7GjbJxVofSg== - dependencies: - "@sentry/core" "7.114.0" - "@sentry/types" "7.114.0" - "@sentry/utils" "7.114.0" - "@sentry/babel-plugin-component-annotate@2.22.2": version "2.22.2" resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.22.2.tgz#f4a1ddea4bcac06584a6cec9a43ec088cbb6caaf" @@ -3202,14 +3109,6 @@ "@sentry/cli-win32-i686" "2.33.1" "@sentry/cli-win32-x64" "2.33.1" -"@sentry/core@7.114.0": - version "7.114.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.114.0.tgz#3efe86b92a5379c44dfd0fd4685266b1a30fa898" - integrity sha512-YnanVlmulkjgZiVZ9BfY9k6I082n+C+LbZo52MTvx3FY6RE5iyiPMpaOh67oXEZRWcYQEGm+bKruRxLVP6RlbA== - dependencies: - "@sentry/types" "7.114.0" - "@sentry/utils" "7.114.0" - "@sentry/core@8.26.0": version "8.26.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.26.0.tgz#0673a9e2c5b699cf1bde1ed073a345cc393577da" @@ -3229,30 +3128,11 @@ "@sentry/utils" "8.26.0" hoist-non-react-statics "^3.3.2" -"@sentry/tracing@^7.0.0": - version "7.114.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.114.0.tgz#32a3438b0f2d02fb7b7359fe7712c5a349a2a329" - integrity sha512-eldEYGADReZ4jWdN5u35yxLUSTOvjsiZAYd4KBEpf+Ii65n7g/kYOKAjNl7tHbrEG1EsMW4nDPWStUMk1w+tfg== - dependencies: - "@sentry-internal/tracing" "7.114.0" - -"@sentry/types@7.114.0": - version "7.114.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.114.0.tgz#ab8009d5f6df23b7342121083bed34ee2452e856" - integrity sha512-tsqkkyL3eJtptmPtT0m9W/bPLkU7ILY7nvwpi1hahA5jrM7ppoU0IMaQWAgTD+U3rzFH40IdXNBFb8Gnqcva4w== - "@sentry/types@8.26.0": version "8.26.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.26.0.tgz#c999fdd9e52587570f723d2370244bad8f79b571" integrity sha512-zKmh6SWsJh630rpt7a9vP4Cm4m1C2gDTUqUiH565CajCL/4cePpNWYrNwalSqsOSL7B9OrczA1+n6a6XvND+ng== -"@sentry/utils@7.114.0": - version "7.114.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.114.0.tgz#59d30a79f4acff3c9268de0b345f0bcbc6335112" - integrity sha512-319N90McVpupQ6vws4+tfCy/03AdtsU0MurIE4+W5cubHME08HtiEWlfacvAxX+yuKFhvdsO4K4BB/dj54ideg== - dependencies: - "@sentry/types" "7.114.0" - "@sentry/utils@8.26.0": version "8.26.0" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.26.0.tgz#c6629f0f2bc8cbc4fddd124770e9063b4e2d1c65" @@ -3268,6 +3148,15 @@ "@sentry/bundler-plugin-core" "2.22.2" unplugin "1.0.1" +"@snyk/github-codeowners@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@snyk/github-codeowners/-/github-codeowners-1.1.0.tgz#45b99732c3c38b5f5b47e43d2b0c9db67a6d2bcc" + integrity sha512-lGFf08pbkEac0NYgVf4hdANpAgApRjNByLXB+WBip3qj1iendOIyAwP2GKkKbQMNVy2r1xxDf0ssfWscoiC+Vw== + dependencies: + commander "^4.1.1" + ignore "^5.1.8" + p-map "^4.0.0" + "@svgr/babel-plugin-add-jsx-attribute@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz#4001f5d5dd87fa13303e36ee106e3ff3a7eb8b22" @@ -3422,28 +3311,11 @@ dependencies: "@babel/types" "^7.20.7" -"@types/caseless@*": - version "0.12.5" - resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.5.tgz#db9468cb1b1b5a925b8f34822f1669df0c5472f5" - integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== - "@types/content-type@^1.1.5": version "1.1.8" resolved "https://registry.yarnpkg.com/@types/content-type/-/content-type-1.1.8.tgz#319644d07ee6b4bfc734483008393b89b99f0219" integrity sha512-1tBhmVUeso3+ahfyaKluXe38p+94lovUZdoVfQ3OnJo9uJC42JT7CBoN3k9HYhAae+GwiBYmHu+N9FZhOG+2Pg== -"@types/dom-screen-wake-lock@^1.0.1": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@types/dom-screen-wake-lock/-/dom-screen-wake-lock-1.0.3.tgz#c3588a5f6f40fae957f9ce5be9bc4927a61bb9a0" - integrity sha512-3Iten7X3Zgwvk6kh6/NRdwN7WbZ760YgFCsF5AxDifltUQzW1RaW+WRmcVtgwFzLjaNu64H+0MPJ13yRa8g3Dw== - -"@types/dompurify@^3.0.2": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-3.0.5.tgz#02069a2fcb89a163bacf1a788f73cb415dd75cb7" - integrity sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg== - dependencies: - "@types/trusted-types" "*" - "@types/estree@1.0.5", "@types/estree@^1.0.0": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" @@ -3464,11 +3336,6 @@ resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64" integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA== -"@types/json-schema@^7.0.9": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -3484,7 +3351,7 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== -"@types/node@*", "@types/node@>=13.7.0": +"@types/node@>=13.7.0": version "22.1.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.1.0.tgz#6d6adc648b5e03f0e83c78dc788c2b037d0ad94b" integrity sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw== @@ -3540,16 +3407,6 @@ "@types/prop-types" "*" csstype "^3.0.2" -"@types/request@^2.48.8": - version "2.48.12" - resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.12.tgz#0f590f615a10f87da18e9790ac94c29ec4c5ef30" - integrity sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw== - dependencies: - "@types/caseless" "*" - "@types/node" "*" - "@types/tough-cookie" "*" - form-data "^2.5.0" - "@types/retry@0.12.0": version "0.12.0" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" @@ -3560,26 +3417,11 @@ resolved "https://registry.yarnpkg.com/@types/sdp-transform/-/sdp-transform-2.4.9.tgz#26ef39f487a6909b0512f580b80920a366b27f52" integrity sha512-bVr+/OoZZy7wrHlNcEAAa6PAgKA4BoXPYVN2EijMC5WnGgQ4ZEuixmKnVs2roiAvr7RhIFVH17QD27cojgIZCg== -"@types/shimmer@^1.0.2": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/shimmer/-/shimmer-1.0.5.tgz#491d8984d4510e550bfeb02d518791d7f59d2b88" - integrity sha512-9Hp0ObzwwO57DpLFF0InUjUm/II8GmKAvzbefxQTihCb7KI6yc9yzf0nLc4mVdby5N4DRCgQM2wCup9KTieeww== - "@types/symlink-or-copy@^1.2.0": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/symlink-or-copy/-/symlink-or-copy-1.2.2.tgz#51b1c00b516a5774ada5d611e65eb123f988ef8d" integrity sha512-MQ1AnmTLOncwEf9IVU+B2e4Hchrku5N67NkgcAHW0p3sdzPe0FNMANxEm6OJUzPniEQGkeT3OROLlCwZJLWFZA== -"@types/tough-cookie@*": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" - integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== - -"@types/trusted-types@*": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.6.tgz#d12451beaeb9c3838f12024580dc500b7e88b0ad" - integrity sha512-HYtNooPvUY9WAVRBr4u+4Qa9fYD1ze2IUlAD3HoA6oehn1taGwBx3Oa52U4mTslTS+GAExKpaFu39Y5xUEwfjg== - "@types/uuid@10": version "10.0.0" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-10.0.0.tgz#e9c07fe50da0f53dc24970cca94d619ff03f6f6d" @@ -3789,11 +3631,6 @@ loupe "^3.1.1" tinyrainbow "^1.2.0" -acorn-import-attributes@^1.9.5: - version "1.9.5" - resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" - integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== - acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -3804,7 +3641,7 @@ acorn@^8.8.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.9.0: version "8.11.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== @@ -3823,19 +3660,13 @@ agent-base@^7.0.2, agent-base@^7.1.0: dependencies: debug "^4.3.4" -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: - ajv "^8.0.0" - -ajv-keywords@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" - integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== - dependencies: - fast-deep-equal "^3.1.3" + clean-stack "^2.0.0" + indent-string "^4.0.0" ajv@^6.12.4: version "6.12.6" @@ -3847,26 +3678,11 @@ ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.9.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - another-json@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/another-json/-/another-json-0.2.0.tgz#b5f4019c973b6dd5c6506a2d93469cb6d32aeedc" integrity sha512-/Ndrl68UQLhnCdsAzEXLMFuOR546o2qbYRqCglaNHbjXrwG1ayTcdwr3zkSGOGtGXDyR5X9nCFfnyG2AFJIsqg== -ansi-color@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansi-color/-/ansi-color-0.2.1.tgz#3e75c037475217544ed763a8db5709fa9ae5bf9a" - integrity sha512-bF6xLaZBLpOQzgYUtYEhJx090nPSZk1BQ/q2oyBK9aMMcJHzx9uXGCjI2Y+LebsN4Jwoykr0V9whbPiogdyHoQ== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -4090,14 +3906,6 @@ b4a@^1.6.4: resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.6.tgz#a4cc349a3851987c3c4ac2d7785c18744f6da9ba" integrity sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg== -babel-loader@^9.0.0: - version "9.1.3" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.1.3.tgz#3d0e01b4e69760cc694ee306fe16d358aa1c6f9a" - integrity sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw== - dependencies: - find-cache-dir "^4.0.0" - schema-utils "^4.0.0" - babel-plugin-polyfill-corejs2@^0.4.10: version "0.4.11" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz#30320dfe3ffe1a336c15afdcdafd6fd615b25e33" @@ -4248,16 +4056,6 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -bufrw@^1.2.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/bufrw/-/bufrw-1.4.0.tgz#58a294ca0bd9ebc880be83001d749706fc996499" - integrity sha512-sWm8iPbqvL9+5SiYxXH73UOkyEbGQg7kyHQmReF89WJHQJw2eV4P/yZ0E+b71cczJ4pPobVhXxgQcmfSTgGHxQ== - dependencies: - ansi-color "^0.2.1" - error "^7.0.0" - hexer "^1.5.0" - xtend "^4.0.0" - builtin-modules@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" @@ -4376,11 +4174,6 @@ ci-info@^4.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2" integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg== -cjs-module-lexer@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" - integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== - classnames@^2.3.1, classnames@^2.3.2: version "2.5.1" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b" @@ -4393,11 +4186,21 @@ clean-regexp@^1.0.0: dependencies: escape-string-regexp "^1.0.5" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + clone-stats@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" integrity sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag== +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + clone@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" @@ -4442,23 +4245,23 @@ colors@1.4.0: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6, combined-stream@^1.0.8: +combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" +commander@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commander@~12.1.0: version "12.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== -common-path-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" - integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -4697,6 +4500,13 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -4812,6 +4622,15 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +easy-table@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/easy-table/-/easy-table-1.2.0.tgz#ba9225d7138fee307bfd4f0b5bc3c04bdc7c54eb" + integrity sha512-OFzVOv03YpvtcWGe5AayU5G2hgybsg3iqA6drU8UaoZyB9jLGMTrz9+asnLp/E+6qPh88yEI1gvyZFZ41dmgww== + dependencies: + ansi-regex "^5.0.1" + optionalDependencies: + wcwidth "^1.0.1" + electron-to-chromium@^1.5.4: version "1.5.13" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" @@ -4835,6 +4654,14 @@ encoding-sniffer@^0.2.0: iconv-lite "^0.6.3" whatwg-encoding "^3.1.1" +enhanced-resolve@^5.17.1: + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + ensure-posix-path@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ensure-posix-path/-/ensure-posix-path-1.1.1.tgz#3c62bdb19fa4681544289edb2b382adc029179ce" @@ -4857,21 +4684,6 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -error@7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" - integrity sha512-UtVv4l5MhijsYUxPJo4390gzfZvAnTHreNnDjnTZaKIiZ/SemXxAhBkYSKtWa5RtBXbLP8tMgn/n0RUa/H7jXw== - dependencies: - string-template "~0.2.1" - xtend "~4.0.0" - -error@^7.0.0: - version "7.2.1" - resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" - integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== - dependencies: - string-template "~0.2.1" - es-abstract@^1.17.5, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: version "1.23.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" @@ -5341,7 +5153,7 @@ fast-fifo@^1.3.2: resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== -fast-glob@^3.2.9: +fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -5388,14 +5200,6 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-4.0.0.tgz#a30ee0448f81a3990708f6453633c733e2f6eec2" - integrity sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg== - dependencies: - common-path-prefix "^3.0.0" - pkg-dir "^7.0.0" - find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -5412,14 +5216,6 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" - integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== - dependencies: - locate-path "^7.1.0" - path-exists "^5.0.0" - flat-cache@^3.0.4: version "3.2.0" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" @@ -5449,15 +5245,6 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" -form-data@^2.5.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -5701,7 +5488,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.8: +graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.8: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -5779,17 +5566,7 @@ heimdalljs@^0.2.6: dependencies: rsvp "~3.2.1" -hexer@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/hexer/-/hexer-1.5.0.tgz#b86ce808598e8a9d1892c571f3cedd86fc9f0653" - integrity sha512-dyrPC8KzBzUJ19QTIo1gXNqIISRXQ0NwteW6OeQHRN4ZuZeHkdODfj0zHBdOlHbRY8GqbqK57C9oWSvQZizFsg== - dependencies: - ansi-color "^0.2.1" - minimist "^1.1.0" - process "^0.10.0" - xtend "^4.0.0" - -history@^4.9.0: +history@^4.0.0, history@^4.9.0: version "4.10.1" resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== @@ -5927,6 +5704,11 @@ ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +ignore@^5.1.8: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + ignore@^5.2.0, ignore@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" @@ -5945,16 +5727,6 @@ import-fresh@^3.2.1, import-fresh@^3.3.0: parent-module "^1.0.0" resolve-from "^4.0.0" -import-in-the-middle@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.8.1.tgz#8b51c2cc631b64e53e958d7048d2d9463ce628f8" - integrity sha512-yhRwoHtiLGvmSozNOALgjRPFI6uYsds60EoMqqnXyyv+JOIW/BrrLejuTGBt+bq0T5tLzOHrN0T7xYTm4Qt/ng== - dependencies: - acorn "^8.8.2" - acorn-import-attributes "^1.9.5" - cjs-module-lexer "^1.2.2" - module-details-from-path "^1.0.3" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -6314,16 +6086,10 @@ jackspeak@^3.1.2: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" -jaeger-client@^3.15.0: - version "3.19.0" - resolved "https://registry.yarnpkg.com/jaeger-client/-/jaeger-client-3.19.0.tgz#9b5bd818ebd24e818616ee0f5cffe1722a53ae6e" - integrity sha512-M0c7cKHmdyEUtjemnJyx/y9uX16XHocL46yQvyqDlPdvAcwPDbHrIbKjQdBqtiE4apQ/9dmr+ZLJYYPGnurgpw== - dependencies: - node-int64 "^0.4.0" - opentracing "^0.14.4" - thriftrw "^3.5.0" - uuid "^8.3.2" - xorshift "^1.1.1" +jiti@^1.21.6: + version "1.21.6" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" + integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" @@ -6394,11 +6160,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -6454,6 +6215,28 @@ keyv@^4.5.3: dependencies: json-buffer "3.0.1" +knip@^5.27.2: + version "5.27.2" + resolved "https://registry.yarnpkg.com/knip/-/knip-5.27.2.tgz#8a5a569a5baac0ab2e06dbd5454f07608ccb1952" + integrity sha512-Mya1XEDq1oygibQf0uocQd02Fil8RtvNVhcFAcxypjcc6zakT7wsJtS0xvuwEitilfI0tiFC9PghmJQ3DMKuTg== + dependencies: + "@nodelib/fs.walk" "1.2.8" + "@snyk/github-codeowners" "1.1.0" + easy-table "1.2.0" + enhanced-resolve "^5.17.1" + fast-glob "^3.3.2" + jiti "^1.21.6" + js-yaml "^4.1.0" + minimist "^1.2.8" + picocolors "^1.0.0" + picomatch "^4.0.1" + pretty-ms "^9.0.0" + smol-toml "^1.1.4" + strip-json-comments "5.0.1" + summary "2.1.0" + zod "^3.22.4" + zod-validation-error "^3.0.3" + language-subtag-registry@^0.3.20: version "0.3.23" resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz#23529e04d9e3b74679d70142df3fd2eb6ec572e7" @@ -6517,13 +6300,6 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -locate-path@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" - integrity sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== - dependencies: - p-locate "^6.0.0" - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -6539,7 +6315,7 @@ lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -loglevel@1.9.1, loglevel@^1.8.0: +loglevel@1.9.1, loglevel@^1.8.0, loglevel@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.9.1.tgz#d63976ac9bcd03c7c873116d41c2a85bafff1be7" integrity sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg== @@ -6549,11 +6325,6 @@ loglevel@^1.7.1: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.1.tgz#5c621f83d5b48c54ae93b6156353f555963377b4" integrity sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg== -long@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/long/-/long-2.4.0.tgz#9fa180bb1d9500cdc29c4156766a1995e1f4524f" - integrity sha512-ijUtjmO/n2A5PaosNG9ZGDsQ3vxJg7ZW8vsY8Kp0f2yIZWhSJvjmegV7t+9RPQKxKrvj8yKGehhS+po14hPLGQ== - long@^5.0.0: version "5.2.3" resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" @@ -6592,13 +6363,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - lz-string@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" @@ -6736,7 +6500,7 @@ minimatch@^9.0.4: dependencies: brace-expansion "^2.0.1" -minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -6756,11 +6520,6 @@ mktemp@~0.4.0: resolved "https://registry.yarnpkg.com/mktemp/-/mktemp-0.4.0.tgz#6d0515611c8a8c84e484aa2000129b98e981ff0b" integrity sha512-IXnMcJ6ZyTuhRmJSjzvHSRhlVPiN9Jwc6e59V0bEJ0ba6OBeX2L0E+mRN1QseeOF4mM+F1Rit6Nh7o+rl2Yn/A== -module-details-from-path@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/module-details-from-path/-/module-details-from-path-1.0.3.tgz#114c949673e2a8a35e9d35788527aa37b679da2b" - integrity sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -6801,11 +6560,6 @@ node-fetch@^2.6.12, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - node-releases@^2.0.18: version "2.0.18" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" @@ -6977,11 +6731,6 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" -opentracing@^0.14.4: - version "0.14.7" - resolved "https://registry.yarnpkg.com/opentracing/-/opentracing-0.14.7.tgz#25d472bd0296dc0b64d7b94cbc995219031428f5" - integrity sha512-vz9iS7MJ5+Bp1URw8Khvdyw1H/hGvzHWlKQ7eRrQojSCDL1/SrWfrY9QebLw97n2deyRtzHRC3MkQfVNUCo91Q== - optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -7008,13 +6757,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-limit@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" - integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== - dependencies: - yocto-queue "^1.0.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -7029,12 +6771,12 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-locate@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" - integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== dependencies: - p-limit "^4.0.0" + aggregate-error "^3.0.0" p-retry@4: version "4.6.2" @@ -7076,6 +6818,11 @@ parse-json@^5.0.0, parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse-ms@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-4.0.0.tgz#c0c058edd47c2a590151a718990533fd62803df4" + integrity sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw== + parse5-htmlparser2-tree-adapter@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" @@ -7103,11 +6850,6 @@ path-exists@^4.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== -path-exists@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" - integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== - path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -7173,12 +6915,10 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pkg-dir@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-7.0.0.tgz#8f0c08d6df4476756c5ff29b3282d0bab7517d11" - integrity sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA== - dependencies: - find-up "^6.3.0" +picomatch@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab" + integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg== pluralize@^8.0.0: version "8.0.0" @@ -7502,16 +7242,18 @@ pretty-format@^27.0.2: ansi-styles "^5.0.0" react-is "^17.0.1" +pretty-ms@^9.0.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-9.1.0.tgz#0ad44de6086454f48a168e5abb3c26f8db1b3253" + integrity sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw== + dependencies: + parse-ms "^4.0.0" + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/process/-/process-0.10.1.tgz#842457cc51cfed72dc775afeeafb8c6034372725" - integrity sha512-dyIett8dgGIZ/TXKUzeYExt7WA6ldDzys9vTDU/cCA9L17Ypme+KzS+NjQCjpn9xsvi/shbMC+yP/BcFMBz0NA== - progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -7854,20 +7596,6 @@ replace-ext@^2.0.0: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-2.0.0.tgz#9471c213d22e1bcc26717cd6e50881d88f812b06" integrity sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug== -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -require-in-the-middle@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/require-in-the-middle/-/require-in-the-middle-7.2.0.tgz#b539de8f00955444dc8aed95e17c69b0a4f10fcf" - integrity sha512-3TLx5TGyAY6AOqLBoXmHkNql0HIf2RGbuMgCDT2WO/uGVAPJs6h7Kl+bN6TIZGd9bWhWPwnDnTHGtW8Iu77sdw== - dependencies: - debug "^4.1.1" - module-details-from-path "^1.0.3" - resolve "^1.22.1" - requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -7890,7 +7618,7 @@ resolve-pathname@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.22.1, resolve@^1.22.4: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -8048,16 +7776,6 @@ scheduler@^0.23.2: dependencies: loose-envify "^1.1.0" -schema-utils@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" - integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.9.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.1.0" - sdp-transform@^2.14.1: version "2.14.2" resolved "https://registry.yarnpkg.com/sdp-transform/-/sdp-transform-2.14.2.tgz#d2cee6a1f7abe44e6332ac6cbb94e8600f32d813" @@ -8078,13 +7796,6 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.5.2: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" - semver@^7.5.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" @@ -8138,11 +7849,6 @@ shelljs@0.8.4: interpret "^1.0.0" rechoir "^0.6.2" -shimmer@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -8168,6 +7874,11 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +smol-toml@^1.1.4: + version "1.3.0" + resolved "https://registry.yarnpkg.com/smol-toml/-/smol-toml-1.3.0.tgz#5200e251fffadbb72570c84e9776d2a3eca48143" + integrity sha512-tWpi2TsODPScmi48b/OQZGi2lgUmBCHy6SZrhi/FdnnHiU1GwebbCfuQuxsC3nHaLwtYeJGPrDZDIeodDOc4pA== + snake-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" @@ -8254,11 +7965,6 @@ streamx@^2.12.0, streamx@^2.12.5, streamx@^2.13.2, streamx@^2.14.0: optionalDependencies: bare-events "^2.2.0" -string-template@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" - integrity sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw== - "string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -8400,11 +8106,21 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" +strip-json-comments@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-5.0.1.tgz#0d8b7d01b23848ed7dbdf4baaaa31a8250d8cfa0" + integrity sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw== + strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +summary@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/summary/-/summary-2.1.0.tgz#be8a49a0aa34eb6ceea56042cae88f8add4b0885" + integrity sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw== + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -8444,6 +8160,11 @@ tabbable@^6.0.0: resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97" integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew== +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + teex@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/teex/-/teex-1.0.1.tgz#b8fa7245ef8e8effa8078281946c85ab780a0b12" @@ -8472,15 +8193,6 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -thriftrw@^3.5.0: - version "3.11.4" - resolved "https://registry.yarnpkg.com/thriftrw/-/thriftrw-3.11.4.tgz#84c990ee89e926631c0b475909ada44ee9249870" - integrity sha512-UcuBd3eanB3T10nXWRRMwfwoaC6VMk7qe3/5YIWP2Jtw+EbHqJ0p1/K3x8ixiR5dozKSSfcg1W+0e33G1Di3XA== - dependencies: - bufrw "^1.2.1" - error "7.0.2" - long "^2.4.0" - through2@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -8509,11 +8221,6 @@ tinypool@^1.0.0: resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-1.0.1.tgz#c64233c4fac4304e109a64340178760116dbe1fe" integrity sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA== -tinyqueue@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/tinyqueue/-/tinyqueue-3.0.0.tgz#101ea761ccc81f979e29200929e78f1556e3661e" - integrity sha512-gRa9gwYU3ECmQYv3lslts5hxuIa90veaEcxDYuu3QGOIAEM2mOZkVHp48ANJuu1CURtRdHKUBY5Lm1tHV+sD4g== - tinyrainbow@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/tinyrainbow/-/tinyrainbow-1.2.0.tgz#5c57d2fc0fb3d1afd78465c33ca885d04f02abb5" @@ -8834,11 +8541,6 @@ uuid@10: resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ== -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -9000,6 +8702,13 @@ walk-sync@^2.2.0: matcher-collection "^2.0.0" minimatch "^3.0.4" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + web-vitals@^4.0.1: version "4.2.3" resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-4.2.3.tgz#270c4baecfbc6ec6fc15da1989e465e5f9b94fb7" @@ -9163,12 +8872,7 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xorshift@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/xorshift/-/xorshift-1.2.0.tgz#30a4cdd8e9f8d09d959ed2a88c42a09c660e8148" - integrity sha512-iYgNnGyeeJ4t6U11NpA/QiKy+PXn5Aa3Azg5qkwIFz1tBLllQrjjsk9yzD7IAK0naNU4JxdeDgqW9ov4u/hc4g== - -xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: +xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -9178,22 +8882,17 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -yocto-queue@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" - integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== +zod-validation-error@^3.0.3: + version "3.3.1" + resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-3.3.1.tgz#86adc781129d1a7fed3c3e567e8dbe7c4a15eaa4" + integrity sha512-uFzCZz7FQis256dqw4AhPQgD6f3pzNca/Zh62RNELavlumQB3nDIUFbF5JQfFLcMbO1s02Q7Xg/gpcOBlEnYZA== -"zone.js@^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0": - version "0.14.7" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.14.7.tgz#4a9a70599109663b1921165663bbac521995eef3" - integrity sha512-0w6DGkX2BPuiK/NLf+4A8FLE43QwBfuqz2dVgi/40Rj1WmqUskCqj329O/pwrqFJLG5X8wkeG2RhIAro441xtg== +zod@^3.22.4: + version "3.23.8" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" + integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== From 0db51d9dfdf9c8921c8764571f60131a44f6465c Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 28 Aug 2024 08:44:39 -0400 Subject: [PATCH 08/33] Replace remaining React ARIA components with Compound components (#2576) * Fix issues detected by Knip Including cleaning up some unused code and dependencies, using a React hook that we unintentionally stopped using, and also adding some previously undeclared dependencies. * Replace remaining React ARIA components with Compound components * fix button position * disable scrollbars to resolve overlapping button --------- Co-authored-by: Timo --- package.json | 22 -- public/locales/en-GB/app.json | 7 +- renovate.json | 26 +- src/App.tsx | 33 +- src/Banner.module.css | 22 -- src/FullScreenView.tsx | 24 +- src/ListBox.module.css | 49 --- src/ListBox.tsx | 116 ------ src/Menu.module.css | 73 ---- src/Menu.tsx | 102 ----- src/Modal.module.css | 4 + src/Modal.tsx | 12 +- src/Tooltip.module.css | 30 -- src/Tooltip.tsx | 118 ------ src/UserMenu.module.css | 8 + src/UserMenu.tsx | 57 ++- src/auth/LoginPage.tsx | 2 +- src/auth/RegisterPage.tsx | 2 +- src/auth/useRecaptcha.ts | 3 +- src/button/Button.module.css | 238 +----------- src/button/Button.tsx | 207 +++------- src/button/CopyButton.tsx | 69 ---- src/button/Link.tsx | 61 +++ src/button/LinkButton.tsx | 59 +-- src/button/index.ts | 1 - src/home/CallList.module.css | 15 +- src/home/CallList.tsx | 11 +- src/home/JoinExistingCallModal.tsx | 11 +- src/home/RegisteredView.tsx | 2 +- src/home/UnauthenticatedView.tsx | 3 +- src/icons/ArrowDown.svg | 10 - src/icons/Audio.svg | 5 - src/icons/Copy.svg | 3 - src/icons/Developer.svg | 3 - src/icons/Edit.svg | 4 - src/icons/Feedback.svg | 3 - src/icons/Overflow.svg | 5 - src/icons/Video.svg | 4 - src/index.css | 149 +++---- src/input/AvatarInputField.module.css | 53 +-- src/input/AvatarInputField.tsx | 186 +++++---- src/input/SelectInput.module.css | 60 --- src/input/SelectInput.tsx | 80 ---- src/popover/Popover.module.css | 24 -- src/popover/Popover.tsx | 62 --- src/popover/PopoverMenu.module.css | 20 - src/popover/PopoverMenu.tsx | 98 ----- src/room/CallEndedView.module.css | 3 +- src/room/CallEndedView.tsx | 25 +- src/room/InCallView.tsx | 20 +- src/room/LayoutToggle.module.css | 7 +- src/room/LobbyView.tsx | 15 +- src/room/RageshakeRequestModal.tsx | 4 +- src/room/RoomAuthView.tsx | 2 +- src/settings/FeedbackSettingsTab.tsx | 5 +- src/settings/RageshakeButton.tsx | 6 +- src/settings/SettingsModal.tsx | 321 +++++++--------- src/tabs/Tabs.module.css | 62 +-- src/tabs/Tabs.tsx | 103 ++--- src/tile/MediaView.module.css | 4 +- src/tile/SpotlightTile.module.css | 5 +- yarn.lock | 533 +------------------------- 62 files changed, 668 insertions(+), 2603 deletions(-) delete mode 100644 src/Banner.module.css delete mode 100644 src/ListBox.module.css delete mode 100644 src/ListBox.tsx delete mode 100644 src/Menu.module.css delete mode 100644 src/Menu.tsx delete mode 100644 src/Tooltip.module.css delete mode 100644 src/Tooltip.tsx delete mode 100644 src/button/CopyButton.tsx create mode 100644 src/button/Link.tsx delete mode 100644 src/icons/ArrowDown.svg delete mode 100644 src/icons/Audio.svg delete mode 100644 src/icons/Copy.svg delete mode 100644 src/icons/Developer.svg delete mode 100644 src/icons/Edit.svg delete mode 100644 src/icons/Feedback.svg delete mode 100644 src/icons/Overflow.svg delete mode 100644 src/icons/Video.svg delete mode 100644 src/input/SelectInput.module.css delete mode 100644 src/input/SelectInput.tsx delete mode 100644 src/popover/Popover.module.css delete mode 100644 src/popover/Popover.tsx delete mode 100644 src/popover/PopoverMenu.module.css delete mode 100644 src/popover/PopoverMenu.tsx diff --git a/package.json b/package.json index fa2e6bb8..c8a2fc75 100644 --- a/package.json +++ b/package.json @@ -37,29 +37,7 @@ "@radix-ui/react-dialog": "^1.0.4", "@radix-ui/react-slider": "^1.1.2", "@radix-ui/react-visually-hidden": "^1.0.3", - "@react-aria/button": "^3.3.4", - "@react-aria/focus": "^3.5.0", - "@react-aria/interactions": "^3.9.1", - "@react-aria/listbox": "^3.5.1", - "@react-aria/menu": "^3.3.0", - "@react-aria/overlays": "^3.7.3", - "@react-aria/select": "^3.6.0", - "@react-aria/tabs": "^3.1.0", - "@react-aria/tooltip": "^3.1.3", - "@react-aria/utils": "^3.10.0", "@react-spring/web": "^9.4.4", - "@react-stately/collections": "^3.3.4", - "@react-stately/list": "^3.5.1", - "@react-stately/menu": "^3.3.1", - "@react-stately/select": "^3.1.3", - "@react-stately/tabs": "^3.1.1", - "@react-stately/tooltip": "^3.0.5", - "@react-stately/tree": "^3.2.0", - "@react-types/dialog": "^3.5.5", - "@react-types/menu": "^3.6.1", - "@react-types/overlays": "^3.6.1", - "@react-types/shared": "^3.13.1", - "@react-types/tabs": "^3.1.1", "@sentry/react": "^8.0.0", "@sentry/vite-plugin": "^2.0.0", "@testing-library/dom": "^10.1.0", diff --git a/public/locales/en-GB/app.json b/public/locales/en-GB/app.json index acecfc4f..0dd66420 100644 --- a/public/locales/en-GB/app.json +++ b/public/locales/en-GB/app.json @@ -4,8 +4,8 @@ }, "action": { "close": "Close", - "copy": "Copy", "copy_link": "Copy link", + "edit": "Edit", "go": "Go", "invite": "Invite", "no": "No", @@ -13,7 +13,8 @@ "remove": "Remove", "sign_in": "Sign in", "sign_out": "Sign out", - "submit": "Submit" + "submit": "Submit", + "upload_file": "Upload file" }, "analytics_notice": "By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy and our <5>Cookie Policy.", "app_selection_modal": { @@ -43,7 +44,6 @@ "avatar": "Avatar", "back": "Back", "camera": "Camera", - "copied": "Copied!", "display_name": "Display name", "encrypted": "Encrypted", "error": "Error", @@ -130,7 +130,6 @@ "room_auth_view_eula_caption": "By clicking \"Join call now\", you agree to our <2>End User Licensing Agreement (EULA)", "room_auth_view_join_button": "Join call now", "screenshare_button_label": "Share screen", - "select_input_unset_button": "Select an option", "settings": { "developer_settings_label": "Developer Settings", "developer_settings_label_description": "Expose developer settings in the settings window.", diff --git a/renovate.json b/renovate.json index 009174f4..91fc985a 100644 --- a/renovate.json +++ b/renovate.json @@ -44,29 +44,5 @@ "prHeader": "Please review modals on mobile for visual regressions." } ], - "semanticCommits": "disabled", - "ignoreDeps": [ - "@react-aria/button", - "@react-aria/focus", - "@react-aria/interactions", - "@react-aria/listbox", - "@react-aria/menu", - "@react-aria/overlays", - "@react-aria/select", - "@react-aria/tabs", - "@react-aria/tooltip", - "@react-aria/utils", - "@react-stately/collections", - "@react-stately/list", - "@react-stately/menu", - "@react-stately/select", - "@react-stately/tabs", - "@react-stately/tooltip", - "@react-stately/tree", - "@react-types/dialog", - "@react-types/menu", - "@react-types/overlays", - "@react-types/shared", - "@react-types/tabs" - ] + "semanticCommits": "disabled" } diff --git a/src/App.tsx b/src/App.tsx index bcd049b1..fc12af39 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,7 +22,6 @@ import { useLocation, } from "react-router-dom"; import * as Sentry from "@sentry/react"; -import { OverlayProvider } from "@react-aria/overlays"; import { History } from "history"; import { TooltipProvider } from "@vector-im/compound-web"; @@ -92,23 +91,21 @@ export const App: FC = ({ history }) => { - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/src/Banner.module.css b/src/Banner.module.css deleted file mode 100644 index cd1b5272..00000000 --- a/src/Banner.module.css +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2023 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.banner { - flex: 1; - border-radius: 8px; - padding: 16px; - background-color: var(--cpd-color-bg-subtle-primary); -} diff --git a/src/FullScreenView.tsx b/src/FullScreenView.tsx index 4df2f39e..c6d8248f 100644 --- a/src/FullScreenView.tsx +++ b/src/FullScreenView.tsx @@ -20,9 +20,10 @@ import classNames from "classnames"; import { Trans, useTranslation } from "react-i18next"; import * as Sentry from "@sentry/react"; import { logger } from "matrix-js-sdk/src/logger"; +import { Button } from "@vector-im/compound-web"; import { Header, HeaderLogo, LeftNav, RightNav } from "./Header"; -import { LinkButton, Button } from "./button"; +import { LinkButton } from "./button"; import styles from "./FullScreenView.module.css"; import { TranslatedError } from "./TranslatedError"; import { Config } from "./config/Config"; @@ -81,21 +82,11 @@ export const ErrorView: FC = ({ error }) => { {!confineToRoom && (location.pathname === "/" ? ( - ) : ( - + {t("return_home_button")} ))} @@ -122,12 +113,7 @@ export const CrashView: FC = () => { )} - diff --git a/src/ListBox.module.css b/src/ListBox.module.css deleted file mode 100644 index 70da2cd8..00000000 --- a/src/ListBox.module.css +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.listBox { - margin: 0; - padding: 0; - max-height: 150px; - overflow-y: auto; - list-style: none; - background-color: transparent; - border: 1px solid var(--cpd-color-border-interactive-secondary); - background-color: var(--cpd-color-bg-canvas-default); - border-radius: 8px; -} - -.option { - display: flex; - align-items: center; - justify-content: space-between; - background-color: transparent; - color: var(--cpd-color-text-primary); - padding: 8px 16px; - outline: none; - cursor: pointer; - font-size: var(--font-size-body); - min-height: 32px; -} - -.option.focused { - background-color: rgba(111, 120, 130, 0.2); -} - -.option.disabled { - color: var(--cpd-color-text-disabled); - background-color: var(--stopgap-bgColor3); -} diff --git a/src/ListBox.tsx b/src/ListBox.tsx deleted file mode 100644 index ea6e686b..00000000 --- a/src/ListBox.tsx +++ /dev/null @@ -1,116 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { - MutableRefObject, - PointerEvent, - ReactNode, - useCallback, - useRef, -} from "react"; -import { useListBox, useOption, AriaListBoxOptions } from "@react-aria/listbox"; -import { ListState } from "@react-stately/list"; -import { Node } from "@react-types/shared"; -import classNames from "classnames"; - -import styles from "./ListBox.module.css"; - -interface ListBoxProps extends AriaListBoxOptions { - optionClassName: string; - state: ListState; - className?: string; - listBoxRef?: MutableRefObject; -} - -export function ListBox({ - state, - optionClassName, - className, - listBoxRef, - ...rest -}: ListBoxProps): ReactNode { - const ref = useRef(null); - - const listRef = listBoxRef ?? ref; - - const { listBoxProps } = useListBox(rest, state, listRef); - - return ( -
    - {[...state.collection].map((item) => ( -
- ); -} - -interface OptionProps { - className: string; - state: ListState; - item: Node; -} - -function Option({ item, state, className }: OptionProps): ReactNode { - const ref = useRef(null); - const { optionProps, isSelected, isFocused, isDisabled } = useOption( - { key: item.key }, - state, - ref, - ); - - // Hack: remove the onPointerUp event handler and re-wire it to - // onClick. Chrome Android triggers a click event after the onpointerup - // event which leaks through to elements underneath the z-indexed select - // popover. preventDefault / stopPropagation don't have any effect, even - // adding just a dummy onClick handler still doesn't work, but it's fine - // if we handle just onClick. - // https://github.com/vector-im/element-call/issues/762 - const origPointerUp = optionProps.onPointerUp; - delete optionProps.onPointerUp; - optionProps.onClick = useCallback( - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - (e) => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - origPointerUp(e as unknown as PointerEvent); - }, - [origPointerUp], - ); - - return ( -
  • - {item.rendered} -
  • - ); -} diff --git a/src/Menu.module.css b/src/Menu.module.css deleted file mode 100644 index bca12a8f..00000000 --- a/src/Menu.module.css +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.menu { - width: 100%; - padding: 0; - margin: 0; - list-style: none; -} - -.menuItem { - cursor: pointer; - height: 48px; - display: flex; - align-items: center; - padding: 0 12px; - color: var(--cpd-color-text-primary); - font-size: var(--font-size-body); - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - -.menuItem > * { - margin: 0 10px 0 0; -} - -.menuItem > :last-child { - margin-right: 0; -} - -.menuItem.focused, -.menuItem:hover { - background-color: var(--cpd-color-bg-action-secondary-hovered); -} - -.menuItem:active { - background-color: var(--cpd-color-bg-action-secondary-pressed); -} - -.menuItem.focused:first-child, -.menuItem:hover:first-child { - border-top-left-radius: 8px; - border-top-right-radius: 8px; -} - -.menuItem.focused:last-child, -.menuItem:hover:last-child { - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; -} - -.checkIcon { - position: absolute; - right: 16px; -} - -.checkIcon * { - stroke: var(--cpd-color-text-primary); -} diff --git a/src/Menu.tsx b/src/Menu.tsx deleted file mode 100644 index cfc0bc53..00000000 --- a/src/Menu.tsx +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { Key, ReactNode, useRef, useState } from "react"; -import { AriaMenuOptions, useMenu, useMenuItem } from "@react-aria/menu"; -import { TreeState, useTreeState } from "@react-stately/tree"; -import { mergeProps } from "@react-aria/utils"; -import { useFocus } from "@react-aria/interactions"; -import classNames from "classnames"; -import { Node } from "@react-types/shared"; - -import styles from "./Menu.module.css"; - -interface MenuProps extends AriaMenuOptions { - className?: string; - onClose: () => void; - onAction: (value: Key) => void; - label?: string; -} - -export function Menu({ - className, - onAction, - onClose, - label, - ...rest -}: MenuProps): ReactNode { - const state = useTreeState({ ...rest, selectionMode: "none" }); - const menuRef = useRef(null); - const { menuProps } = useMenu(rest, state, menuRef); - - return ( -
      - {[...state.collection].map((item) => ( - - ))} -
    - ); -} - -interface MenuItemProps { - item: Node; - state: TreeState; - onAction: (value: Key) => void; - onClose: () => void; -} - -function MenuItem({ - item, - state, - onAction, - onClose, -}: MenuItemProps): ReactNode { - const ref = useRef(null); - const { menuItemProps } = useMenuItem( - { - key: item.key, - onAction, - onClose, - }, - state, - ref, - ); - - const [isFocused, setFocused] = useState(false); - const { focusProps } = useFocus({ onFocusChange: setFocused }); - - return ( -
  • - {item.rendered} -
  • - ); -} diff --git a/src/Modal.module.css b/src/Modal.module.css index d6af51df..e59fe438 100644 --- a/src/Modal.module.css +++ b/src/Modal.module.css @@ -134,6 +134,10 @@ body[data-platform="ios"] .drawer { padding-block: var(--cpd-space-9x) var(--cpd-space-10x); } +.modal.tabbed .body { + padding-block-start: 0; +} + .handle { content: ""; position: absolute; diff --git a/src/Modal.tsx b/src/Modal.tsx index 4328dad2..e2d0ba14 100644 --- a/src/Modal.tsx +++ b/src/Modal.tsx @@ -15,7 +15,6 @@ limitations under the License. */ import { FC, ReactNode, useCallback } from "react"; -import { AriaDialogProps } from "@react-types/dialog"; import { useTranslation } from "react-i18next"; import { Root as DialogRoot, @@ -35,8 +34,7 @@ import styles from "./Modal.module.css"; import overlayStyles from "./Overlay.module.css"; import { useMediaQuery } from "./useMediaQuery"; -// TODO: Support tabs -export interface Props extends AriaDialogProps { +export interface Props { title: string; children: ReactNode; className?: string; @@ -52,6 +50,11 @@ export interface Props extends AriaDialogProps { * will be non-dismissable. */ onDismiss?: () => void; + /** + * Whether the modal content has tabs. + */ + // TODO: Better tabs support + tabbed?: boolean; } /** @@ -64,6 +67,7 @@ export const Modal: FC = ({ className, open, onDismiss, + tabbed, ...rest }) => { const { t } = useTranslation(); @@ -92,6 +96,7 @@ export const Modal: FC = ({ overlayStyles.overlay, styles.modal, styles.drawer, + { [styles.tabbed]: tabbed }, )} {...rest} > @@ -123,6 +128,7 @@ export const Modal: FC = ({ overlayStyles.animate, styles.modal, styles.dialog, + { [styles.tabbed]: tabbed }, )} >
    diff --git a/src/Tooltip.module.css b/src/Tooltip.module.css deleted file mode 100644 index 07219f75..00000000 --- a/src/Tooltip.module.css +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.tooltip { - background-color: var(--cpd-color-bg-subtle-secondary); - flex-direction: row; - justify-content: center; - align-items: center; - padding: 10px; - color: var(--cpd-color-text-primary); - border-radius: 8px; - max-width: 135px; - width: max-content; - font-size: var(--font-size-caption); - font-weight: 500; - text-align: center; -} diff --git a/src/Tooltip.tsx b/src/Tooltip.tsx deleted file mode 100644 index adaa18b3..00000000 --- a/src/Tooltip.tsx +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { - ForwardedRef, - forwardRef, - ReactElement, - ReactNode, - useRef, -} from "react"; -import { - TooltipTriggerState, - useTooltipTriggerState, -} from "@react-stately/tooltip"; -import { FocusableProvider } from "@react-aria/focus"; -import { useTooltipTrigger, useTooltip } from "@react-aria/tooltip"; -import { mergeProps, useObjectRef } from "@react-aria/utils"; -import classNames from "classnames"; -import { OverlayContainer, useOverlayPosition } from "@react-aria/overlays"; -import { Placement } from "@react-types/overlays"; - -import styles from "./Tooltip.module.css"; - -interface TooltipProps { - className?: string; - state: TooltipTriggerState; - children: ReactNode; -} - -const Tooltip = forwardRef( - ( - { state, className, children, ...rest }: TooltipProps, - ref: ForwardedRef, - ) => { - const { tooltipProps } = useTooltip(rest, state); - - return ( -
    - {children} -
    - ); - }, -); - -Tooltip.displayName = "Tooltip"; - -interface TooltipTriggerProps { - children: ReactElement; - placement?: Placement; - delay?: number; - tooltip: () => string; -} - -export const TooltipTrigger = forwardRef( - ( - { children, placement, tooltip, ...rest }: TooltipTriggerProps, - ref: ForwardedRef, - ) => { - const tooltipTriggerProps = { delay: 250, ...rest }; - const tooltipState = useTooltipTriggerState(tooltipTriggerProps); - const triggerRef = useObjectRef(ref); - const overlayRef = useRef(null); - const { triggerProps, tooltipProps } = useTooltipTrigger( - tooltipTriggerProps, - tooltipState, - triggerRef, - ); - - const { overlayProps } = useOverlayPosition({ - placement: placement || "top", - targetRef: triggerRef, - overlayRef, - isOpen: tooltipState.isOpen, - offset: 12, - }); - - return ( - - ( - children.props, - rest, - )} - /> - {tooltipState.isOpen && ( - - - {tooltip()} - - - )} - - ); - }, -); - -TooltipTrigger.displayName = "TooltipTrigger"; diff --git a/src/UserMenu.module.css b/src/UserMenu.module.css index 575b71b9..d4e06037 100644 --- a/src/UserMenu.module.css +++ b/src/UserMenu.module.css @@ -21,6 +21,14 @@ limitations under the License. flex-shrink: 0; } +.userButton { + appearance: none; + background: none; + border: none; + margin: 0; + cursor: pointer; +} + .userButton svg * { fill: var(--cpd-color-icon-primary); } diff --git a/src/UserMenu.tsx b/src/UserMenu.tsx index 7cab4575..55ccc2c0 100644 --- a/src/UserMenu.tsx +++ b/src/UserMenu.tsx @@ -14,21 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { FC, ReactNode, useCallback, useMemo } from "react"; -import { Item } from "@react-stately/collections"; +import { FC, useMemo, useState } from "react"; import { useLocation } from "react-router-dom"; import { useTranslation } from "react-i18next"; +import { Menu, MenuItem } from "@vector-im/compound-web"; -import { Button, LinkButton } from "./button"; -import { PopoverMenuTrigger } from "./popover/PopoverMenu"; -import { Menu } from "./Menu"; -import { TooltipTrigger } from "./Tooltip"; +import { LinkButton } from "./button"; import { Avatar, Size } from "./Avatar"; import UserIcon from "./icons/User.svg?react"; import SettingsIcon from "./icons/Settings.svg?react"; import LoginIcon from "./icons/Login.svg?react"; import LogoutIcon from "./icons/Logout.svg?react"; -import { Body } from "./typography/Typography"; import styles from "./UserMenu.module.css"; interface Props { @@ -91,7 +87,7 @@ export const UserMenu: FC = ({ return arr; }, [isAuthenticated, isPasswordlessUser, displayName, preventNavigation, t]); - const tooltip = useCallback(() => t("common.profile"), [t]); + const [open, setOpen] = useState(false); if (!isAuthenticated) { return ( @@ -102,10 +98,15 @@ export const UserMenu: FC = ({ } return ( - - - - - { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (props: any): ReactNode => ( - - {items.map(({ key, icon: Icon, label, dataTestid }) => ( - - - {label} - - ))} - - ) + } - + > + {items.map(({ key, icon: Icon, label, dataTestid }) => ( + onAction(key)} + /> + ))} + ); }; diff --git a/src/auth/LoginPage.tsx b/src/auth/LoginPage.tsx index 167d30b2..5db36781 100644 --- a/src/auth/LoginPage.tsx +++ b/src/auth/LoginPage.tsx @@ -17,11 +17,11 @@ limitations under the License. import { FC, FormEvent, useCallback, useRef, useState } from "react"; import { useHistory, useLocation, Link } from "react-router-dom"; import { Trans, useTranslation } from "react-i18next"; +import { Button } from "@vector-im/compound-web"; import Logo from "../icons/LogoLarge.svg?react"; import { useClient } from "../ClientContext"; import { FieldRow, InputField, ErrorMessage } from "../input/Input"; -import { Button } from "../button"; import styles from "./LoginPage.module.css"; import { useInteractiveLogin } from "./useInteractiveLogin"; import { usePageTitle } from "../usePageTitle"; diff --git a/src/auth/RegisterPage.tsx b/src/auth/RegisterPage.tsx index 467530d0..fc3d5b00 100644 --- a/src/auth/RegisterPage.tsx +++ b/src/auth/RegisterPage.tsx @@ -28,9 +28,9 @@ import { captureException } from "@sentry/react"; import { sleep } from "matrix-js-sdk/src/utils"; import { Trans, useTranslation } from "react-i18next"; import { logger } from "matrix-js-sdk/src/logger"; +import { Button } from "@vector-im/compound-web"; import { FieldRow, InputField, ErrorMessage } from "../input/Input"; -import { Button } from "../button"; import { useClientLegacy } from "../ClientContext"; import { useInteractiveRegistration } from "./useInteractiveRegistration"; import styles from "./LoginPage.module.css"; diff --git a/src/auth/useRecaptcha.ts b/src/auth/useRecaptcha.ts index 03a9fe49..00daa18c 100644 --- a/src/auth/useRecaptcha.ts +++ b/src/auth/useRecaptcha.ts @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -// import "@types/grecaptcha"; + import { useEffect, useCallback, useRef, useState } from "react"; import { randomString } from "matrix-js-sdk/src/randomstring"; import { useTranslation } from "react-i18next"; @@ -23,7 +23,6 @@ import { translatedError } from "../TranslatedError"; declare global { interface Window { mxOnRecaptchaLoaded: () => void; - // grecaptcha: any; } } diff --git a/src/button/Button.module.css b/src/button/Button.module.css index 7f915648..516725be 100644 --- a/src/button/Button.module.css +++ b/src/button/Button.module.css @@ -1,5 +1,5 @@ /* -Copyright 2021 New Vector Ltd +Copyright 2024 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,240 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -.button, -.toolbarButton, -.toolbarButtonSecondary, -.iconButton, -.iconCopyButton, -.secondary, -.secondaryHangup, -.copyButton, -.dropdownButton { - position: relative; - display: flex; - justify-content: center; - align-items: center; - background-color: transparent; - padding: 0; - border: none; - cursor: pointer; - text-decoration: none; - box-sizing: border-box; -} - -.secondary, -.secondaryHangup, -.button, -.copyButton { - padding: 8px 20px; - border-radius: 8px; - font-size: var(--font-size-body); - font-weight: 600; -} - -.button { - color: var(--stopgap-color-on-solid-accent); - background-color: var(--cpd-color-text-action-accent); -} - -.button:focus-visible, -.toolbarButton:focus-visible, -.toolbarButtonSecondary:focus-visible, -.iconButton:focus-visible, -.iconCopyButton:focus-visible, -.secondary:focus-visible, -.secondaryHangup:focus-visible, -.copyButton:focus-visible { - outline: auto; -} - -.toolbarButton:disabled { - background-color: var(--cpd-color-bg-action-primary-disabled); - box-shadow: none; -} - -.toolbarButton, -.toolbarButtonSecondary { - width: 50px; - height: 50px; - border-radius: 50px; - background-color: var(--cpd-color-bg-canvas-default); - color: var(--cpd-color-icon-primary); - border: 1px solid var(--cpd-color-gray-400); - box-shadow: var(--subtle-drop-shadow); -} - -.toolbarButton.on, -.toolbarButton.off { - background-color: var(--cpd-color-bg-action-primary-rest); - color: var(--cpd-color-icon-on-solid-primary); -} - -.toolbarButtonSecondary.on { - background-color: var(--cpd-color-text-success-primary); -} - -.toolbarButton:active, -.toolbarButtonSecondary:active { - background-color: var(--cpd-color-bg-subtle-primary); - border: none; - box-shadow: none; -} - -.toolbarButton.on:active, -.toolbarButton.off:active { - background-color: var(--cpd-color-bg-action-primary-pressed); -} - -.iconButton:not(.stroke) svg * { - fill: var(--cpd-color-bg-action-primary-rest); -} - -.iconButton:not(.stroke):tertiary svg * { - fill: var(--cpd-color-icon-accent-tertiary); -} - -.iconButton.on:not(.stroke) svg * { - fill: var(--cpd-color-icon-accent-tertiary); -} - -.iconButton.on.stroke svg * { - stroke: var(--cpd-color-icon-accent-tertiary); -} - -.hangupButton { - background-color: var(--cpd-color-bg-critical-primary); - border-color: var(--cpd-color-border-critical-subtle); +.endCall > svg { color: var(--stopgap-color-on-solid-accent); } - -.hangupButton:active { - background-color: var(--cpd-color-bg-critical-pressed); -} - -.secondary, -.copyButton { - color: var(--cpd-color-text-action-accent); - border: 2px solid var(--cpd-color-text-action-accent); - background-color: transparent; -} - -.secondaryHangup { - color: var(--cpd-color-text-critical-primary); - border: 2px solid var(--cpd-color-border-critical-primary); - background-color: transparent; -} - -.copyButton.secondaryCopy { - color: var(--cpd-color-text-primary); - border-color: var(--cpd-color-border-interactive-primary); -} - -.copyButton { - width: 100%; - height: 40px; - transition: - border-color 250ms, - background-color 250ms; -} - -.copyButton span { - font-weight: 600; - font-size: var(--font-size-body); - margin-right: 10px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -.copyButton svg { - flex-shrink: 0; -} - -.copyButton:not(.on) svg * { - fill: var(--cpd-color-icon-accent-tertiary); -} - -.copyButton.on { - border-color: transparent; - background-color: var(--cpd-color-text-action-accent); - color: white; -} - -.copyButton.on svg * { - stroke: white; -} - -.copyButton.secondaryCopy:not(.on) svg * { - fill: var(--cpd-color-bg-action-primary-rest); -} - -.iconCopyButton svg * { - fill: var(--cpd-color-icon-secondary); -} - -.iconCopyButton.on svg *, -.iconCopyButton.on:hover svg * { - fill: transparent; - stroke: var(--cpd-color-text-action-accent); -} - -.dropdownButton { - color: var(--cpd-color-text-primary); - padding: 2px 8px; - border-radius: 8px; -} - -.dropdownButton:active, -.dropdownButton.on { - background-color: var(--cpd-color-bg-action-secondary-pressed); -} - -.dropdownButton svg { - margin-left: 8px; -} - -.dropdownButton svg * { - fill: var(--cpd-color-icon-primary); -} - -.lg { - height: 40px; -} - -.linkButton { - background-color: transparent; - border: none; - color: var(--cpd-color-text-action-accent); - cursor: pointer; -} - -@media (hover: hover) { - .toolbarButton:hover, - .toolbarButtonSecondary:hover { - background-color: var(--cpd-color-bg-subtle-primary); - border: none; - box-shadow: none; - } - - .toolbarButton.on:hover, - .toolbarButton.off:hover { - background-color: var(--cpd-color-bg-action-primary-hovered); - } - - .iconButton:not(.stroke):hover svg * { - fill: var(--cpd-color-icon-accent-tertiary); - } - - .hangupButton:hover { - background-color: var(--cpd-color-bg-critical-hovered); - } - - .iconCopyButton:hover svg * { - fill: var(--cpd-color-icon-accent-tertiary); - } - - .dropdownButton:hover { - background-color: var(--cpd-color-bg-action-secondary-hovered); - } -} diff --git a/src/button/Button.tsx b/src/button/Button.tsx index 10c4dfd0..db578494 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -1,5 +1,5 @@ /* -Copyright 2022 - 2023 New Vector Ltd +Copyright 2022-2024 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,13 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import { FC, forwardRef } from "react"; -import { PressEvent } from "@react-types/shared"; +import { ComponentPropsWithoutRef, FC } from "react"; import classNames from "classnames"; -import { useButton } from "@react-aria/button"; -import { mergeProps, useObjectRef } from "@react-aria/utils"; import { useTranslation } from "react-i18next"; -import { Tooltip } from "@vector-im/compound-web"; +import { Button as CpdButton, Tooltip } from "@vector-im/compound-web"; import { MicOnSolidIcon, MicOffSolidIcon, @@ -28,120 +25,15 @@ import { EndCallIcon, ShareScreenSolidIcon, SettingsSolidIcon, - ChevronDownIcon, } from "@vector-im/compound-design-tokens/assets/web/icons"; import styles from "./Button.module.css"; -export type ButtonVariant = - | "default" - | "toolbar" - | "toolbarSecondary" - | "icon" - | "secondary" - | "copy" - | "secondaryCopy" - | "iconCopy" - | "secondaryHangup" - | "dropdown" - | "link"; - -export const variantToClassName = { - default: [styles.button], - toolbar: [styles.toolbarButton], - toolbarSecondary: [styles.toolbarButtonSecondary], - icon: [styles.iconButton], - secondary: [styles.secondary], - copy: [styles.copyButton], - secondaryCopy: [styles.secondaryCopy, styles.copyButton], - iconCopy: [styles.iconCopyButton], - secondaryHangup: [styles.secondaryHangup], - dropdown: [styles.dropdownButton], - link: [styles.linkButton], -}; - -export type ButtonSize = "lg"; - -export const sizeToClassName: { lg: string[] } = { - lg: [styles.lg], -}; -interface Props { - variant: ButtonVariant; - size: ButtonSize; - on: () => void; - off: () => void; - iconStyle: string; - className: string; - children: Element[]; - onPress: (e: PressEvent) => void; - onPressStart: (e: PressEvent) => void; - disabled: boolean; - // TODO: add all props for - ); - }, -); - -Button.displayName = "Button"; - -export const MicButton: FC<{ - muted: boolean; - // TODO: add all props for + ); }; -export const VideoButton: FC<{ +interface VideoButtonProps extends ComponentPropsWithoutRef<"button"> { muted: boolean; - // TODO: add all props for + ); }; -export const ScreenshareButton: FC<{ +interface ShareScreenButtonProps extends ComponentPropsWithoutRef<"button"> { enabled: boolean; - className?: string; - // TODO: add all props for + ); }; -export const HangupButton: FC<{ - className?: string; - // TODO: add all props for + ); }; -export const SettingsButton: FC<{ - className?: string; - // TODO: add all props for + ); }; diff --git a/src/button/CopyButton.tsx b/src/button/CopyButton.tsx deleted file mode 100644 index 247cd3c5..00000000 --- a/src/button/CopyButton.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { useTranslation } from "react-i18next"; -import useClipboard from "react-use-clipboard"; -import { FC } from "react"; - -import CheckIcon from "../icons/Check.svg?react"; -import CopyIcon from "../icons/Copy.svg?react"; -import { Button, ButtonVariant } from "./Button"; - -interface Props { - value: string; - children?: JSX.Element | string; - className?: string; - variant?: ButtonVariant; - copiedMessage?: string; -} - -export const CopyButton: FC = ({ - value, - children, - className, - variant, - copiedMessage, - ...rest -}) => { - const { t } = useTranslation(); - const [isCopied, setCopied] = useClipboard(value, { successDuration: 3000 }); - - return ( - - ); -}; diff --git a/src/button/Link.tsx b/src/button/Link.tsx new file mode 100644 index 00000000..686cfa83 --- /dev/null +++ b/src/button/Link.tsx @@ -0,0 +1,61 @@ +/* +Copyright 2024 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import { + ComponentPropsWithoutRef, + forwardRef, + MouseEvent, + useCallback, + useMemo, +} from "react"; +import { Link as CpdLink } from "@vector-im/compound-web"; +import { useHistory } from "react-router-dom"; +import { createPath, LocationDescriptor, Path } from "history"; + +export function useLink( + to: LocationDescriptor, +): [Path, (e: MouseEvent) => void] { + const history = useHistory(); + const path = useMemo( + () => (typeof to === "string" ? to : createPath(to)), + [to], + ); + const onClick = useCallback( + (e: MouseEvent) => { + e.preventDefault(); + history.push(to); + }, + [history, to], + ); + + return [path, onClick]; +} + +type Props = Omit< + ComponentPropsWithoutRef, + "href" | "onClick" +> & { to: LocationDescriptor }; + +/** + * A version of Compound's link component that integrates with our router setup. + */ +export const Link = forwardRef(function Link( + { to, ...props }, + ref, +) { + const [path, onClick] = useLink(to); + return ; +}); diff --git a/src/button/LinkButton.tsx b/src/button/LinkButton.tsx index eb30441c..3cff744d 100644 --- a/src/button/LinkButton.tsx +++ b/src/button/LinkButton.tsx @@ -1,5 +1,5 @@ /* -Copyright 2022 New Vector Ltd +Copyright 2024 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,45 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { FC, HTMLAttributes } from "react"; -import { Link } from "react-router-dom"; -import classNames from "classnames"; -import * as H from "history"; +import { ComponentPropsWithoutRef, forwardRef } from "react"; +import { Button } from "@vector-im/compound-web"; +import { LocationDescriptor } from "history"; -import { - variantToClassName, - sizeToClassName, - ButtonVariant, - ButtonSize, -} from "./Button"; +import { useLink } from "./Link"; -interface Props extends HTMLAttributes { - children: JSX.Element | string; - to: H.LocationDescriptor | ((location: H.Location) => H.LocationDescriptor); - size?: ButtonSize; - variant?: ButtonVariant; - className?: string; -} +type Props = Omit< + ComponentPropsWithoutRef>, + "as" | "href" +> & { to: LocationDescriptor }; -export const LinkButton: FC = ({ - children, - to, - size, - variant, - className, - ...rest -}) => { - return ( - - {children} - - ); -}; +/** + * A version of Compound's button component that acts as a link and integrates + * with our router setup. + */ +export const LinkButton = forwardRef( + function LinkButton({ to, ...props }, ref) { + const [path, onClick] = useLink(to); + return
    -
    ); }; diff --git a/src/home/JoinExistingCallModal.tsx b/src/home/JoinExistingCallModal.tsx index 85d4adde..bc60b8fb 100644 --- a/src/home/JoinExistingCallModal.tsx +++ b/src/home/JoinExistingCallModal.tsx @@ -14,19 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { PressEvent } from "@react-types/shared"; import { useTranslation } from "react-i18next"; -import { FC } from "react"; +import { FC, MouseEvent } from "react"; +import { Button } from "@vector-im/compound-web"; import { Modal } from "../Modal"; -import { Button } from "../button"; import { FieldRow } from "../input/Input"; import styles from "./JoinExistingCallModal.module.css"; interface Props { open: boolean; onDismiss: () => void; - onJoin: (e: PressEvent) => void; + onJoin: (e: MouseEvent) => void; } export const JoinExistingCallModal: FC = ({ @@ -44,8 +43,8 @@ export const JoinExistingCallModal: FC = ({ >

    {t("join_existing_call_modal.text")}

    - - + diff --git a/src/home/RegisteredView.tsx b/src/home/RegisteredView.tsx index f3b8d229..3335acd2 100644 --- a/src/home/RegisteredView.tsx +++ b/src/home/RegisteredView.tsx @@ -20,6 +20,7 @@ import { MatrixClient } from "matrix-js-sdk/src/client"; import { useTranslation } from "react-i18next"; import { Heading } from "@vector-im/compound-web"; import { logger } from "matrix-js-sdk/src/logger"; +import { Button } from "@vector-im/compound-web"; import { createRoom, @@ -32,7 +33,6 @@ import { Header, HeaderLogo, LeftNav, RightNav } from "../Header"; import commonStyles from "./common.module.css"; import styles from "./RegisteredView.module.css"; import { FieldRow, InputField, ErrorMessage } from "../input/Input"; -import { Button } from "../button"; import { CallList } from "./CallList"; import { UserMenuContainer } from "../UserMenuContainer"; import { JoinExistingCallModal } from "./JoinExistingCallModal"; diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index 82e44991..ae222737 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -18,14 +18,13 @@ import { FC, useCallback, useState, FormEventHandler } from "react"; import { useHistory } from "react-router-dom"; import { randomString } from "matrix-js-sdk/src/randomstring"; import { Trans, useTranslation } from "react-i18next"; -import { Heading } from "@vector-im/compound-web"; +import { Button, Heading } from "@vector-im/compound-web"; import { logger } from "matrix-js-sdk/src/logger"; import { useClient } from "../ClientContext"; import { Header, HeaderLogo, LeftNav, RightNav } from "../Header"; import { UserMenuContainer } from "../UserMenuContainer"; import { FieldRow, InputField, ErrorMessage } from "../input/Input"; -import { Button } from "../button"; import { createRoom, getRelativeRoomUrl, diff --git a/src/icons/ArrowDown.svg b/src/icons/ArrowDown.svg deleted file mode 100644 index 37713a28..00000000 --- a/src/icons/ArrowDown.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/icons/Audio.svg b/src/icons/Audio.svg deleted file mode 100644 index 0be0da92..00000000 --- a/src/icons/Audio.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/icons/Copy.svg b/src/icons/Copy.svg deleted file mode 100644 index e5397118..00000000 --- a/src/icons/Copy.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Developer.svg b/src/icons/Developer.svg deleted file mode 100644 index 7d1a095f..00000000 --- a/src/icons/Developer.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Edit.svg b/src/icons/Edit.svg deleted file mode 100644 index b9600405..00000000 --- a/src/icons/Edit.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/Feedback.svg b/src/icons/Feedback.svg deleted file mode 100644 index d3842163..00000000 --- a/src/icons/Feedback.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Overflow.svg b/src/icons/Overflow.svg deleted file mode 100644 index 3d7f54c1..00000000 --- a/src/icons/Overflow.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/icons/Video.svg b/src/icons/Video.svg deleted file mode 100644 index f03bca26..00000000 --- a/src/icons/Video.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/index.css b/src/index.css index 816def33..134d2a57 100644 --- a/src/index.css +++ b/src/index.css @@ -20,9 +20,12 @@ limitations under the License. Therefore we define a unicode-range to load which excludes the glyphs (to avoid having to maintain a fork of Inter). */ -@import "normalize.css/normalize.css"; -@import "@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css"; -@import "@vector-im/compound-web/dist/style.css"; +@layer normalize, compound-legacy, compound; + +@import url("normalize.css/normalize.css") layer(normalize); +@import url("@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css") +layer(compound); +@import url("@vector-im/compound-web/dist/style.css") layer(compound.components); :root { --font-scale: 1; @@ -195,87 +198,89 @@ body[data-platform="desktop"] { --cpd-font-family-sans: "Inter", sans-serif; } -h1, -h2, -h3, -h4, -h5, -h6, -p, -a { - margin-top: 0; -} +@layer compound-legacy { + h1, + h2, + h3, + h4, + h5, + h6, + p, + a { + margin-top: 0; + } -/* Headline Semi Bold */ -h1 { - font-weight: 600; - font-size: var(--font-size-headline); -} + /* Headline Semi Bold */ + h1 { + font-weight: 600; + font-size: var(--font-size-headline); + } -/* Title */ -h2 { - font-weight: 600; - font-size: var(--font-size-title); -} + /* Title */ + h2 { + font-weight: 600; + font-size: var(--font-size-title); + } -/* Subtitle */ -h3 { - font-weight: 600; - font-size: var(--font-size-subtitle); -} + /* Subtitle */ + h3 { + font-weight: 600; + font-size: var(--font-size-subtitle); + } -/* Body Semi Bold */ -h4 { - font-weight: 600; - font-size: var(--font-size-body); -} + /* Body Semi Bold */ + h4 { + font-weight: 600; + font-size: var(--font-size-body); + } -h1, -h2, -h3 { - line-height: 1.2; -} + h1, + h2, + h3 { + line-height: 1.2; + } -/* Body */ -p { - font-size: var(--font-size-body); - line-height: var(--font-size-title); -} + /* Body */ + p { + font-size: var(--font-size-body); + line-height: var(--font-size-title); + } -a { - color: var(--cpd-color-text-action-accent); - text-decoration: none; -} + a { + color: var(--cpd-color-text-action-accent); + text-decoration: none; + } -a:hover, -a:active { - opacity: 0.8; -} + a:hover, + a:active { + opacity: 0.8; + } -hr { - width: calc(100% - 24px); - border: none; - border-top: 1px solid var(--cpd-color-border-interactive-secondary); - color: var(--cpd-color-border-interactive-secondary); - overflow: visible; - text-align: center; - height: 5px; - font-weight: 600; - font-size: var(--font-size-body); - line-height: 24px; - margin: 0 12px; -} + hr { + width: calc(100% - 24px); + border: none; + border-top: 1px solid var(--cpd-color-border-interactive-secondary); + color: var(--cpd-color-border-interactive-secondary); + overflow: visible; + text-align: center; + height: 5px; + font-weight: 600; + font-size: var(--font-size-body); + line-height: 24px; + margin: 0 12px; + } -summary { - font-size: var(--font-size-body); -} + summary { + font-size: var(--font-size-body); + } -details > :not(summary) { - margin-left: var(--font-size-body); -} + details > :not(summary) { + margin-left: var(--font-size-body); + } -details[open] > summary { - margin-bottom: var(--font-size-body); + details[open] > summary { + margin-bottom: var(--font-size-body); + } } #root > [data-overlay-container] { diff --git a/src/input/AvatarInputField.module.css b/src/input/AvatarInputField.module.css index 49324d06..89227c66 100644 --- a/src/input/AvatarInputField.module.css +++ b/src/input/AvatarInputField.module.css @@ -1,5 +1,5 @@ /* -Copyright 2022 New Vector Ltd +Copyright 2022-2024 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,45 +15,30 @@ limitations under the License. */ .avatarInputField { - display: flex; - flex-direction: column; - justify-content: center; -} - -.avatarContainer { position: relative; margin-bottom: 8px; } +.avatar { + display: block; +} + .fileInput { - width: 0.1px; - height: 0.1px; - opacity: 0; - overflow: hidden; + display: none; +} + +.edit { + border-radius: var(--cpd-radius-pill-effect); + padding: 2px; + background: var(--cpd-color-bg-canvas-default); position: absolute; - z-index: -1; + inset-block-end: -2px; + inset-inline-end: -2px; } -.fileInput:focus + .fileInputButton { - outline: auto; -} - -.fileInputButton { - position: absolute; - bottom: 11px; - right: -4px; - background-color: var(--cpd-color-subtle-primary); - width: 20px; - height: 20px; - border-radius: 10px; - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; -} - -.removeButton { - color: var(--cpd-color-text-action-accent); - font-size: var(--font-size-caption); - padding: 6px 0; +.edit button { + min-block-size: 0; + block-size: var(--cpd-space-7x); + inline-size: var(--cpd-space-7x); + padding: var(--cpd-space-1x); } diff --git a/src/input/AvatarInputField.tsx b/src/input/AvatarInputField.tsx index 8e2af744..e21637f7 100644 --- a/src/input/AvatarInputField.tsx +++ b/src/input/AvatarInputField.tsx @@ -1,5 +1,5 @@ /* -Copyright 2022 New Vector Ltd +Copyright 2022-2024 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,21 +14,25 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { useObjectRef } from "@react-aria/utils"; import { AllHTMLAttributes, useEffect, useCallback, useState, - forwardRef, ChangeEvent, + useRef, + FC, } from "react"; import classNames from "classnames"; import { useTranslation } from "react-i18next"; +import { Button, Menu, MenuItem } from "@vector-im/compound-web"; +import { + DeleteIcon, + EditIcon, + ShareIcon, +} from "@vector-im/compound-design-tokens/assets/web/icons"; import { Avatar, Size } from "../Avatar"; -import { Button } from "../button"; -import EditIcon from "../icons/Edit.svg?react"; import styles from "./AvatarInputField.module.css"; interface Props extends AllHTMLAttributes { @@ -40,89 +44,115 @@ interface Props extends AllHTMLAttributes { onRemoveAvatar: () => void; } -export const AvatarInputField = forwardRef( - ( - { - id, - label, - className, - avatarUrl, - userId, - displayName, - onRemoveAvatar, - ...rest - }, - ref, - ) => { - const { t } = useTranslation(); +export const AvatarInputField: FC = ({ + id, + label, + className, + avatarUrl, + userId, + displayName, + onRemoveAvatar, + ...rest +}) => { + const { t } = useTranslation(); - const [removed, setRemoved] = useState(false); - const [objUrl, setObjUrl] = useState(undefined); + const [removed, setRemoved] = useState(false); + const [objUrl, setObjUrl] = useState(undefined); + const [menuOpen, setMenuOpen] = useState(false); - const fileInputRef = useObjectRef(ref); + const fileInputRef = useRef(null); - useEffect(() => { - const currentInput = fileInputRef.current; + useEffect(() => { + const currentInput = fileInputRef.current!; - const onChange = (e: Event): void => { - const inputEvent = e as unknown as ChangeEvent; - if (inputEvent.target.files && inputEvent.target.files.length > 0) { - setObjUrl(URL.createObjectURL(inputEvent.target.files[0])); - setRemoved(false); - } else { - setObjUrl(undefined); - } - }; + const onChange = (e: Event): void => { + const inputEvent = e as unknown as ChangeEvent; + if (inputEvent.target.files && inputEvent.target.files.length > 0) { + setObjUrl(URL.createObjectURL(inputEvent.target.files[0])); + setRemoved(false); + } else { + setObjUrl(undefined); + } + }; - currentInput.addEventListener("change", onChange); + currentInput.addEventListener("change", onChange); - return (): void => { - currentInput?.removeEventListener("change", onChange); - }; - }); + return (): void => { + currentInput?.removeEventListener("change", onChange); + }; + }); - const onPressRemoveAvatar = useCallback(() => { - setRemoved(true); - onRemoveAvatar(); - }, [onRemoveAvatar]); + const onSelectUpload = useCallback(() => { + fileInputRef.current!.click(); + }, [fileInputRef]); - return ( -
    -
    - - - {/* https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/966 */} - {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */} - -
    - {(avatarUrl || objUrl) && !removed && ( - + + + + ) : ( +
    - ); - }, -); + + ); +}; AvatarInputField.displayName = "AvatarInputField"; diff --git a/src/input/SelectInput.module.css b/src/input/SelectInput.module.css deleted file mode 100644 index 472537ff..00000000 --- a/src/input/SelectInput.module.css +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.selectInput { - position: relative; - display: inline-block; - margin-bottom: 28px; - max-width: 444px; -} - -.label { - margin-top: 0; - margin-bottom: 12px; -} - -.selectTrigger { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 12px; - background-color: var(--cpd-color-bg-canvas-default); - border-radius: 8px; - border: 1px solid var(--cpd-color-border-interactive-primary); - font-size: var(--font-size-body); - color: var(--cpd-color-text-primary); - height: 40px; - max-width: 100%; - width: 100%; -} - -.selectTrigger:focus { - outline: auto; -} - -.selectedItem { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-right: 20px; -} - -.popover { - position: absolute; - margin-top: 5px; - width: 100%; - z-index: 1; -} diff --git a/src/input/SelectInput.tsx b/src/input/SelectInput.tsx deleted file mode 100644 index b2ae3f2f..00000000 --- a/src/input/SelectInput.tsx +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { useRef } from "react"; -import { AriaSelectOptions, HiddenSelect, useSelect } from "@react-aria/select"; -import { useButton } from "@react-aria/button"; -import { useSelectState } from "@react-stately/select"; -import classNames from "classnames"; -import { useTranslation } from "react-i18next"; - -import { Popover } from "../popover/Popover"; -import { ListBox } from "../ListBox"; -import styles from "./SelectInput.module.css"; -import ArrowDownIcon from "../icons/ArrowDown.svg?react"; - -interface Props extends AriaSelectOptions { - className?: string; -} - -export function SelectInput(props: Props): JSX.Element { - const { t } = useTranslation(); - const state = useSelectState(props); - - const ref = useRef(null); - const { labelProps, triggerProps, valueProps, menuProps } = useSelect( - props, - state, - ref, - ); - - const { buttonProps } = useButton(triggerProps, ref); - - return ( -
    -

    - {props.label} -

    - - - {state.isOpen && ( - - - - )} -
    - ); -} diff --git a/src/popover/Popover.module.css b/src/popover/Popover.module.css deleted file mode 100644 index e19d133c..00000000 --- a/src/popover/Popover.module.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.popover { - display: flex; - flex-direction: column; - width: 194px; - background: var(--cpd-color-bg-subtle-secondary); - box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); - border-radius: 8px; -} diff --git a/src/popover/Popover.tsx b/src/popover/Popover.tsx deleted file mode 100644 index 65ec27a6..00000000 --- a/src/popover/Popover.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { forwardRef, HTMLAttributes } from "react"; -import { DismissButton, useOverlay } from "@react-aria/overlays"; -import { FocusScope } from "@react-aria/focus"; -import classNames from "classnames"; -import { useObjectRef } from "@react-aria/utils"; - -import styles from "./Popover.module.css"; - -interface Props extends HTMLAttributes { - isOpen: boolean; - onClose: () => void; - className?: string; - children?: JSX.Element; -} - -export const Popover = forwardRef( - ({ isOpen = true, onClose, className, children, ...rest }, ref) => { - const popoverRef = useObjectRef(ref); - - const { overlayProps } = useOverlay( - { - isOpen, - onClose, - shouldCloseOnBlur: true, - isDismissable: true, - }, - popoverRef, - ); - - return ( - -
    - {children} - -
    -
    - ); - }, -); - -Popover.displayName = "Popover"; diff --git a/src/popover/PopoverMenu.module.css b/src/popover/PopoverMenu.module.css deleted file mode 100644 index 5c874384..00000000 --- a/src/popover/PopoverMenu.module.css +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.popoverMenuTrigger { - position: relative; - display: inline-block; -} diff --git a/src/popover/PopoverMenu.tsx b/src/popover/PopoverMenu.tsx deleted file mode 100644 index 46913a05..00000000 --- a/src/popover/PopoverMenu.tsx +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2022 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import { forwardRef, useRef } from "react"; -import { useMenuTriggerState } from "@react-stately/menu"; -import { useMenuTrigger } from "@react-aria/menu"; -import { OverlayContainer, useOverlayPosition } from "@react-aria/overlays"; -import { mergeProps, useObjectRef } from "@react-aria/utils"; -import classNames from "classnames"; -import { MenuTriggerProps } from "@react-types/menu"; -import { Placement } from "@react-types/overlays"; - -import styles from "./PopoverMenu.module.css"; -import { Popover } from "./Popover"; - -interface PopoverMenuTriggerProps extends MenuTriggerProps { - children: JSX.Element; - placement: Placement; - className: string; - disableOnState: boolean; - [index: string]: unknown; -} - -export const PopoverMenuTrigger = forwardRef< - HTMLDivElement, - PopoverMenuTriggerProps ->(({ children, placement, className, disableOnState, ...rest }, ref) => { - const popoverMenuState = useMenuTriggerState(rest); - const buttonRef = useObjectRef(ref); - const { menuTriggerProps, menuProps } = useMenuTrigger( - {}, - popoverMenuState, - buttonRef, - ); - - const popoverRef = useRef(null); - - const { overlayProps } = useOverlayPosition({ - targetRef: buttonRef, - overlayRef: popoverRef, - placement: placement || "top", - offset: 5, - isOpen: popoverMenuState.isOpen, - }); - - if ( - !Array.isArray(children) || - children.length > 2 || - typeof children[1] !== "function" - ) { - throw new Error( - "PopoverMenu must have two props. The first being a button and the second being a render prop.", - ); - } - - const [popoverTrigger, popoverMenu] = children; - - return ( -
    - - {popoverMenuState.isOpen && ( - - - {popoverMenu({ - ...menuProps, - autoFocus: popoverMenuState.focusStrategy, - onClose: popoverMenuState.close, - })} - - - )} -
    - ); -}); - -PopoverMenuTrigger.displayName = "PopoverMenuTrigger"; diff --git a/src/room/CallEndedView.module.css b/src/room/CallEndedView.module.css index 12409d4e..9a43ccb4 100644 --- a/src/room/CallEndedView.module.css +++ b/src/room/CallEndedView.module.css @@ -42,9 +42,8 @@ limitations under the License. } .callEndedButton { + margin: auto; margin-top: 54px; - margin-left: 30px; - margin-right: 30px !important; } .submitButton { diff --git a/src/room/CallEndedView.tsx b/src/room/CallEndedView.tsx index 3cb928aa..99686775 100644 --- a/src/room/CallEndedView.tsx +++ b/src/room/CallEndedView.tsx @@ -18,17 +18,19 @@ import { FC, FormEventHandler, ReactNode, useCallback, useState } from "react"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { Trans, useTranslation } from "react-i18next"; import { useHistory } from "react-router-dom"; +import { Button } from "@vector-im/compound-web"; import styles from "./CallEndedView.module.css"; import feedbackStyle from "../input/FeedbackInput.module.css"; -import { Button, LinkButton } from "../button"; import { useProfile } from "../profile/useProfile"; -import { Body, Link, Headline } from "../typography/Typography"; +import { Body, Headline } from "../typography/Typography"; import { Header, HeaderLogo, LeftNav, RightNav } from "../Header"; import { PosthogAnalytics } from "../analytics/PosthogAnalytics"; import { FieldRow, InputField } from "../input/Input"; import { StarRatingInput } from "../input/StarRatingInput"; import { RageshakeButton } from "../settings/RageshakeButton"; +import { Link } from "../button/Link"; +import { LinkButton } from "../button"; interface Props { client: MatrixClient; @@ -95,12 +97,7 @@ export const CallEndedView: FC = ({ calls

    - + {t("call_ended_view.create_account_button")} @@ -136,8 +133,6 @@ export const CallEndedView: FC = ({
    @@ -169,9 +164,7 @@ export const CallEndedView: FC = ({ {!confineToRoom && ( - - {t("return_home_button")} - + {t("return_home_button")} )} @@ -198,9 +191,7 @@ export const CallEndedView: FC = ({ {!confineToRoom && ( - - {t("call_ended_view.not_now_button")} - + {t("call_ended_view.not_now_button")} )} diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 22b6be8c..ebda4271 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -19,7 +19,6 @@ import { RoomContext, useLocalParticipant, } from "@livekit/components-react"; -import { usePreventScroll } from "@react-aria/overlays"; import { ConnectionState, Room } from "livekit-client"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { @@ -44,10 +43,10 @@ import LogoMark from "../icons/LogoMark.svg?react"; import LogoType from "../icons/LogoType.svg?react"; import type { IWidgetApiRequest } from "matrix-widget-api"; import { - HangupButton, + EndCallButton, MicButton, VideoButton, - ScreenshareButton, + ShareScreenButton, SettingsButton, } from "../button"; import { Header, LeftNav, RightNav, RoomHeaderInfo } from "../Header"; @@ -175,7 +174,6 @@ export const InCallView: FC = ({ connState, onShareClick, }) => { - usePreventScroll(); useWakeLock(); useEffect(() => { @@ -492,14 +490,14 @@ export const InCallView: FC = ({ , , @@ -507,21 +505,21 @@ export const InCallView: FC = ({ if (!reducedControls) { if (canScreenshare && !hideScreensharing) { buttons.push( - , ); } - buttons.push(); + buttons.push(); } buttons.push( - = ({ const recentsButtonInFooter = useMediaQuery("(max-height: 500px)"); const recentsButton = !confineToRoom && ( - + {t("lobby.leave_button")} ); @@ -140,16 +141,16 @@ export const LobbyView: FC = ({
    - - {!confineToRoom && } + + {!confineToRoom && }
    diff --git a/src/room/RageshakeRequestModal.tsx b/src/room/RageshakeRequestModal.tsx index 5d3280e0..4dcbb81d 100644 --- a/src/room/RageshakeRequestModal.tsx +++ b/src/room/RageshakeRequestModal.tsx @@ -16,9 +16,9 @@ limitations under the License. import { FC, useEffect } from "react"; import { useTranslation } from "react-i18next"; +import { Button } from "@vector-im/compound-web"; import { Modal, Props as ModalProps } from "../Modal"; -import { Button } from "../button"; import { FieldRow, ErrorMessage } from "../input/Input"; import { useSubmitRageshake } from "../settings/submit-rageshake"; import { Body } from "../typography/Typography"; @@ -52,7 +52,7 @@ export const RageshakeRequestModal: FC = ({ {t("rageshake_request_modal.body")} + ); }; test("spacebar unmutes", async () => { - const user = userEvent.setup(); + const user = userEvent.setup({ document: window.document }); let muted = true; - render( (muted = m)} />); + render( + (muted = false)} + setMicrophoneMuted={(m) => { + muted = m; + }} + />, + ); await user.keyboard("[Space>]"); expect(muted).toBe(false); await user.keyboard("[/Space]"); + expect(muted).toBe(true); }); test("spacebar prioritizes pressing a button", async () => { - const user = userEvent.setup(); + const user = userEvent.setup({ document: window.document }); + const setMuted = vi.fn(); const onClick = vi.fn(); render( @@ -71,7 +86,7 @@ test("spacebar prioritizes pressing a button", async () => { }); test("unmuting happens in place of the default action", async () => { - const user = userEvent.setup(); + const user = userEvent.setup({ document: window.document }); const defaultPrevented = vi.fn(); // In the real application, we mostly just want the spacebar shortcut to avoid // scrolling the page. But to test that here in JSDOM, we need some kind of diff --git a/src/vitest.setup.ts b/src/vitest.setup.ts index a97fc335..e4210b7c 100644 --- a/src/vitest.setup.ts +++ b/src/vitest.setup.ts @@ -13,13 +13,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - import "global-jsdom/register"; - +import globalJsdom from "global-jsdom"; import i18n from "i18next"; import posthog from "posthog-js"; import { initReactI18next } from "react-i18next"; -import { afterEach } from "vitest"; +import { afterEach, beforeEach } from "vitest"; import { cleanup } from "@testing-library/react"; import { Config } from "./config/Config"; @@ -36,4 +35,12 @@ i18n.use(initReactI18next).init({ Config.initDefault(); posthog.opt_out_capturing(); -afterEach(cleanup); +// We need to cleanup the global jsDom +// Otherwise we will run into issues with async input test overlapping and throwing. + +let cleanupJsDom: { (): void }; +beforeEach(() => (cleanupJsDom = globalJsdom())); +afterEach(() => { + cleanupJsDom(); + cleanup(); +}); diff --git a/yarn.lock b/yarn.lock index e5174787..9d81ef44 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2854,6 +2854,15 @@ resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64" integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA== +"@types/jsdom@^21.1.7": + version "21.1.7" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-21.1.7.tgz#9edcb09e0b07ce876e7833922d3274149c898cfa" + integrity sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA== + dependencies: + "@types/node" "*" + "@types/tough-cookie" "*" + parse5 "^7.0.0" + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -2869,6 +2878,13 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== +"@types/node@*": + version "22.5.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.1.tgz#de01dce265f6b99ed32b295962045d10b5b99560" + integrity sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw== + dependencies: + undici-types "~6.19.2" + "@types/node@>=13.7.0": version "22.1.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.1.0.tgz#6d6adc648b5e03f0e83c78dc788c2b037d0ad94b" @@ -2940,6 +2956,11 @@ resolved "https://registry.yarnpkg.com/@types/symlink-or-copy/-/symlink-or-copy-1.2.2.tgz#51b1c00b516a5774ada5d611e65eb123f988ef8d" integrity sha512-MQ1AnmTLOncwEf9IVU+B2e4Hchrku5N67NkgcAHW0p3sdzPe0FNMANxEm6OJUzPniEQGkeT3OROLlCwZJLWFZA== +"@types/tough-cookie@*": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" + integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== + "@types/uuid@10": version "10.0.0" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-10.0.0.tgz#e9c07fe50da0f53dc24970cca94d619ff03f6f6d" From 9d5145a7a6b04c6b1b49b10809bb69337b71ea09 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 30 Aug 2024 19:09:42 -0400 Subject: [PATCH 19/33] Test MediaViewModel This was the result of me playing around with RxJS marble testing to understand how to get things done with its TestScheduler. I discovered that it lacks a clear way to fire arbitrary actions during the test, so I built a small helper function called schedule which does this for us. --- src/state/MediaViewModel.test.ts | 132 +++++++++++++++++++++++++++++++ src/utils/test.ts | 39 ++++++++- 2 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 src/state/MediaViewModel.test.ts diff --git a/src/state/MediaViewModel.test.ts b/src/state/MediaViewModel.test.ts new file mode 100644 index 00000000..f65b7775 --- /dev/null +++ b/src/state/MediaViewModel.test.ts @@ -0,0 +1,132 @@ +/* +Copyright 2024 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import { RoomMember } from "matrix-js-sdk/src/matrix"; +import { expect, test, vi } from "vitest"; +import { LocalParticipant, RemoteParticipant } from "livekit-client"; + +import { + LocalUserMediaViewModel, + RemoteUserMediaViewModel, +} from "./MediaViewModel"; +import { withTestScheduler } from "../utils/test"; + +function withLocal(continuation: (vm: LocalUserMediaViewModel) => void): void { + const member = {} as unknown as RoomMember; + const vm = new LocalUserMediaViewModel( + "a", + member, + {} as unknown as LocalParticipant, + true, + ); + try { + continuation(vm); + } finally { + vm.destroy(); + } +} + +function withRemote( + participant: Partial, + continuation: (vm: RemoteUserMediaViewModel) => void, +): void { + const member = {} as unknown as RoomMember; + const vm = new RemoteUserMediaViewModel( + "a", + member, + { setVolume() {}, ...participant } as RemoteParticipant, + true, + ); + try { + continuation(vm); + } finally { + vm.destroy(); + } +} + +test("set a participant's volume", () => { + const setVolumeSpy = vi.fn(); + withRemote({ setVolume: setVolumeSpy }, (vm) => + withTestScheduler(({ expectObservable, schedule }) => { + schedule("-a|", { + a() { + vm.setLocalVolume(0.8); + expect(setVolumeSpy).toHaveBeenLastCalledWith(0.8); + }, + }); + expectObservable(vm.localVolume).toBe("ab", { a: 1, b: 0.8 }); + }), + ); +}); + +test("mute and unmute a participant", () => { + const setVolumeSpy = vi.fn(); + withRemote({ setVolume: setVolumeSpy }, (vm) => + withTestScheduler(({ expectObservable, schedule }) => { + schedule("-abc|", { + a() { + vm.toggleLocallyMuted(); + expect(setVolumeSpy).toHaveBeenLastCalledWith(0); + }, + b() { + vm.setLocalVolume(0.8); + expect(setVolumeSpy).toHaveBeenLastCalledWith(0); + }, + c() { + vm.toggleLocallyMuted(); + expect(setVolumeSpy).toHaveBeenLastCalledWith(0.8); + }, + }); + expectObservable(vm.locallyMuted).toBe("ab-c", { + a: false, + b: true, + c: false, + }); + }), + ); +}); + +test("toggle fit/contain for a participant's video", () => { + withRemote({}, (vm) => + withTestScheduler(({ expectObservable, schedule }) => { + schedule("-ab|", { + a: () => vm.toggleFitContain(), + b: () => vm.toggleFitContain(), + }); + expectObservable(vm.cropVideo).toBe("abc", { + a: true, + b: false, + c: true, + }); + }), + ); +}); + +test("local media remembers whether it should always be shown", () => { + withLocal((vm) => + withTestScheduler(({ expectObservable, schedule }) => { + schedule("-a|", { a: () => vm.setAlwaysShow(false) }); + expectObservable(vm.alwaysShow).toBe("ab", { a: true, b: false }); + }), + ); + // Next local media should start out *not* always shown + withLocal((vm) => + withTestScheduler(({ expectObservable, schedule }) => { + schedule("-a|", { a: () => vm.setAlwaysShow(true) }); + expectObservable(vm.alwaysShow).toBe("ab", { a: false, b: true }); + }), + ); +}); diff --git a/src/utils/test.ts b/src/utils/test.ts index f3d7874a..43329be0 100644 --- a/src/utils/test.ts +++ b/src/utils/test.ts @@ -1,5 +1,5 @@ /* -Copyright 2023 New Vector Ltd +Copyright 2023-2024 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,7 +13,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import { vi } from "vitest"; +import { map } from "rxjs"; +import { RunHelpers, TestScheduler } from "rxjs/testing"; +import { expect, vi } from "vitest"; export function withFakeTimers(continuation: () => void): void { vi.useFakeTimers(); @@ -23,3 +25,36 @@ export function withFakeTimers(continuation: () => void): void { vi.useRealTimers(); } } + +export interface OurRunHelpers extends RunHelpers { + /** + * Schedules a sequence of actions to happen, as described by a marble + * diagram. + */ + schedule: (marbles: string, actions: Record void>) => void; +} + +/** + * Run Observables with a scheduler that virtualizes time, for testing purposes. + */ +export function withTestScheduler( + continuation: (helpers: OurRunHelpers) => void, +): void { + new TestScheduler((actual, expected) => { + expect(actual).deep.equals(expected); + }).run((helpers) => + continuation({ + ...helpers, + schedule(marbles, actions) { + const actionsObservable = helpers + .cold(marbles) + .pipe(map((value) => actions[value]())); + const results = Object.fromEntries( + Object.keys(actions).map((value) => [value, undefined] as const), + ); + // Run the actions and verify that none of them error + helpers.expectObservable(actionsObservable).toBe(marbles, results); + }, + }), + ); +} From fa6b8b3f0b9a6b1a9385b44ffa3451b1e47f1878 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 00:30:19 +0000 Subject: [PATCH 20/33] Update actions/upload-artifact action to v4.4.0 --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8c96a92e..63ad7fbf 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -51,7 +51,7 @@ jobs: run: | tar --numeric-owner --transform "s/dist/element-call-${TARBALL_VERSION}/" -cvzf element-call-${TARBALL_VERSION}.tar.gz dist - name: Upload - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 env: GITHUB_TOKEN: ${{ github.token }} with: From 353987ca1249e8a673583ae8bc6ea80d911394ec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 01:59:12 +0000 Subject: [PATCH 21/33] Update dependency matrix-widget-api to v1.9.0 --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9d81ef44..aae7decd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5949,9 +5949,9 @@ matrix-js-sdk@^v34.4.0: uuid "10" matrix-widget-api@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-1.8.2.tgz#28d344502a85593740f560b0f8120e474a054505" - integrity sha512-kdmks3CvFNPIYN669Y4rO13KrazDvX8KHC7i6jOzJs8uZ8s54FNkuRVVyiQHeVCSZG5ixUqW9UuCj9lf03qxTQ== + version "1.9.0" + resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-1.9.0.tgz#884136b405bd3c56e4ea285095c9e01ec52b6b1f" + integrity sha512-au8mqralNDqrEvaVAkU37bXOb8I9SCe+ACdPk11QWw58FKstVq31q2wRz+qWA6J+42KJ6s1DggWbG/S3fEs3jw== dependencies: "@types/events" "^3.0.0" events "^3.2.0" From 354382d498b5def3eaf0f8c67e6a223cb94feb78 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 2 Sep 2024 08:25:10 +0200 Subject: [PATCH 22/33] Display QR code when sharing invite link Fixes: #2495 Signed-off-by: Johannes Marbach --- package.json | 2 + public/locales/en-GB/app.json | 1 + src/QrCode.module.css | 20 ++++++ src/QrCode.tsx | 54 ++++++++++++++++ src/room/InviteModal.module.css | 9 +++ src/room/InviteModal.tsx | 2 + yarn.lock | 111 +++++++++++++++++++++++++++++++- 7 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 src/QrCode.module.css create mode 100644 src/QrCode.tsx diff --git a/package.json b/package.json index 175a5655..d8183b95 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@sentry/react": "^8.0.0", "@sentry/tracing": "^7.0.0", "@types/lodash": "^4.14.199", + "@types/qrcode": "^1.5.5", "@use-gesture/react": "^10.2.11", "@vector-im/compound-design-tokens": "^1.0.0", "@vector-im/compound-web": "^6.0.0", @@ -68,6 +69,7 @@ "pako": "^2.0.4", "postcss-preset-env": "^10.0.0", "posthog-js": "^1.29.0", + "qrcode": "^1.5.4", "react": "18", "react-dom": "18", "react-i18next": "^15.0.0", diff --git a/public/locales/en-GB/app.json b/public/locales/en-GB/app.json index acecfc4f..f4c8824d 100644 --- a/public/locales/en-GB/app.json +++ b/public/locales/en-GB/app.json @@ -107,6 +107,7 @@ "mute_microphone_button_label": "Mute microphone", "participant_count_one": "{{count, number}}", "participant_count_other": "{{count, number}}", + "qr_code": "QR Code", "rageshake_button_error_caption": "Retry sending logs", "rageshake_request_modal": { "body": "Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.", diff --git a/src/QrCode.module.css b/src/QrCode.module.css new file mode 100644 index 00000000..5b9cd340 --- /dev/null +++ b/src/QrCode.module.css @@ -0,0 +1,20 @@ +/* +Copyright 2024 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +.qrCode img { + max-width: 100%; + image-rendering: pixelated; +} diff --git a/src/QrCode.tsx b/src/QrCode.tsx new file mode 100644 index 00000000..b3958386 --- /dev/null +++ b/src/QrCode.tsx @@ -0,0 +1,54 @@ +/* +Copyright 2024 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import { FC, useEffect, useState } from "react"; +import { toDataURL } from "qrcode"; +import classNames from "classnames"; +import { t } from "i18next"; + +import styles from "./QrCode.module.css"; + +interface Props { + data: string; + className?: string; +} + +export const QrCode: FC = ({ data, className }) => { + const [url, setUrl] = useState(null); + + useEffect(() => { + let isCancelled = false; + + toDataURL(data, { errorCorrectionLevel: "L" }).then((url) => { + if (!isCancelled) { + setUrl(url); + } + }).catch((reason) => { + if (!isCancelled) { + setUrl(null); + } + }); + + return (): void => { isCancelled = true; }; + }, [data]); + + return ( +
    + {url && {t("qr_code")}} +
    +); +}; + diff --git a/src/room/InviteModal.module.css b/src/room/InviteModal.module.css index 83859224..1f6868f9 100644 --- a/src/room/InviteModal.module.css +++ b/src/room/InviteModal.module.css @@ -24,3 +24,12 @@ limitations under the License. .button { width: 100%; } + +.qrCode { + display: flex; + justify-content: center; +} + +.qrCode img { + margin-block-end: var(--cpd-space-8x); +} diff --git a/src/room/InviteModal.tsx b/src/room/InviteModal.tsx index 22209a6c..0f18f8ff 100644 --- a/src/room/InviteModal.tsx +++ b/src/room/InviteModal.tsx @@ -29,6 +29,7 @@ import { getAbsoluteRoomUrl } from "../utils/matrix"; import styles from "./InviteModal.module.css"; import { Toast } from "../Toast"; import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement"; +import { QrCode } from "../QrCode"; interface Props { room: Room; @@ -61,6 +62,7 @@ export const InviteModal: FC = ({ room, open, onDismiss }) => { return ( <> + {url} diff --git a/yarn.lock b/yarn.lock index ba73d1b0..b374b0ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3508,6 +3508,13 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== +"@types/qrcode@^1.5.5": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@types/qrcode/-/qrcode-1.5.5.tgz#993ff7c6b584277eee7aac0a20861eab682f9dac" + integrity sha512-CdfBi/e3Qk+3Z/fXYShipBT13OJ2fDO2Q2w5CIP5anLTLIndQG9z6P1cnm+8zCWSpm5dnxMFd/uREtb0EXuQzg== + dependencies: + "@types/node" "*" + "@types/react-dom@^18.3.0": version "18.3.0" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0" @@ -4284,6 +4291,11 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" @@ -4393,6 +4405,15 @@ clean-regexp@^1.0.0: dependencies: escape-string-regexp "^1.0.5" +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + clone-stats@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" @@ -4658,6 +4679,11 @@ debug@^4.3.2: dependencies: ms "2.1.2" +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== + decimal.js@^10.4.3: version "10.4.3" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" @@ -4730,6 +4756,11 @@ detect-node-es@^1.1.0: resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== +dijkstrajs@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz#4c8dbdea1f0f6478bff94d9c49c784d623e4fc23" + integrity sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -5555,6 +5586,11 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-func-name@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" @@ -7185,6 +7221,11 @@ pluralize@^8.0.0: resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== +pngjs@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" + integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== + possible-typed-array-names@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" @@ -7564,6 +7605,15 @@ punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== +qrcode@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.4.tgz#5cb81d86eb57c675febb08cf007fff963405da88" + integrity sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg== + dependencies: + dijkstrajs "^1.0.1" + pngjs "^5.0.0" + yargs "^15.3.1" + querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -7854,6 +7904,11 @@ replace-ext@^2.0.0: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-2.0.0.tgz#9471c213d22e1bcc26717cd6e50881d88f812b06" integrity sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug== +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" @@ -7868,6 +7923,11 @@ require-in-the-middle@^7.1.1: module-details-from-path "^1.0.3" resolve "^1.22.1" +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -8095,6 +8155,11 @@ semver@^7.6.0, semver@^7.6.1: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + set-function-length@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -8268,7 +8333,7 @@ string-template@~0.2.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^4.1.0: +string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -9099,6 +9164,11 @@ which-collection@^1.0.1: is-weakmap "^2.0.2" is-weakset "^2.0.3" +which-module@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== + which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.9: version "1.1.15" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" @@ -9134,6 +9204,15 @@ why-is-node-running@^2.3.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -9173,6 +9252,11 @@ xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -9183,6 +9267,31 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^15.3.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 8655b41c05c7d101d37ba25d358baa4f18fbcf3e Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 2 Sep 2024 08:44:33 +0200 Subject: [PATCH 23/33] Run prettier --- src/QrCode.tsx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/QrCode.tsx b/src/QrCode.tsx index b3958386..515234ab 100644 --- a/src/QrCode.tsx +++ b/src/QrCode.tsx @@ -30,25 +30,28 @@ export const QrCode: FC = ({ data, className }) => { const [url, setUrl] = useState(null); useEffect(() => { - let isCancelled = false; + let isCancelled = false; - toDataURL(data, { errorCorrectionLevel: "L" }).then((url) => { - if (!isCancelled) { - setUrl(url); - } - }).catch((reason) => { - if (!isCancelled) { - setUrl(null); - } - }); + toDataURL(data, { errorCorrectionLevel: "L" }) + .then((url) => { + if (!isCancelled) { + setUrl(url); + } + }) + .catch((reason) => { + if (!isCancelled) { + setUrl(null); + } + }); - return (): void => { isCancelled = true; }; + return (): void => { + isCancelled = true; + }; }, [data]); return (
    - {url && {t("qr_code")}} + {url && {t("qr_code")}}
    -); + ); }; - From 088d4d93a019b4d4ab929ffcdb2f90e8b06f9546 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 2 Sep 2024 09:10:42 +0200 Subject: [PATCH 24/33] Re-add types package --- package.json | 1 + yarn.lock | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/package.json b/package.json index f56efb23..f31f7020 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@types/jsdom": "^21.1.7", "@types/lodash": "^4.14.199", "@types/node": "^20.0.0", + "@types/qrcode": "^1.5.5", "@types/react-dom": "^18.3.0", "@types/react-router-dom": "^5.3.3", "@types/sdp-transform": "^2.4.5", diff --git a/yarn.lock b/yarn.lock index e75cd328..b394bef0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2909,6 +2909,13 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== +"@types/qrcode@^1.5.5": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@types/qrcode/-/qrcode-1.5.5.tgz#993ff7c6b584277eee7aac0a20861eab682f9dac" + integrity sha512-CdfBi/e3Qk+3Z/fXYShipBT13OJ2fDO2Q2w5CIP5anLTLIndQG9z6P1cnm+8zCWSpm5dnxMFd/uREtb0EXuQzg== + dependencies: + "@types/node" "*" + "@types/react-dom@^18.3.0": version "18.3.0" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0" From 6ae0c0988d5a1ad94c187b89ae9dee2b2c133cef Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 2 Sep 2024 16:28:53 +0200 Subject: [PATCH 25/33] Add simplistic rendering test --- src/QrCode.test.tsx | 34 ++++++++++++++++++++++++++ src/__snapshots__/QrCode.test.tsx.snap | 12 +++++++++ 2 files changed, 46 insertions(+) create mode 100644 src/QrCode.test.tsx create mode 100644 src/__snapshots__/QrCode.test.tsx.snap diff --git a/src/QrCode.test.tsx b/src/QrCode.test.tsx new file mode 100644 index 00000000..6bdad313 --- /dev/null +++ b/src/QrCode.test.tsx @@ -0,0 +1,34 @@ +/* +Copyright 2024 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import { describe, expect, test } from "vitest"; +import { render, configure } from "@testing-library/react"; + +import { QrCode } from "./QrCode"; + +configure({ + defaultHidden: true, +}); + +describe("QrCode", () => { + test("renders", async () => { + const { container, findByRole } = render( + , + ); + await findByRole("img") as HTMLImageElement; + expect(container.firstChild).toMatchSnapshot(); + }); +}); diff --git a/src/__snapshots__/QrCode.test.tsx.snap b/src/__snapshots__/QrCode.test.tsx.snap new file mode 100644 index 00000000..d1d444b8 --- /dev/null +++ b/src/__snapshots__/QrCode.test.tsx.snap @@ -0,0 +1,12 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`QrCode > renders 1`] = ` +
    + qr_code +
    +`; From cba5eb5c07e923d765e7c70456e7ad20aa8de90f Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 2 Sep 2024 16:30:37 +0200 Subject: [PATCH 26/33] Run prettier --- src/QrCode.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QrCode.test.tsx b/src/QrCode.test.tsx index 6bdad313..6537076d 100644 --- a/src/QrCode.test.tsx +++ b/src/QrCode.test.tsx @@ -28,7 +28,7 @@ describe("QrCode", () => { const { container, findByRole } = render( , ); - await findByRole("img") as HTMLImageElement; + (await findByRole("img")) as HTMLImageElement; expect(container.firstChild).toMatchSnapshot(); }); }); From 040288790c5800af60a984fd7cc00cf17083b82e Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:48:15 +0200 Subject: [PATCH 27/33] Fix (rust crypto): Adjust login procedures to account for rust crypto behaviour. (#2603) * Fix for missing client store (caused by: #2587) * Fix interactive login with authenticated guest user. Fix clearing storage before logging in a new account. --- src/ClientContext.tsx | 16 +++--- src/auth/LoginPage.tsx | 4 +- src/auth/useInteractiveLogin.ts | 96 ++++++++++++++++++--------------- src/utils/matrix.ts | 26 +++++---- 4 files changed, 78 insertions(+), 64 deletions(-) diff --git a/src/ClientContext.tsx b/src/ClientContext.tsx index 32817623..16c7bd26 100644 --- a/src/ClientContext.tsx +++ b/src/ClientContext.tsx @@ -379,19 +379,15 @@ async function loadClient(): Promise { } catch (err) { if (err instanceof MatrixError && err.errcode === "M_UNKNOWN_TOKEN") { // We can't use this session anymore, so let's log it out - try { - const client = await initClient(initClientParams, false); // Don't need the crypto store just to log out) - await client.logout(true); - } catch (err) { - logger.warn( - "The previous session was unable to login, and we couldn't log it out: " + - err, - ); - } + logger.log( + "The session from local store is invalid; continuing without a client", + ); + clearSession(); + // returning null = "no client` pls register" (undefined = "loading" which is the current value when reaching this line) + return null; } throw err; } - /* eslint-enable camelcase */ } catch (err) { clearSession(); throw err; diff --git a/src/auth/LoginPage.tsx b/src/auth/LoginPage.tsx index 5db36781..5cfa2c1b 100644 --- a/src/auth/LoginPage.tsx +++ b/src/auth/LoginPage.tsx @@ -32,8 +32,8 @@ export const LoginPage: FC = () => { const { t } = useTranslation(); usePageTitle(t("login_title")); - const { setClient } = useClient(); - const login = useInteractiveLogin(); + const { client, setClient } = useClient(); + const login = useInteractiveLogin(client); const homeserver = Config.defaultHomeserverUrl(); // TODO: Make this configurable const usernameRef = useRef(null); const passwordRef = useRef(null); diff --git a/src/auth/useInteractiveLogin.ts b/src/auth/useInteractiveLogin.ts index 28b005ff..7877b285 100644 --- a/src/auth/useInteractiveLogin.ts +++ b/src/auth/useInteractiveLogin.ts @@ -24,8 +24,15 @@ import { import { initClient } from "../utils/matrix"; import { Session } from "../ClientContext"; - -export function useInteractiveLogin(): ( +/** + * This provides the login method to login using user credentials. + * @param oldClient If there is an already authenticated client it should be passed to this hook + * this allows the interactive login to sign out the client before logging in. + * @returns A async method that can be called/awaited to log in with the provided credentials. + */ +export function useInteractiveLogin( + oldClient?: MatrixClient, +): ( homeserver: string, username: string, password: string, @@ -36,47 +43,52 @@ export function useInteractiveLogin(): ( username: string, password: string, ) => Promise<[MatrixClient, Session]> - >(async (homeserver: string, username: string, password: string) => { - const authClient = createClient({ baseUrl: homeserver }); + >( + async (homeserver: string, username: string, password: string) => { + const authClient = createClient({ baseUrl: homeserver }); - const interactiveAuth = new InteractiveAuth({ - matrixClient: authClient, - doRequest: (): Promise => - authClient.login("m.login.password", { - identifier: { - type: "m.id.user", - user: username, - }, - password, - }), - stateUpdated: (): void => {}, - requestEmailToken: (): Promise<{ sid: string }> => { - return Promise.resolve({ sid: "" }); - }, - }); + const interactiveAuth = new InteractiveAuth({ + matrixClient: authClient, + doRequest: (): Promise => + authClient.login("m.login.password", { + identifier: { + type: "m.id.user", + user: username, + }, + password, + }), + stateUpdated: (): void => {}, + requestEmailToken: (): Promise<{ sid: string }> => { + return Promise.resolve({ sid: "" }); + }, + }); - // XXX: This claims to return an IAuthData which contains none of these - // things - the js-sdk types may be wrong? - /* eslint-disable camelcase,@typescript-eslint/no-explicit-any */ - const { user_id, access_token, device_id } = - (await interactiveAuth.attemptAuth()) as any; - const session = { - user_id, - access_token, - device_id, - passwordlessUser: false, - }; + // XXX: This claims to return an IAuthData which contains none of these + // things - the js-sdk types may be wrong? + /* eslint-disable camelcase,@typescript-eslint/no-explicit-any */ + const { user_id, access_token, device_id } = + (await interactiveAuth.attemptAuth()) as any; + const session = { + user_id, + access_token, + device_id, + passwordlessUser: false, + }; - const client = await initClient( - { - baseUrl: homeserver, - accessToken: access_token, - userId: user_id, - deviceId: device_id, - }, - false, - ); - /* eslint-enable camelcase */ - return [client, session]; - }, []); + // To not confuse the rust crypto sessions we need to logout the old client before initializing the new one. + await oldClient?.logout(true); + const client = await initClient( + { + baseUrl: homeserver, + accessToken: access_token, + userId: user_id, + deviceId: device_id, + }, + false, + ); + /* eslint-enable camelcase */ + return [client, session]; + }, + [oldClient], + ); } diff --git a/src/utils/matrix.ts b/src/utils/matrix.ts index d5735e00..f27067bf 100644 --- a/src/utils/matrix.ts +++ b/src/utils/matrix.ts @@ -71,10 +71,12 @@ async function waitForSync(client: MatrixClient): Promise { /** * Initialises and returns a new standalone Matrix Client. - * If false is passed for the 'restore' parameter, corresponding crypto - * data is cleared before the client initialization. + * This can only be called safely if no other client is running + * otherwise rust crypto will throw since it is not ready to initialize a new session. + * If another client is running make sure `.logout()` is called before executing this function. * @param clientOptions Object of options passed through to the client - * @param restore Whether the session is being restored from storage + * @param restore If the rust crypto should be reset before the cient initialization or + * if the initialization should try to restore the crypto state from the indexDB. * @returns The MatrixClient instance */ export async function initClient( @@ -130,20 +132,17 @@ export async function initClient( fallbackICEServerAllowed: fallbackICEServerAllowed, }); - // In case of registering a new matrix account caused by broken store state. This is particularly needed for: + // In case of logging in a new matrix account but there is still crypto local store. This is needed for: // - We lost the auth tokens and cannot restore the client resulting in registering a new user. - // - Need to make sure any possible leftover crypto store gets cleared. + // - We start the sign in flow but are registered with a guest user. (It should additionally log out the guest before) // - A new account is created because of missing LocalStorage: "matrix-auth-store", but the crypto IndexDB is still available. - // This would result in conflicting crypto store userId vs matrixClient userId. Caused by EC 0.6.1 if (!restore) { - client.clearStores(); + await client.clearStores(); } // Start client store. // Note: The `client.store` is used to store things like sync results. It's independent of // the cryptostore, and uses a separate indexeddb database. - - // start the client store (totally independent to the crypto store) try { await client.store.startup(); } catch (error) { @@ -156,7 +155,14 @@ export async function initClient( } // Also creates and starts any crypto related stores. - await client.initRustCrypto(); + try { + await client.initRustCrypto(); + } catch (err) { + logger.warn( + err, + "Make sure to clear client stores before initializing the rust crypto.", + ); + } client.setGlobalErrorOnUnknownDevices(false); // Once startClient is called, syncs are run asynchronously. From 7ee3fbd8321d5da3edbb6f273a41ac83415d84a4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:48:56 +0200 Subject: [PATCH 28/33] Update all non-major dependencies (#2600) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 488 ++++++++++++++++++++++++++------------------------- 2 files changed, 253 insertions(+), 237 deletions(-) diff --git a/package.json b/package.json index 7f036ce7..e57223c5 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@livekit/components-react": "^2.0.0", "@opentelemetry/api": "^1.4.0", "@opentelemetry/core": "^1.25.1", - "@opentelemetry/exporter-trace-otlp-http": "^0.52.0", + "@opentelemetry/exporter-trace-otlp-http": "^0.53.0", "@opentelemetry/resources": "^1.25.1", "@opentelemetry/sdk-trace-base": "^1.25.1", "@opentelemetry/sdk-trace-web": "^1.9.1", diff --git a/yarn.lock b/yarn.lock index 9d81ef44..28604f24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -57,12 +57,12 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.25.0", "@babel/generator@^7.25.4": - version "7.25.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.5.tgz#b31cf05b3fe8c32d206b6dad03bb0aacbde73450" - integrity sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w== +"@babel/generator@^7.25.0", "@babel/generator@^7.25.4", "@babel/generator@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.6.tgz#0df1ad8cb32fe4d2b01d8bf437f153d19342a87c" + integrity sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw== dependencies: - "@babel/types" "^7.25.4" + "@babel/types" "^7.25.6" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" @@ -228,12 +228,12 @@ "@babel/types" "^7.25.0" "@babel/helpers@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" - integrity sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.6.tgz#57ee60141829ba2e102f30711ffe3afab357cc60" + integrity sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q== dependencies: "@babel/template" "^7.25.0" - "@babel/types" "^7.25.0" + "@babel/types" "^7.25.6" "@babel/highlight@^7.23.4": version "7.24.6" @@ -260,19 +260,19 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== -"@babel/parser@^7.24.4", "@babel/parser@^7.25.4": +"@babel/parser@^7.24.4": version "7.25.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a" integrity sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA== dependencies: "@babel/types" "^7.25.4" -"@babel/parser@^7.25.0": - version "7.25.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" - integrity sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw== +"@babel/parser@^7.25.0", "@babel/parser@^7.25.4", "@babel/parser@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== dependencies: - "@babel/types" "^7.25.2" + "@babel/types" "^7.25.6" "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.3": version "7.25.3" @@ -1052,9 +1052,9 @@ regenerator-runtime "^0.14.0" "@babel/runtime@^7.12.5": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.8.tgz#5d958c3827b13cc6d05e038c07fb2e5e3420d82e" - integrity sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" + integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ== dependencies: regenerator-runtime "^0.14.0" @@ -1088,7 +1088,20 @@ "@babel/parser" "^7.25.0" "@babel/types" "^7.25.0" -"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4": +"@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" + integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.6" + "@babel/parser" "^7.25.6" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4": version "7.25.4" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.4.tgz#648678046990f2957407e3086e97044f13c3e18e" integrity sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg== @@ -1119,7 +1132,7 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@babel/types@^7.24.0", "@babel/types@^7.25.4": +"@babel/types@^7.24.0": version "7.25.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f" integrity sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ== @@ -1128,7 +1141,16 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" -"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.4.4": +"@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4", "@babel/types@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + +"@babel/types@^7.24.8", "@babel/types@^7.4.4": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.2.tgz#55fb231f7dc958cd69ea141a4c2997e819646125" integrity sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q== @@ -1903,10 +1925,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@opentelemetry/api-logs@0.52.1": - version "0.52.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.52.1.tgz#52906375da4d64c206b0c4cb8ffa209214654ecc" - integrity sha512-qnSqB2DQ9TPP96dl8cDubDvrUyWc0/sK81xHTK8eSUspzDM3bsewX903qclQFvVhgStjRWdC5bLb3kQqMkfV5A== +"@opentelemetry/api-logs@0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz#c478cbd8120ec2547b64edfa03a552cfe42170be" + integrity sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw== dependencies: "@opentelemetry/api" "^1.0.0" @@ -1915,98 +1937,92 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== -"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.25.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.1.tgz#ff667d939d128adfc7c793edae2f6bca177f829d" - integrity sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ== +"@opentelemetry/core@1.26.0", "@opentelemetry/core@^1.25.1": + version "1.26.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.26.0.tgz#7d84265aaa850ed0ca5813f97d831155be42b328" + integrity sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ== dependencies: - "@opentelemetry/semantic-conventions" "1.25.1" + "@opentelemetry/semantic-conventions" "1.27.0" -"@opentelemetry/exporter-trace-otlp-http@^0.52.0": - version "0.52.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.52.1.tgz#99549e05f581050d0df2c1c684d1a819c480ebc6" - integrity sha512-05HcNizx0BxcFKKnS5rwOV+2GevLTVIRA0tRgWYyw4yCgR53Ic/xk83toYKts7kbzcI+dswInUg/4s8oyA+tqg== +"@opentelemetry/exporter-trace-otlp-http@^0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.53.0.tgz#48e46c4573a35d31c14e6bc44635923e32970b9a" + integrity sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A== dependencies: - "@opentelemetry/core" "1.25.1" - "@opentelemetry/otlp-exporter-base" "0.52.1" - "@opentelemetry/otlp-transformer" "0.52.1" - "@opentelemetry/resources" "1.25.1" - "@opentelemetry/sdk-trace-base" "1.25.1" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/otlp-exporter-base" "0.53.0" + "@opentelemetry/otlp-transformer" "0.53.0" + "@opentelemetry/resources" "1.26.0" + "@opentelemetry/sdk-trace-base" "1.26.0" -"@opentelemetry/otlp-exporter-base@0.52.1": - version "0.52.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.52.1.tgz#657d9b27c55bd42ab6a8bb181006b57f9c84b91d" - integrity sha512-z175NXOtX5ihdlshtYBe5RpGeBoTXVCKPPLiQlD6FHvpM4Ch+p2B0yWKYSrBfLH24H9zjJiBdTrtD+hLlfnXEQ== +"@opentelemetry/otlp-exporter-base@0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.53.0.tgz#dfe51874b869c687c3cb463b70cddda7de282762" + integrity sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA== dependencies: - "@opentelemetry/core" "1.25.1" - "@opentelemetry/otlp-transformer" "0.52.1" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/otlp-transformer" "0.53.0" -"@opentelemetry/otlp-transformer@0.52.1": - version "0.52.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.52.1.tgz#779b7ebf0e3791eebeaa64caff06914fe3577948" - integrity sha512-I88uCZSZZtVa0XniRqQWKbjAUm73I8tpEy/uJYPPYw5d7BRdVk0RfTBQw8kSUl01oVWEuqxLDa802222MYyWHg== +"@opentelemetry/otlp-transformer@0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.53.0.tgz#55d435db5ed5cf56b99c010827294dd4921c45c2" + integrity sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA== dependencies: - "@opentelemetry/api-logs" "0.52.1" - "@opentelemetry/core" "1.25.1" - "@opentelemetry/resources" "1.25.1" - "@opentelemetry/sdk-logs" "0.52.1" - "@opentelemetry/sdk-metrics" "1.25.1" - "@opentelemetry/sdk-trace-base" "1.25.1" + "@opentelemetry/api-logs" "0.53.0" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/resources" "1.26.0" + "@opentelemetry/sdk-logs" "0.53.0" + "@opentelemetry/sdk-metrics" "1.26.0" + "@opentelemetry/sdk-trace-base" "1.26.0" protobufjs "^7.3.0" -"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.25.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.25.1.tgz#bb9a674af25a1a6c30840b755bc69da2796fefbb" - integrity sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ== +"@opentelemetry/resources@1.26.0", "@opentelemetry/resources@^1.25.1": + version "1.26.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.26.0.tgz#da4c7366018bd8add1f3aa9c91c6ac59fd503cef" + integrity sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw== dependencies: - "@opentelemetry/core" "1.25.1" - "@opentelemetry/semantic-conventions" "1.25.1" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/semantic-conventions" "1.27.0" -"@opentelemetry/sdk-logs@0.52.1": - version "0.52.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-logs/-/sdk-logs-0.52.1.tgz#5653faa2d81cae574729bdeb4298b95dc10ae736" - integrity sha512-MBYh+WcPPsN8YpRHRmK1Hsca9pVlyyKd4BxOC4SsgHACnl/bPp4Cri9hWhVm5+2tiQ9Zf4qSc1Jshw9tOLGWQA== +"@opentelemetry/sdk-logs@0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-logs/-/sdk-logs-0.53.0.tgz#ec8b69278c4e683c13c58ed4285a47c27f5799c6" + integrity sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g== dependencies: - "@opentelemetry/api-logs" "0.52.1" - "@opentelemetry/core" "1.25.1" - "@opentelemetry/resources" "1.25.1" + "@opentelemetry/api-logs" "0.53.0" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/resources" "1.26.0" -"@opentelemetry/sdk-metrics@1.25.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.25.1.tgz#50c985ec15557a9654334e7fa1018dc47a8a56b7" - integrity sha512-9Mb7q5ioFL4E4dDrc4wC/A3NTHDat44v4I3p2pLPSxRvqUbDIQyMVr9uK+EU69+HWhlET1VaSrRzwdckWqY15Q== +"@opentelemetry/sdk-metrics@1.26.0": + version "1.26.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.26.0.tgz#37bb0afb1d4447f50aab9cdd05db6f2d8b86103e" + integrity sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ== dependencies: - "@opentelemetry/core" "1.25.1" - "@opentelemetry/resources" "1.25.1" - lodash.merge "^4.6.2" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/resources" "1.26.0" -"@opentelemetry/sdk-trace-base@1.25.1", "@opentelemetry/sdk-trace-base@^1.25.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz#cbc1e60af255655d2020aa14cde17b37bd13df37" - integrity sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw== +"@opentelemetry/sdk-trace-base@1.26.0", "@opentelemetry/sdk-trace-base@^1.25.1": + version "1.26.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.26.0.tgz#0c913bc6d2cfafd901de330e4540952269ae579c" + integrity sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw== dependencies: - "@opentelemetry/core" "1.25.1" - "@opentelemetry/resources" "1.25.1" - "@opentelemetry/semantic-conventions" "1.25.1" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/resources" "1.26.0" + "@opentelemetry/semantic-conventions" "1.27.0" "@opentelemetry/sdk-trace-web@^1.9.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.25.1.tgz#65b48c0b68636e6905b02969d04b860e234a4391" - integrity sha512-SS6JaSkHngcBCNdWGthzcvaKGRnDw2AeP57HyTEileLToJ7WLMeV+064iRlVyoT4+e77MRp2T2dDSrmaUyxoNg== - dependencies: - "@opentelemetry/core" "1.25.1" - "@opentelemetry/sdk-trace-base" "1.25.1" - "@opentelemetry/semantic-conventions" "1.25.1" - -"@opentelemetry/semantic-conventions@1.25.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz#0deecb386197c5e9c2c28f2f89f51fb8ae9f145e" - integrity sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ== - -"@opentelemetry/semantic-conventions@^1.25.1": version "1.26.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.26.0.tgz#42da14476529ca86d0af4c11f58910f242a0a232" - integrity sha512-U9PJlOswJPSgQVPI+XEuNLElyFWkb0hAiMg+DExD9V0St03X2lPHGMdxMY/LrVmoukuIpXJ12oyrOtEZ4uXFkw== + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.26.0.tgz#52626083c0f9310744c8c1292bd14a02a410f5cf" + integrity sha512-sxeKPcG/gUyxZ8iB8X1MI8/grfSCGgo1n2kxOE73zjVaO9yW/7JuVC3gqUaWRjtZ6VD/V3lo2/ZSwMlm6n2mdg== + dependencies: + "@opentelemetry/core" "1.26.0" + "@opentelemetry/sdk-trace-base" "1.26.0" + "@opentelemetry/semantic-conventions" "1.27.0" + +"@opentelemetry/semantic-conventions@1.27.0", "@opentelemetry/semantic-conventions@^1.25.1": + version "1.27.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz#1a857dcc95a5ab30122e04417148211e6f945e6c" + integrity sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg== "@pkgjs/parseargs@^0.11.0": version "0.11.0" @@ -2510,69 +2526,69 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.0.tgz#20c09cf44dcb082140cc7f439dd679fe4bba3375" integrity sha512-2jsCDZwtQvRhejHLfZ1JY6w6kEuEtfF9nzYsZxzSlNVKDX+DpsDJ+Rbjkm74nvg2rdx0gwBS+IMdvwJuq3S9pQ== -"@sentry-internal/browser-utils@8.26.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.26.0.tgz#3c76015e1bddde6775e6a7e115fbb494f247fed1" - integrity sha512-O2Tj+WK33/ZVp5STnz6ZL0OO+/Idk2KqsH0ITQkQmyZ2z0kdzWOeqK7s7q3/My6rB1GfPcyqPcBBv4dVv92FYQ== +"@sentry-internal/browser-utils@8.27.0": + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.27.0.tgz#b8fd1c5e6b8c01d76abbba7ac5017eebcf7d3ed2" + integrity sha512-YTIwQ1GM1NTRXgN4DvpFSQ2x4pjlqQ0FQAyHW5x2ZYv4z7VmqG4Xkid1P/srQUipECk6nxkebfD4WR19nLsvnQ== dependencies: - "@sentry/core" "8.26.0" - "@sentry/types" "8.26.0" - "@sentry/utils" "8.26.0" + "@sentry/core" "8.27.0" + "@sentry/types" "8.27.0" + "@sentry/utils" "8.27.0" -"@sentry-internal/feedback@8.26.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.26.0.tgz#c29a2a4d97d9a9b56344521f3dbb16e2c40d799e" - integrity sha512-hQtw1gg8n6ERK1UH47F7ZI1zOsbhu0J2VX+TrnkpaQR2FgxDW1oe9Ja6oCV4CQKuR4w+1ZI/Kj4imSt0K33kEw== +"@sentry-internal/feedback@8.27.0": + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.27.0.tgz#46a4cbde49d7a1cb182792c28341a8c89249e6b1" + integrity sha512-b71PQc9aK1X9b/SO1DiJlrnAEx4n0MzPZQ/tKd9oRWDyGit6pJWZfQns9r2rvc96kJPMOTxFAa/upXRCkA723A== dependencies: - "@sentry/core" "8.26.0" - "@sentry/types" "8.26.0" - "@sentry/utils" "8.26.0" + "@sentry/core" "8.27.0" + "@sentry/types" "8.27.0" + "@sentry/utils" "8.27.0" -"@sentry-internal/replay-canvas@8.26.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.26.0.tgz#005e4ebed631d0e505e117d42ae8bc64748628d1" - integrity sha512-2CFQW6f9aJHIo/DqmqYa9PaYoLn1o36ywc0h8oyGrD4oPCbrnE5F++PmTdc71GBODu41HBn/yoCTLmxOD+UjpA== +"@sentry-internal/replay-canvas@8.27.0": + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.27.0.tgz#24a154f37b200ed99bb99a39cf98c35f25c2b93b" + integrity sha512-uuEfiWbjwugB9M4KxXxovHYiKRqg/R6U4EF8xM/Ub4laUuEcWsfRp7lQ3MxL3qYojbca8ncIFic2bIoKMPeejA== dependencies: - "@sentry-internal/replay" "8.26.0" - "@sentry/core" "8.26.0" - "@sentry/types" "8.26.0" - "@sentry/utils" "8.26.0" + "@sentry-internal/replay" "8.27.0" + "@sentry/core" "8.27.0" + "@sentry/types" "8.27.0" + "@sentry/utils" "8.27.0" -"@sentry-internal/replay@8.26.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.26.0.tgz#7d01b1915343bf8ca3d9ef7500994d4a45f3785e" - integrity sha512-JDY7W2bswlp5c3483lKP4kcb75fHNwGNfwD8x8FsY9xMjv7nxeXjLpR5cCEk1XqPq2+n6w4j7mJOXhEXGiUIKg== +"@sentry-internal/replay@8.27.0": + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.27.0.tgz#7762647930c3a9b3d99f6d4c486b28f9d3da70c2" + integrity sha512-Ofucncaon98dvlxte2L//hwuG9yILSxNrTz/PmO0k+HzB9q+oBic4667QF+azWR2qv4oKSWpc+vEovP3hVqveA== dependencies: - "@sentry-internal/browser-utils" "8.26.0" - "@sentry/core" "8.26.0" - "@sentry/types" "8.26.0" - "@sentry/utils" "8.26.0" + "@sentry-internal/browser-utils" "8.27.0" + "@sentry/core" "8.27.0" + "@sentry/types" "8.27.0" + "@sentry/utils" "8.27.0" -"@sentry/babel-plugin-component-annotate@2.22.2": - version "2.22.2" - resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.22.2.tgz#f4a1ddea4bcac06584a6cec9a43ec088cbb6caaf" - integrity sha512-6kFAHGcs0npIC4HTt4ULs8uOfEucvMI7VW4hoyk17jhRaW8CbxzxfWCfIeRbDkE8pYwnARaq83tu025Hrk2zgA== +"@sentry/babel-plugin-component-annotate@2.22.3": + version "2.22.3" + resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.22.3.tgz#de4970d51a54ef52b21f0d6ec49bd06bf37753c1" + integrity sha512-OlHA+i+vnQHRIdry4glpiS/xTOtgjmpXOt6IBOUqynx5Jd/iK1+fj+t8CckqOx9wRacO/hru2wfW/jFq0iViLg== -"@sentry/browser@8.26.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.26.0.tgz#749508ca8d1da857930f41430eb3a77102712f46" - integrity sha512-e5s6eKlwLZWzTwQcBwqyAGZMMuQROW9Z677VzwkSyREWAIkKjfH2VBxHATnNGc0IVkNHjD7iH3ixo3C0rLKM3w== +"@sentry/browser@8.27.0": + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.27.0.tgz#997eb6b3c298a659a109704a0fb660eae365cd3a" + integrity sha512-eL1eaHwoYUGkp4mpeYesH6WtCrm+0u9jYCW5Lm0MAeTmpx22BZKEmj0OljuUJXGnJwFbvPDlRjyz6QG11m8kZA== dependencies: - "@sentry-internal/browser-utils" "8.26.0" - "@sentry-internal/feedback" "8.26.0" - "@sentry-internal/replay" "8.26.0" - "@sentry-internal/replay-canvas" "8.26.0" - "@sentry/core" "8.26.0" - "@sentry/types" "8.26.0" - "@sentry/utils" "8.26.0" + "@sentry-internal/browser-utils" "8.27.0" + "@sentry-internal/feedback" "8.27.0" + "@sentry-internal/replay" "8.27.0" + "@sentry-internal/replay-canvas" "8.27.0" + "@sentry/core" "8.27.0" + "@sentry/types" "8.27.0" + "@sentry/utils" "8.27.0" -"@sentry/bundler-plugin-core@2.22.2": - version "2.22.2" - resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.22.2.tgz#bd418541245c5167a439d4e28a84096deb20c512" - integrity sha512-TwEEW4FeEJ5Mamp4fGnktfVjzN77KAW0xFQsEPuxZtOAPG17zX/PGvdyRX/TE1jkZWhTzqUDIdgzqlNLjyEnUw== +"@sentry/bundler-plugin-core@2.22.3": + version "2.22.3" + resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.22.3.tgz#f8c0a25321216ae9777749c1a4b9d982ae1ec2e1" + integrity sha512-DeoUl0WffcqZZRl5Wy9aHvX4WfZbbWt0QbJ7NJrcEViq+dRAI2FQTYECFLwdZi5Gtb3oyqZICO+P7k8wDnzsjQ== dependencies: "@babel/core" "^7.18.5" - "@sentry/babel-plugin-component-annotate" "2.22.2" + "@sentry/babel-plugin-component-annotate" "2.22.3" "@sentry/cli" "^2.33.1" dotenv "^16.3.1" find-up "^5.0.0" @@ -2580,45 +2596,45 @@ magic-string "0.30.8" unplugin "1.0.1" -"@sentry/cli-darwin@2.33.1": - version "2.33.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.33.1.tgz#e4eb1dd01ee3ce2788025426b860ccc63759589c" - integrity sha512-+4/VIx/E1L2hChj5nGf5MHyEPHUNHJ/HoG5RY+B+vyEutGily1c1+DM2bum7RbD0xs6wKLIyup5F02guzSzG8A== +"@sentry/cli-darwin@2.34.1": + version "2.34.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.34.1.tgz#5106ab7eae3fc8218ddcc4d5da209390b4b7edbe" + integrity sha512-SqlCunwhweMDJNKVf3kabiN6FwpvCIffn2cjfaZD0zqZQ3M1tWMJ/kSA0TGfe7lWu9JloNmVm+ArcudGitvX3w== -"@sentry/cli-linux-arm64@2.33.1": - version "2.33.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.33.1.tgz#9ea1718c21ef32ca83b0852ca29fb461fd26d25a" - integrity sha512-DbGV56PRKOLsAZJX27Jt2uZ11QfQEMmWB4cIvxkKcFVE+LJP4MVA+MGGRUL6p+Bs1R9ZUuGbpKGtj0JiG6CoXw== +"@sentry/cli-linux-arm64@2.34.1": + version "2.34.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.34.1.tgz#60ccbd029c63861e45a007026b88c97d8a134205" + integrity sha512-iSl/uNWjKbVPb6ll12SmHG9iGcC3oN8jjzdycm/mD3H/d8DLMloEiaz8lHQnsYCaPiNKwap1ThKlPvnKOU4SNg== -"@sentry/cli-linux-arm@2.33.1": - version "2.33.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.33.1.tgz#e8a1dca4d008dd6a72ab5935304c104e98e2901c" - integrity sha512-zbxEvQju+tgNvzTOt635le4kS/Fbm2XC2RtYbCTs034Vb8xjrAxLnK0z1bQnStUV8BkeBHtsNVrG+NSQDym2wg== +"@sentry/cli-linux-arm@2.34.1": + version "2.34.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.34.1.tgz#b52880718df35c99972dc870aefd9ef49b63d6cd" + integrity sha512-CDhtFbUs16CoU10wEbxnn/pEuenFIMosTcxI7v0gWp3Wo0B2h0bOsLEk9dlT0YsqRTAldKUzef9AVX82m5Svwg== -"@sentry/cli-linux-i686@2.33.1": - version "2.33.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.33.1.tgz#f1fe8dd4d6dde0812a94fba31de8054ddfb7284a" - integrity sha512-g2LS4oPXkPWOfKWukKzYp4FnXVRRSwBxhuQ9eSw2peeb58ZIObr4YKGOA/8HJRGkooBJIKGaAR2mH2Pk1TKaiA== +"@sentry/cli-linux-i686@2.34.1": + version "2.34.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.34.1.tgz#5ff75602350a6b803d9e9b8d20abb55d230de009" + integrity sha512-jq5o49pgzJFv/CQtvx4FLVO1xra22gzP76FtmvPwEhZQhJT6QduW9fpnvVDnOaY8YLzC7GAeszUV6sqZ0MZUqg== -"@sentry/cli-linux-x64@2.33.1": - version "2.33.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.33.1.tgz#6e086675356a9eb79731bf9e447d078bae1b5adf" - integrity sha512-IV3dcYV/ZcvO+VGu9U6kuxSdbsV2kzxaBwWUQxtzxJ+cOa7J8Hn1t0koKGtU53JVZNBa06qJWIcqgl4/pCuKIg== +"@sentry/cli-linux-x64@2.34.1": + version "2.34.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.34.1.tgz#e620a5bfe46479df37ea96760679fd8e8e85cc80" + integrity sha512-O99RAkrcMErWLPRdza6HaG7kmHCx9MYFNDX6FLrAgSP3oz+X3ral1oDTIrMs4hVbPDK287ZGAqCJtk+1iOjEBg== -"@sentry/cli-win32-i686@2.33.1": - version "2.33.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.33.1.tgz#0e6b36c4a2f5f6e85a59247a123d276b3ef10f1a" - integrity sha512-F7cJySvkpzIu7fnLKNHYwBzZYYwlhoDbAUnaFX0UZCN+5DNp/5LwTp37a5TWOsmCaHMZT4i9IO4SIsnNw16/zQ== +"@sentry/cli-win32-i686@2.34.1": + version "2.34.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.34.1.tgz#0d1897f74dc7318bbf5cbac3865208ca0cb77d03" + integrity sha512-yEeuneEVmExCbWlnSauhIg8wZDfKxRaou8XRfM6oPlSBu0XO5HUI3uRK5t2xT0zX8Syzh2kCZpdVE1KLavVeKA== -"@sentry/cli-win32-x64@2.33.1": - version "2.33.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.33.1.tgz#2d00b38a2dd9f3355df91825582ada3ea0034e86" - integrity sha512-8VyRoJqtb2uQ8/bFRKNuACYZt7r+Xx0k2wXRGTyH05lCjAiVIXn7DiS2BxHFty7M1QEWUCMNsb/UC/x/Cu2wuA== +"@sentry/cli-win32-x64@2.34.1": + version "2.34.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.34.1.tgz#40a5f9aba47c1e3b20dd10982643004f89b0d918" + integrity sha512-mU48VpDTwRgt7/Pf3vk/P87m4kM3XEXHHHfq9EvHCTspFF6GtMfL9njZ7+5Z+7ko852JS4kpunjZtsxmoP4/zA== "@sentry/cli@^2.33.1": - version "2.33.1" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.33.1.tgz#cfbdffdd896b05b92a659baf435b5607037af928" - integrity sha512-dUlZ4EFh98VFRPJ+f6OW3JEYQ7VvqGNMa0AMcmvk07ePNeK/GicAWmSQE4ZfJTTl80ul6HZw1kY01fGQOQlVRA== + version "2.34.1" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.34.1.tgz#5c68db72deb6a00438be46e0d3d58ba02db6bace" + integrity sha512-hAHvu+XH1kn1ee2NUWvuqAZenK/MrxqQzeIrIYATqF2XGjtSOr7irjAKWjd97/vXdLHA6TBnMW1wHwLcuJK2tg== dependencies: https-proxy-agent "^5.0.0" node-fetch "^2.6.7" @@ -2626,51 +2642,51 @@ proxy-from-env "^1.1.0" which "^2.0.2" optionalDependencies: - "@sentry/cli-darwin" "2.33.1" - "@sentry/cli-linux-arm" "2.33.1" - "@sentry/cli-linux-arm64" "2.33.1" - "@sentry/cli-linux-i686" "2.33.1" - "@sentry/cli-linux-x64" "2.33.1" - "@sentry/cli-win32-i686" "2.33.1" - "@sentry/cli-win32-x64" "2.33.1" + "@sentry/cli-darwin" "2.34.1" + "@sentry/cli-linux-arm" "2.34.1" + "@sentry/cli-linux-arm64" "2.34.1" + "@sentry/cli-linux-i686" "2.34.1" + "@sentry/cli-linux-x64" "2.34.1" + "@sentry/cli-win32-i686" "2.34.1" + "@sentry/cli-win32-x64" "2.34.1" -"@sentry/core@8.26.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.26.0.tgz#0673a9e2c5b699cf1bde1ed073a345cc393577da" - integrity sha512-g/tVmTZD4GNbLFf++hKJfBpcCAtduFEMLnbfa9iT/QEZjlmP+EzY+GsH9bafM5VsNe8DiOUp+kJKWtShzlVdBA== +"@sentry/core@8.27.0": + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.27.0.tgz#a0ebe31cdd9313186a14d9738238ed9cf7a59c01" + integrity sha512-4frlXluHT3Du+Omw91K04jpvbfMtydvg4Bxj2+gt/DT19Swhm/fbEpzdUjgbAd3Jinj/n0qk/jFRXjr9JZKFjg== dependencies: - "@sentry/types" "8.26.0" - "@sentry/utils" "8.26.0" + "@sentry/types" "8.27.0" + "@sentry/utils" "8.27.0" "@sentry/react@^8.0.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.26.0.tgz#b4e72b9759fbf7d3c5ed37bb5ceb2e94b0d10fd1" - integrity sha512-dYoC0xzcqq8zmNMFoTWidhA7mVd3RDz/nAUn6C8yK/hkKA7bUknYCkhpESGLZfHaGwSKzeXRXKd/o/cgUVM9eA== + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.27.0.tgz#3ff4b8ece65af170fe32102ecb8847b53c675ffd" + integrity sha512-8pD+J9UVnSGmPnm5dHJup5OVsHTN/pL4Ozi01yyrpivLkQiMZNac3OXsc0C7zXnztfLQx0kmTyCOzbRROfbpnA== dependencies: - "@sentry/browser" "8.26.0" - "@sentry/core" "8.26.0" - "@sentry/types" "8.26.0" - "@sentry/utils" "8.26.0" + "@sentry/browser" "8.27.0" + "@sentry/core" "8.27.0" + "@sentry/types" "8.27.0" + "@sentry/utils" "8.27.0" hoist-non-react-statics "^3.3.2" -"@sentry/types@8.26.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.26.0.tgz#c999fdd9e52587570f723d2370244bad8f79b571" - integrity sha512-zKmh6SWsJh630rpt7a9vP4Cm4m1C2gDTUqUiH565CajCL/4cePpNWYrNwalSqsOSL7B9OrczA1+n6a6XvND+ng== +"@sentry/types@8.27.0": + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.27.0.tgz#a5c7d2877c6c3620f812b2b31377b58d390b89d4" + integrity sha512-B6lrP46+m2x0lfqWc9F4VcUbN893mVGnPEd7KIMRk95mPzkFJ3sNxggTQF5/ZfNO7lDQYQb22uysB5sj/BqFiw== -"@sentry/utils@8.26.0": - version "8.26.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.26.0.tgz#c6629f0f2bc8cbc4fddd124770e9063b4e2d1c65" - integrity sha512-xvlPU9Hd2BlyT+FhWHGNwnxWqdVRk2AHnDtVcW4Ma0Ri5EwS+uy4Jeik5UkSv8C5RVb9VlxFmS8LN3I1MPJsLw== +"@sentry/utils@8.27.0": + version "8.27.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.27.0.tgz#308f6cc34acac175c500e4dd5b5007cdb621c79e" + integrity sha512-gyJM3SyLQe0A3mkQVVNdKYvk3ZoikkYgyA/D+5StFNLKdyUgEbJgXOGXrQSSYPF7BSX6Sc5b0KHCglPII0KuKw== dependencies: - "@sentry/types" "8.26.0" + "@sentry/types" "8.27.0" "@sentry/vite-plugin@^2.0.0": - version "2.22.2" - resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-2.22.2.tgz#9d0ca7b3dc29616457c3d0a22e4885506e32184d" - integrity sha512-LJSNTw75UJq77v2jCan8cRh0w1u6W30jxQsbqF7YyyhhfjPTyFUXYday9RDDe84qDEnspbZmgeTSWTvaTGsBRg== + version "2.22.3" + resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-2.22.3.tgz#b52802412b6f3d8e3e56742afc9624d9babae5b6" + integrity sha512-+5bsLFRKOZzBp68XigoNE1pJ3tJ4gt2jXluApu54ui0N/yjfqGQ7LQTD7nL4tmJvB5Agwi0e7M7+fcxe9gSgBA== dependencies: - "@sentry/bundler-plugin-core" "2.22.2" + "@sentry/bundler-plugin-core" "2.22.3" unplugin "1.0.1" "@snyk/github-codeowners@1.1.0": @@ -2780,9 +2796,9 @@ pretty-format "^27.0.2" "@testing-library/react@^16.0.0": - version "16.0.0" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-16.0.0.tgz#0a1e0c7a3de25841c3591b8cb7fb0cf0c0a27321" - integrity sha512-guuxUKRWQ+FgNX0h0NS0FIq3Q3uLtWVpBzcLOggmfMoUpgBnzBzvLLd4fbm6yS8ydJd94cIfY4yP9qUQjM2KwQ== + version "16.0.1" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-16.0.1.tgz#29c0ee878d672703f5e7579f239005e4e0faa875" + integrity sha512-dSmwJVtJXmku+iocRhWOUFbrERC76TX2Mnf0ATODz8brzAZrMBbzLwQixlBSanZxR6LddK3eiwpSFZgDET1URg== dependencies: "@babel/runtime" "^7.12.5" @@ -2893,9 +2909,9 @@ undici-types "~6.13.0" "@types/node@^20.0.0": - version "20.16.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.1.tgz#0b44b15271d0e2191ca68faf1fbe506e06aed732" - integrity sha512-zJDo7wEadFtSyNz5QITDfRcrhqDvQI1xQNQ0VoizPjM/dVAODqqIUWbJPkvsxmTI0MYRGRikcdjMPhOssnPejQ== + version "20.16.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.3.tgz#7b4f9a37091cf03a0c2561bf76a9a55f03f4f523" + integrity sha512-/wdGiWRkMOm53gAsSyFMXFZHbVg7C6CbkrzHNpaHoYfsUWPg7m6ZRKtvQjgvQ9i8WT540a3ydRlRQbxjY30XxQ== dependencies: undici-types "~6.19.2" @@ -3627,9 +3643,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001646: - version "1.0.30001653" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz#b8af452f8f33b1c77f122780a4aecebea0caca56" - integrity sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw== + version "1.0.30001655" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz#0ce881f5a19a2dcfda2ecd927df4d5c1684b982f" + integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg== chai@^5.1.1: version "5.1.1" @@ -4401,9 +4417,9 @@ esbuild@^0.23.0: "@esbuild/win32-x64" "0.23.0" escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^1.0.5: version "1.0.5" @@ -5732,9 +5748,9 @@ keyv@^4.5.3: json-buffer "3.0.1" knip@^5.27.2: - version "5.27.2" - resolved "https://registry.yarnpkg.com/knip/-/knip-5.27.2.tgz#8a5a569a5baac0ab2e06dbd5454f07608ccb1952" - integrity sha512-Mya1XEDq1oygibQf0uocQd02Fil8RtvNVhcFAcxypjcc6zakT7wsJtS0xvuwEitilfI0tiFC9PghmJQ3DMKuTg== + version "5.29.1" + resolved "https://registry.yarnpkg.com/knip/-/knip-5.29.1.tgz#596ba9aea44fb56d89c9cc7d73e2522d50280713" + integrity sha512-l8qFtRqNpCk8xf46VOwhBUva7LBwanoGPJ4KQNwVRl6hmEXStf1BJlfbYRZ+yQpbilbIV6LN+ztX6LaGtyd4TQ== dependencies: "@nodelib/fs.walk" "1.2.8" "@snyk/github-codeowners" "1.1.0" @@ -5967,9 +5983,9 @@ merge2@^1.3.0, merge2@^1.4.1: integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: - version "4.0.7" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" - integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" picomatch "^2.3.1" @@ -6718,18 +6734,18 @@ postcss-value-parser@^4.2.0: integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss@^8.4.41: - version "8.4.41" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681" - integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== + version "8.4.44" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.44.tgz#d56834ef6508610ba224bb22b2457b2169ed0480" + integrity sha512-Aweb9unOEpQ3ezu4Q00DPvvM2ZTUitJdNKeP/+uQgr1IBIqu574IaZoURId7BKtWMREwzKa9OgzPzezWGPWFQw== dependencies: nanoid "^3.3.7" picocolors "^1.0.1" source-map-js "^1.2.0" posthog-js@^1.29.0: - version "1.157.2" - resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.157.2.tgz#dc2515818ead408aefb900e90c535fb57beb1f59" - integrity sha512-ATYKGs+Q51u26nHHhrhWNh1whqFm7j/rwQQYw+y6/YzNmRlo+YsqrGZji9nqXb9/4fo0ModDr+ZmuOI3hKkUXA== + version "1.160.1" + resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.160.1.tgz#6ef51351190c6bfc246c16799c83ba8bf8d4cd9f" + integrity sha512-OfzFSArlkSEUxQzL9+2qulbkJsVFAvpgb7rQaWBGtlY3qPKfdND+ak79rZkVPZHkP0JOh4keAM6xE4ZxLesvXA== dependencies: fflate "^0.4.8" preact "^10.19.3" From 12237c469fc27afea702d495ae614aff1e36141a Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 2 Sep 2024 17:52:01 +0200 Subject: [PATCH 29/33] Update src/QrCode.module.css Co-authored-by: Timo <16718859+toger5@users.noreply.github.com> --- src/QrCode.module.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/QrCode.module.css b/src/QrCode.module.css index 5b9cd340..500490bf 100644 --- a/src/QrCode.module.css +++ b/src/QrCode.module.css @@ -17,4 +17,5 @@ limitations under the License. .qrCode img { max-width: 100%; image-rendering: pixelated; + border-radius: var(--cpd-space-4x); } From 922fe5bafd04213f6bdcff0e05e2def9ce2b5a3d Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Mon, 2 Sep 2024 21:42:50 +0200 Subject: [PATCH 30/33] Fix (registration flow): logout old before creating new client as required by initClient. (#2604) --- src/auth/RegisterPage.tsx | 2 +- src/auth/useInteractiveRegistration.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/auth/RegisterPage.tsx b/src/auth/RegisterPage.tsx index fc3d5b00..a7231300 100644 --- a/src/auth/RegisterPage.tsx +++ b/src/auth/RegisterPage.tsx @@ -56,7 +56,7 @@ export const RegisterPage: FC = () => { const [error, setError] = useState(); const [password, setPassword] = useState(""); const [passwordConfirmation, setPasswordConfirmation] = useState(""); - const { recaptchaKey, register } = useInteractiveRegistration(); + const { recaptchaKey, register } = useInteractiveRegistration(client); const { execute, reset, recaptchaId } = useRecaptcha(recaptchaKey); const onSubmitRegisterForm = useCallback( diff --git a/src/auth/useInteractiveRegistration.ts b/src/auth/useInteractiveRegistration.ts index 57c62355..6b753363 100644 --- a/src/auth/useInteractiveRegistration.ts +++ b/src/auth/useInteractiveRegistration.ts @@ -27,7 +27,9 @@ import { Session } from "../ClientContext"; import { Config } from "../config/Config"; import { widget } from "../widget"; -export const useInteractiveRegistration = (): { +export const useInteractiveRegistration = ( + oldClient?: MatrixClient, +): { privacyPolicyUrl?: string; recaptchaKey?: string; register: ( @@ -105,7 +107,7 @@ export const useInteractiveRegistration = (): { /* eslint-disable camelcase,@typescript-eslint/no-explicit-any */ const { user_id, access_token, device_id } = (await interactiveAuth.attemptAuth()) as any; - + await oldClient?.logout(true); const client = await initClient( { baseUrl: Config.defaultHomeserverUrl()!, @@ -136,7 +138,7 @@ export const useInteractiveRegistration = (): { return [client, session]; }, - [], + [oldClient], ); return { privacyPolicyUrl, recaptchaKey, register }; From 5ebbb7b711810f1c23d341b0a231e4bed45c2be8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 20:29:29 +0000 Subject: [PATCH 31/33] Update dependency livekit-client to v2.5.1 --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index f754c054..d0e52872 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1887,10 +1887,10 @@ clsx "2.1.1" usehooks-ts "3.1.0" -"@livekit/protocol@1.20.0": - version "1.20.0" - resolved "https://registry.yarnpkg.com/@livekit/protocol/-/protocol-1.20.0.tgz#5d98c5acdaf4cc6f8fbfeb627a06a7e83b294ef5" - integrity sha512-2RJQwzBa+MfUoy0zBWuyj8S2MTBxeTgREeG0r/1bNmkAFiBhsdgr87gIvblyqJxffUxJpALMu1Ee0M1XHX+9Ug== +"@livekit/protocol@1.20.1": + version "1.20.1" + resolved "https://registry.yarnpkg.com/@livekit/protocol/-/protocol-1.20.1.tgz#05706d6e077771e7ee512c47fcdc58fd5be8b539" + integrity sha512-TgyuwOx+XJn9inEYT9OKfFNs9YIPS4BdLa4pF5FDf9MhWRnahKwPe7jxr/+sVdWxYbZmy9hRrH58jSAFu0ONHw== dependencies: "@bufbuild/protobuf" "^1.7.2" @@ -5841,11 +5841,11 @@ lines-and-columns@^1.1.6: integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== livekit-client@^2.0.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-2.5.0.tgz#dc689ab68dbcc54c860b141234aae74cd286e07d" - integrity sha512-4E8wiTstl2KLilYmrBgBy8G328Y6A92ysv6SLXkz/k54n4xguL5RS3qdmKNkPFbiL5xW22yw6dwf4Vf/j34eOA== + version "2.5.1" + resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-2.5.1.tgz#c5a6bcc7069133e71ed1f3dd3e397a7480cf24b3" + integrity sha512-D7BzGoO3nc7/H2pEP9hseTjpzfgUoQ1AdeUNdlM7XNEywvorY1UR6RhOWH9UvycM/D5tIIRx7OvhxzpVfHE3TA== dependencies: - "@livekit/protocol" "1.20.0" + "@livekit/protocol" "1.20.1" events "^3.3.0" loglevel "^1.8.0" sdp-transform "^2.14.1" From 55038065c73c6b7a43de6dd5ca0a6e65d9d3e039 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 3 Sep 2024 05:04:59 -0400 Subject: [PATCH 32/33] Remove a test debug log (#2597) --- src/Toast.test.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Toast.test.tsx b/src/Toast.test.tsx index b88fbee5..e2e2f9f7 100644 --- a/src/Toast.test.tsx +++ b/src/Toast.test.tsx @@ -47,12 +47,11 @@ describe("Toast", () => { test("dismisses when Esc is pressed", async () => { const user = userEvent.setup({ document: window.document }); const onDismiss = vi.fn(); - const { debug } = render( + render( Hello world! , ); - debug(); await user.keyboard("[Escape]"); expect(onDismiss).toHaveBeenCalled(); }); From c2cc0937c11991b56d2cd6571552684298b4caa8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:14:27 +0200 Subject: [PATCH 33/33] Update typescript-eslint monorepo to v8 (major) (#2523) * Update typescript-eslint monorepo to v8 * es lint fixes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Timo --- package.json | 4 +- src/analytics/PosthogSpanProcessor.ts | 2 +- src/home/useGroupCallRooms.ts | 3 +- src/livekit/useECConnectionState.ts | 1 + src/otel/OTelCallAbstractMediaStreamSpan.ts | 2 +- src/otel/ObjectFlattener.ts | 2 +- src/settings/rageshake.ts | 4 +- src/settings/settings.ts | 5 +- src/settings/submit-rageshake.ts | 16 ++- src/utils/matrix.ts | 4 +- yarn.lock | 135 ++++++++------------ 11 files changed, 82 insertions(+), 96 deletions(-) diff --git a/package.json b/package.json index 5e7f25e0..e6f478c7 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "@types/react-router-dom": "^5.3.3", "@types/sdp-transform": "^2.4.5", "@types/uuid": "10", - "@typescript-eslint/eslint-plugin": "^7.0.0", - "@typescript-eslint/parser": "^7.0.0", + "@typescript-eslint/eslint-plugin": "^8.0.0", + "@typescript-eslint/parser": "^8.0.0", "@use-gesture/react": "^10.2.11", "@vector-im/compound-design-tokens": "^1.0.0", "@vector-im/compound-web": "^6.0.0", diff --git a/src/analytics/PosthogSpanProcessor.ts b/src/analytics/PosthogSpanProcessor.ts index 8904b3e1..59960c92 100644 --- a/src/analytics/PosthogSpanProcessor.ts +++ b/src/analytics/PosthogSpanProcessor.ts @@ -72,7 +72,7 @@ export class PosthogSpanProcessor implements SpanProcessor { try { return JSON.parse(data); } catch (e) { - logger.warn("Invalid prev call data", data); + logger.warn("Invalid prev call data", data, "error:", e); return null; } } diff --git a/src/home/useGroupCallRooms.ts b/src/home/useGroupCallRooms.ts index e4cfa109..4c481543 100644 --- a/src/home/useGroupCallRooms.ts +++ b/src/home/useGroupCallRooms.ts @@ -134,7 +134,7 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] { useEffect(() => { function updateRooms(): void { - // We want to show all rooms that historically had a call and which we are (can become) part of. + // We want to show all rooms that historically had a call and which we are (or can become) part of. const rooms = client .getRooms() .filter(roomHasCallMembershipEvents) @@ -142,7 +142,6 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] { const sortedRooms = sortRooms(client, rooms); const items = sortedRooms.map((room) => { const session = client.matrixRTC.getRoomSession(room); - session.memberships; return { roomAlias: room.getCanonicalAlias() ?? undefined, roomName: room.name, diff --git a/src/livekit/useECConnectionState.ts b/src/livekit/useECConnectionState.ts index c2bd0aa7..9afb2578 100644 --- a/src/livekit/useECConnectionState.ts +++ b/src/livekit/useECConnectionState.ts @@ -115,6 +115,7 @@ async function doConnect( await connectAndPublish(livekitRoom, sfuConfig, preCreatedAudioTrack, []); } catch (e) { preCreatedAudioTrack?.stop(); + logger.warn("Stopped precreated audio tracks.", e); } } diff --git a/src/otel/OTelCallAbstractMediaStreamSpan.ts b/src/otel/OTelCallAbstractMediaStreamSpan.ts index c34f963c..3ecb6b28 100644 --- a/src/otel/OTelCallAbstractMediaStreamSpan.ts +++ b/src/otel/OTelCallAbstractMediaStreamSpan.ts @@ -67,7 +67,7 @@ export abstract class OTelCallAbstractMediaStreamSpan { }); } - public abstract update(data: Object): void; + public abstract update(data: object): void; public end(): void { this.trackSpans.forEach((tSpan) => { diff --git a/src/otel/ObjectFlattener.ts b/src/otel/ObjectFlattener.ts index 76de9e3a..6c0326bf 100644 --- a/src/otel/ObjectFlattener.ts +++ b/src/otel/ObjectFlattener.ts @@ -74,7 +74,7 @@ export class ObjectFlattener { } public static flattenObjectRecursive( - obj: Object, + obj: object, flatObject: Attributes, prefix: string, depth: number, diff --git a/src/settings/rageshake.ts b/src/settings/rageshake.ts index 0b0365a7..bf6909fb 100644 --- a/src/settings/rageshake.ts +++ b/src/settings/rageshake.ts @@ -505,7 +505,9 @@ function tryInitStorage(): Promise { let indexedDB; try { indexedDB = window.indexedDB; - } catch (e) {} + } catch (e) { + logger.warn("Could not get indexDB from window.", e); + } if (indexedDB) { global.mx_rage_store = new IndexedDBLogStore( diff --git a/src/settings/settings.ts b/src/settings/settings.ts index 9c181ccf..47ca9816 100644 --- a/src/settings/settings.ts +++ b/src/settings/settings.ts @@ -30,7 +30,10 @@ export class Setting { try { initialValue = JSON.parse(storedValue); } catch (e) { - logger.warn(`Invalid value stored for setting ${key}: ${storedValue}`); + logger.warn( + `Invalid value stored for setting ${key}: ${storedValue}.`, + e, + ); } } diff --git a/src/settings/submit-rageshake.ts b/src/settings/submit-rageshake.ts index 3a98b831..adae3f0d 100644 --- a/src/settings/submit-rageshake.ts +++ b/src/settings/submit-rageshake.ts @@ -85,7 +85,9 @@ export function useSubmitRageshake(): { try { // MDN claims broad support across browsers touchInput = String(window.matchMedia("(pointer: coarse)").matches); - } catch (e) {} + } catch (e) { + logger.warn("Could not get coarse pointer for rageshake submit.", e); + } let description = opts.rageshakeRequestId ? `Rageshake ${opts.rageshakeRequestId}` @@ -216,7 +218,9 @@ export function useSubmitRageshake(): { "storageManager_persisted", String(await navigator.storage.persisted()), ); - } catch (e) {} + } catch (e) { + logger.warn("coulr not get navigator peristed storage", e); + } } else if (document.hasStorageAccess) { // Safari try { @@ -224,7 +228,9 @@ export function useSubmitRageshake(): { "storageManager_persisted", String(await document.hasStorageAccess()), ); - } catch (e) {} + } catch (e) { + logger.warn("could not get storage access", e); + } } if (navigator.storage && navigator.storage.estimate) { @@ -244,7 +250,9 @@ export function useSubmitRageshake(): { ); }); } - } catch (e) {} + } catch (e) { + logger.warn("could not obatain storage estimate", e); + } } if (opts.sendLogs) { diff --git a/src/utils/matrix.ts b/src/utils/matrix.ts index f27067bf..936a69e2 100644 --- a/src/utils/matrix.ts +++ b/src/utils/matrix.ts @@ -86,7 +86,9 @@ export async function initClient( let indexedDB: IDBFactory | undefined; try { indexedDB = window.indexedDB; - } catch (e) {} + } catch (e) { + logger.warn("Could not get indexDB from window.", e); + } // options we always pass to the client (stuff that we need in order to work) const baseOpts = { diff --git a/yarn.lock b/yarn.lock index a0d03922..11b2e1fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2989,85 +2989,85 @@ resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-10.0.0.tgz#e9c07fe50da0f53dc24970cca94d619ff03f6f6d" integrity sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ== -"@typescript-eslint/eslint-plugin@^7.0.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz#b16d3cf3ee76bf572fdf511e79c248bdec619ea3" - integrity sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw== +"@typescript-eslint/eslint-plugin@^8.0.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz#726627fad16d41d20539637efee8c2329fe6be32" + integrity sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.18.0" - "@typescript-eslint/type-utils" "7.18.0" - "@typescript-eslint/utils" "7.18.0" - "@typescript-eslint/visitor-keys" "7.18.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/type-utils" "8.3.0" + "@typescript-eslint/utils" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^7.0.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.18.0.tgz#83928d0f1b7f4afa974098c64b5ce6f9051f96a0" - integrity sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg== +"@typescript-eslint/parser@^8.0.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.3.0.tgz#3c72c32bc909cb91ce3569e7d11d729ad84deafa" + integrity sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ== dependencies: - "@typescript-eslint/scope-manager" "7.18.0" - "@typescript-eslint/types" "7.18.0" - "@typescript-eslint/typescript-estree" "7.18.0" - "@typescript-eslint/visitor-keys" "7.18.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz#c928e7a9fc2c0b3ed92ab3112c614d6bd9951c83" - integrity sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA== +"@typescript-eslint/scope-manager@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz#834301d2e70baf924c26818b911bdc40086f7468" + integrity sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg== dependencies: - "@typescript-eslint/types" "7.18.0" - "@typescript-eslint/visitor-keys" "7.18.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" -"@typescript-eslint/type-utils@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz#2165ffaee00b1fbbdd2d40aa85232dab6998f53b" - integrity sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA== +"@typescript-eslint/type-utils@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz#c1ae6af8c21a27254321016b052af67ddb44a9ac" + integrity sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg== dependencies: - "@typescript-eslint/typescript-estree" "7.18.0" - "@typescript-eslint/utils" "7.18.0" + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/utils" "8.3.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9" - integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ== +"@typescript-eslint/types@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.3.0.tgz#378e62447c2d7028236e55a81d3391026600563b" + integrity sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw== -"@typescript-eslint/typescript-estree@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz#b5868d486c51ce8f312309ba79bdb9f331b37931" - integrity sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA== +"@typescript-eslint/typescript-estree@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz#3e3d38af101ba61a8568f034733b72bfc9f176b9" + integrity sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA== dependencies: - "@typescript-eslint/types" "7.18.0" - "@typescript-eslint/visitor-keys" "7.18.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" debug "^4.3.4" - globby "^11.1.0" + fast-glob "^3.3.2" is-glob "^4.0.3" minimatch "^9.0.4" semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f" - integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw== +"@typescript-eslint/utils@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.3.0.tgz#b10972319deac5959c7a7075d0cf2b5e1de7ec08" + integrity sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "7.18.0" - "@typescript-eslint/types" "7.18.0" - "@typescript-eslint/typescript-estree" "7.18.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/typescript-estree" "8.3.0" -"@typescript-eslint/visitor-keys@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz#0564629b6124d67607378d0f0332a0495b25e7d7" - integrity sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg== +"@typescript-eslint/visitor-keys@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz#320d747d107af1eef1eb43fbc4ccdbddda13068b" + integrity sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA== dependencies: - "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/types" "8.3.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -3344,11 +3344,6 @@ array-includes@^3.1.7: get-intrinsic "^1.2.1" is-string "^1.0.7" -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - array.prototype.findlast@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" @@ -4121,13 +4116,6 @@ dijkstrajs@^1.0.1: resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz#4c8dbdea1f0f6478bff94d9c49c784d623e4fc23" integrity sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA== -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -4726,7 +4714,7 @@ fast-fifo@^1.3.2: resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== -fast-glob@^3.2.9, fast-glob@^3.3.2: +fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -5047,18 +5035,6 @@ globalthis@^1.0.3: define-properties "^1.2.1" gopd "^1.0.1" -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -6013,7 +5989,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0, merge2@^1.4.1: +merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -7457,11 +7433,6 @@ signal-exit@^4.0.1, signal-exit@^4.1.0: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - smol-toml@^1.1.4: version "1.3.0" resolved "https://registry.yarnpkg.com/smol-toml/-/smol-toml-1.3.0.tgz#5200e251fffadbb72570c84e9776d2a3eca48143"