From 98686edfd3fb55cb80a79d581a781c56c003593b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:00:21 -0500 Subject: [PATCH 01/14] CHORE(NPM) - bump @leafygreen-ui/code from 14.0.1 to 14.2.18 (#2207) --- package.json | 2 +- yarn.lock | 118 ++++++++++++++++++++------------------------------- 2 files changed, 48 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index e02774b734..2ed7049c1b 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@leafygreen-ui/callout": "9.0.13", "@leafygreen-ui/card": "10.0.5", "@leafygreen-ui/checkbox": "12.0.5", - "@leafygreen-ui/code": "14.0.1", + "@leafygreen-ui/code": "14.2.18", "@leafygreen-ui/combobox": "7.0.1", "@leafygreen-ui/confirmation-modal": "5.0.6", "@leafygreen-ui/emotion": "4.0.7", diff --git a/yarn.lock b/yarn.lock index 61a59c198c..e4ba48bafa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3169,7 +3169,7 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== -"@leafygreen-ui/a11y@^1.3.4", "@leafygreen-ui/a11y@^1.4.10", "@leafygreen-ui/a11y@^1.4.11", "@leafygreen-ui/a11y@^1.4.2", "@leafygreen-ui/a11y@^1.4.3", "@leafygreen-ui/a11y@^1.4.7", "@leafygreen-ui/a11y@^1.4.8": +"@leafygreen-ui/a11y@^1.3.4", "@leafygreen-ui/a11y@^1.4.10", "@leafygreen-ui/a11y@^1.4.11", "@leafygreen-ui/a11y@^1.4.2", "@leafygreen-ui/a11y@^1.4.3": version "1.4.11" resolved "https://registry.yarnpkg.com/@leafygreen-ui/a11y/-/a11y-1.4.11.tgz#5ebaa4a4a1bf99e2c3d6d9cb08f6b4983f2b2d59" integrity sha512-mzNMR4ci3ExdCY3Ec1kr7xH4nV02uamoohbWxcI9qSd41TFskaDAZSXO9PL9S8JosQXjpRkt0f470XvVE0kEXQ== @@ -3206,11 +3206,6 @@ resolved "https://registry.yarnpkg.com/@leafygreen-ui/box/-/box-3.1.4.tgz#6ff56c8c205f83018373c9c0fe8f49681097dc0a" integrity sha512-cdEXGEafHuaH4zGx3NTX1bMOQ52EpoWA595BC1hh4/8BmXL+H4NFMGywuhZnvYjC4lyVGauX6sCspxrunbmfMQ== -"@leafygreen-ui/box@^3.1.7": - version "3.1.7" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/box/-/box-3.1.7.tgz#830150ed836cd941cfb2787264a3d1c16f1fe648" - integrity sha512-7uW6pxJaxKES8/ijQOcNSL0HpRAiBfaBdFamUAP+TaU9vvllG4cnzZlAfLdNKTWufJy5uWp7eNoE//7KPFLj+w== - "@leafygreen-ui/box@^3.1.8": version "3.1.8" resolved "https://registry.yarnpkg.com/@leafygreen-ui/box/-/box-3.1.8.tgz#33e6dedbe3ee510ce88ffade0a3a9e68a96103a9" @@ -3229,20 +3224,7 @@ "@leafygreen-ui/tokens" "^2.1.4" polished "^4.2.2" -"@leafygreen-ui/button@^19.0.1": - version "19.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/button/-/button-19.0.4.tgz#f94ea61608e56020358ac3f8cd66669f125dff64" - integrity sha512-T72lmAHS63cvhyAKaO53tNysL3xDsjnmIoaP0I55eOFOYlEy522U7vf0RMi/BsOePyAJak+x9yZ4uj8AWMCsbg== - dependencies: - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.0.0" - "@leafygreen-ui/palette" "^3.4.7" - "@leafygreen-ui/ripple" "^1.1.8" - "@leafygreen-ui/tokens" "^2.0.0" - polished "^4.2.2" - -"@leafygreen-ui/button@^21.0.10", "@leafygreen-ui/button@^21.0.3", "@leafygreen-ui/button@^21.0.5": +"@leafygreen-ui/button@^21.0.10", "@leafygreen-ui/button@^21.0.11", "@leafygreen-ui/button@^21.0.3", "@leafygreen-ui/button@^21.0.5": version "21.0.11" resolved "https://registry.yarnpkg.com/@leafygreen-ui/button/-/button-21.0.11.tgz#a1cfa56226d9ccdf43945441340013ff02c55fbe" integrity sha512-NJhllsXO7jAJoAou9kPIk/B8ODYUrGxr4l4TceoAwAM3cW0kZ5kys9KA+0TOmG2AxNKLcElLu+wCg3TbssFk+Q== @@ -3343,21 +3325,23 @@ "@leafygreen-ui/palette" "^4.0.7" "@leafygreen-ui/tokens" "^2.2.0" -"@leafygreen-ui/code@14.0.1": - version "14.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/code/-/code-14.0.1.tgz#1959bb07bb98a428d63afb8753c31b6ce7a0c772" - integrity sha512-ZzZIbM6tMDmkNHkQuQIUk4oBV5Mgq8RzO35V2R33sVA/sZFGom5iN/IW/U3c61FNuRHEptfH7Y2+3aOcWPOrAA== +"@leafygreen-ui/code@14.2.18": + version "14.2.18" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/code/-/code-14.2.18.tgz#7ade044ca8c9ff1c5bb9332021a57278d56b5292" + integrity sha512-vtAEzURQ/Or8G9vBjsjN4aCWoysHr/Ny/3ewEcLRpz66vkC0kplArdnmG5dVSmklzImU4jKa+QOeM74l3DTHUQ== dependencies: - "@leafygreen-ui/a11y" "^1.3.4" - "@leafygreen-ui/button" "^19.0.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.3.3" - "@leafygreen-ui/icon" "^11.12.1" - "@leafygreen-ui/icon-button" "^15.0.1" - "@leafygreen-ui/lib" "^10.0.0" - "@leafygreen-ui/palette" "^3.4.4" - "@leafygreen-ui/select" "^10.1.0" - "@leafygreen-ui/tokens" "^1.4.0" + "@leafygreen-ui/a11y" "^1.4.11" + "@leafygreen-ui/button" "^21.0.11" + "@leafygreen-ui/emotion" "^4.0.7" + "@leafygreen-ui/hooks" "^8.0.0" + "@leafygreen-ui/icon" "^11.25.1" + "@leafygreen-ui/icon-button" "^15.0.19" + "@leafygreen-ui/lib" "^13.1.0" + "@leafygreen-ui/palette" "^4.0.7" + "@leafygreen-ui/select" "^11.0.1" + "@leafygreen-ui/tokens" "^2.2.0" + "@types/facepaint" "^1.2.1" + "@types/highlight.js" "^10.1.0" clipboard "^2.0.6" facepaint "^1.2.1" highlight.js "~11.5.0" @@ -3473,33 +3457,7 @@ "@leafygreen-ui/palette" "^3.4.7" "@leafygreen-ui/tokens" "^2.0.0" -"@leafygreen-ui/icon-button@^15.0.1", "@leafygreen-ui/icon-button@^15.0.10", "@leafygreen-ui/icon-button@^15.0.12", "@leafygreen-ui/icon-button@^15.0.16", "@leafygreen-ui/icon-button@^15.0.4", "@leafygreen-ui/icon-button@^15.0.7": - version "15.0.16" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.16.tgz#3e6d4b1433f72ecec416c43426a687234cb6096b" - integrity sha512-j/y60X+At8tm1uKj2LWfppxuH3lCB1Mwa99PFhmVVD9ohNFjjqY6m5Vll7NTq10AelUimWOYk+uCzh4A96x4kQ== - dependencies: - "@leafygreen-ui/a11y" "^1.4.7" - "@leafygreen-ui/box" "^3.1.7" - "@leafygreen-ui/emotion" "^4.0.7" - "@leafygreen-ui/icon" "^11.22.1" - "@leafygreen-ui/lib" "^10.4.3" - "@leafygreen-ui/palette" "^4.0.7" - "@leafygreen-ui/tokens" "^2.1.4" - -"@leafygreen-ui/icon-button@^15.0.17": - version "15.0.17" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.17.tgz#58e1dc09dcca00793efc5d02d652945bc8717fef" - integrity sha512-2gKZKLwGDoyhOmiYvSDRssk1OU/jSraIU4prT40lLgqZFCmA2nqDr7Hfb+W62QNvEGchoXNOXzm8KG/yrJBl2Q== - dependencies: - "@leafygreen-ui/a11y" "^1.4.8" - "@leafygreen-ui/box" "^3.1.8" - "@leafygreen-ui/emotion" "^4.0.7" - "@leafygreen-ui/icon" "^11.22.2" - "@leafygreen-ui/lib" "^11.0.0" - "@leafygreen-ui/palette" "^4.0.7" - "@leafygreen-ui/tokens" "^2.1.4" - -"@leafygreen-ui/icon-button@^15.0.19": +"@leafygreen-ui/icon-button@^15.0.10", "@leafygreen-ui/icon-button@^15.0.12", "@leafygreen-ui/icon-button@^15.0.16", "@leafygreen-ui/icon-button@^15.0.17", "@leafygreen-ui/icon-button@^15.0.19", "@leafygreen-ui/icon-button@^15.0.4", "@leafygreen-ui/icon-button@^15.0.7": version "15.0.19" resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.19.tgz#4c9bd36358c6568605bb76cd2477f6930d4039fc" integrity sha512-TXNFHpfuMXIcMQHW/D31GEFby63qhBLyeI5CLL8KQjD5Xom3Q6fqviu/eyXE097jTzQtd1dO/2IIiqyyLRW30g== @@ -3512,7 +3470,7 @@ "@leafygreen-ui/palette" "^4.0.7" "@leafygreen-ui/tokens" "^2.1.4" -"@leafygreen-ui/icon@11.26.0", "@leafygreen-ui/icon@^11.12.1", "@leafygreen-ui/icon@^11.12.3", "@leafygreen-ui/icon@^11.12.4", "@leafygreen-ui/icon@^11.12.5", "@leafygreen-ui/icon@^11.15.0", "@leafygreen-ui/icon@^11.17.0", "@leafygreen-ui/icon@^11.22.1", "@leafygreen-ui/icon@^11.22.2", "@leafygreen-ui/icon@^11.23.0", "@leafygreen-ui/icon@^11.25.0": +"@leafygreen-ui/icon@11.26.0": version "11.26.0" resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon/-/icon-11.26.0.tgz#2093df50445bd15758925aae9c0f40813eb817a8" integrity sha512-2+sexm+uLqPC3XxQ8xDky3UhcxwGIuiWnkcG2JImNNMJSnrk87BEG0z7DdCXIpJ46+RtGDYa4B3ADxKSl9M9oQ== @@ -3520,6 +3478,14 @@ "@leafygreen-ui/emotion" "^4.0.7" lodash "^4.17.21" +"@leafygreen-ui/icon@^11.12.1", "@leafygreen-ui/icon@^11.12.3", "@leafygreen-ui/icon@^11.12.4", "@leafygreen-ui/icon@^11.12.5", "@leafygreen-ui/icon@^11.15.0", "@leafygreen-ui/icon@^11.17.0", "@leafygreen-ui/icon@^11.22.1", "@leafygreen-ui/icon@^11.22.2", "@leafygreen-ui/icon@^11.23.0", "@leafygreen-ui/icon@^11.25.0", "@leafygreen-ui/icon@^11.25.1": + version "11.27.0" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon/-/icon-11.27.0.tgz#12163437a5e02289d4e40142fb0aa049bb6a5b98" + integrity sha512-Dk9ELFRG1DIM/3xXKeG44yU3x3G8PCyUL3+ptq0pCaClRQIdQvxSgr873bV8Mq7NNu8IcK/bjQKQ5sLAMpWChg== + dependencies: + "@leafygreen-ui/emotion" "^4.0.7" + lodash "^4.17.21" + "@leafygreen-ui/inline-definition@6.0.14": version "6.0.14" resolved "https://registry.yarnpkg.com/@leafygreen-ui/inline-definition/-/inline-definition-6.0.14.tgz#fd0ba775a2ff88520ed31d0489e57fd90416bad3" @@ -3813,13 +3779,6 @@ dependencies: "@leafygreen-ui/tokens" "^2.1.4" -"@leafygreen-ui/ripple@^1.1.8": - version "1.1.9" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/ripple/-/ripple-1.1.9.tgz#a923bebc2182fc034ce56950302794351490775e" - integrity sha512-0sAyvOu8Tva9LYgpkMTvcP9XKyrS8i57hUq+QGpT9b3s4UrfHHtDD3TaDGll08GYViIwqQDEzLQLk3H3O3we8Q== - dependencies: - "@leafygreen-ui/tokens" "^2.0.2" - "@leafygreen-ui/search-input@2.0.8": version "2.0.8" resolved "https://registry.yarnpkg.com/@leafygreen-ui/search-input/-/search-input-2.0.8.tgz#353bf12b9fc1a1c6f22afe92e6de2a37760c4dc0" @@ -3856,7 +3815,7 @@ lodash "^4.17.21" polished "^4.2.2" -"@leafygreen-ui/select@11.1.1", "@leafygreen-ui/select@^11.1.0": +"@leafygreen-ui/select@11.1.1", "@leafygreen-ui/select@^11.0.1", "@leafygreen-ui/select@^11.1.0": version "11.1.1" resolved "https://registry.yarnpkg.com/@leafygreen-ui/select/-/select-11.1.1.tgz#b4d03071837feca1d5c206b36a1018b7d936f43f" integrity sha512-aH0RNrIF3EU+5ChHJxVVjzlmFGkYRTq9DTRqm9eWgWcZIT3+ggIJCOwBNMr/8rD72NhyXm+RD8Gp2wwk8XJJrg== @@ -3876,7 +3835,7 @@ polished "^4.1.3" react-is "^18.0.1" -"@leafygreen-ui/select@^10.1.0", "@leafygreen-ui/select@^10.3.12": +"@leafygreen-ui/select@^10.3.12": version "10.3.12" resolved "https://registry.yarnpkg.com/@leafygreen-ui/select/-/select-10.3.12.tgz#4546392fd578fe52d5912fea9a2944b7b2cd387d" integrity sha512-r3WchfA1CMgz2Efd7Ccm6v8nFVF6vzAqleaEudTJ09XXtVmV9Df1v1kY/90F+GKij74OjUEOft7RgCkh0SB6/A== @@ -5918,6 +5877,11 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/facepaint@^1.2.1": + version "1.2.5" + resolved "https://registry.yarnpkg.com/@types/facepaint/-/facepaint-1.2.5.tgz#dbb8b1d04579ebcb59d73b3791770407540122dd" + integrity sha512-fi9kvwtC3IQ6Y3QVDkYEZsqEcetAdWD0zqqk8pEHlDXWkgS2WzolWN8Z5PGPT7YJ7ga71CCI0fVKVnVKqV+P6Q== + "@types/find-cache-dir@^3.2.1": version "3.2.1" resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-3.2.1.tgz#7b959a4b9643a1e6a1a5fe49032693cc36773501" @@ -5938,6 +5902,13 @@ dependencies: "@types/node" "*" +"@types/highlight.js@^10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-10.1.0.tgz#89bb0c202997d7a90a07bd2ec1f7d00c56bb90b4" + integrity sha512-77hF2dGBsOgnvZll1vymYiNUtqJ8cJfXPD6GG/2M0aLRc29PkvB7Au6sIDjIEFcSICBhCh2+Pyq6WSRS7LUm6A== + dependencies: + highlight.js "*" + "@types/http-errors@*": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.1.tgz#20172f9578b225f6c7da63446f56d4ce108d5a65" @@ -10229,6 +10200,11 @@ header-case@^2.0.4: capital-case "^1.0.4" tslib "^2.0.3" +highlight.js@*: + version "11.9.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.9.0.tgz#04ab9ee43b52a41a047432c8103e2158a1b8b5b0" + integrity sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw== + highlight.js@~11.5.0: version "11.5.1" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.5.1.tgz#027c24e4509e2f4dcd00b4a6dda542ce0a1f7aea" From ca169b8de4e1202f3557ffba7bb96691f5b3155b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 16:08:03 -0500 Subject: [PATCH 02/14] CHORE(NPM) - bump eslint-plugin-jsdoc from 46.4.6 to 48.0.2 (#2214) --- package.json | 2 +- yarn.lock | 42 +++++++++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 2ed7049c1b..2780f296c3 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-import": "2.26.0", "eslint-plugin-jest": "27.2.1", - "eslint-plugin-jsdoc": "^46.2.6", + "eslint-plugin-jsdoc": "48.0.2", "eslint-plugin-jsx-a11y": "6.7.1", "eslint-plugin-prettier": "4.2.1", "eslint-plugin-react": "7.30.1", diff --git a/yarn.lock b/yarn.lock index e4ba48bafa..aa872e46d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1958,12 +1958,12 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz#d0fce5d07b0620caa282b5131c297bb60f9d87e6" integrity sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww== -"@es-joy/jsdoccomment@~0.40.1": - version "0.40.1" - resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.40.1.tgz#13acd77fb372ed1c83b7355edd865a3b370c9ec4" - integrity sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg== +"@es-joy/jsdoccomment@~0.41.0": + version "0.41.0" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz#4a2f7db42209c0425c71a1476ef1bdb6dcd836f6" + integrity sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw== dependencies: - comment-parser "1.4.0" + comment-parser "1.4.1" esquery "^1.5.0" jsdoc-type-pratt-parser "~4.0.0" @@ -7759,10 +7759,10 @@ commander@^9.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== -comment-parser@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.0.tgz#0f8c560f59698193854f12884c20c0e39a26d32c" - integrity sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw== +comment-parser@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.1.tgz#bdafead37961ac079be11eb7ec65c4d021eaf9cc" + integrity sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg== common-path-prefix@^3.0.0: version "3.0.0" @@ -9009,20 +9009,20 @@ eslint-plugin-jest@27.2.1: dependencies: "@typescript-eslint/utils" "^5.10.0" -eslint-plugin-jsdoc@^46.2.6: - version "46.4.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.4.6.tgz#5226461eda61b5920297cbe02c3b17bc9423cf0b" - integrity sha512-z4SWYnJfOqftZI+b3RM9AtWL1vF/sLWE/LlO9yOKDof9yN2+n3zOdOJTGX/pRE/xnPsooOLG2Rq6e4d+XW3lNw== +eslint-plugin-jsdoc@48.0.2: + version "48.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.0.2.tgz#b843107e8caec57b8b463f04797be3b30d6a52da" + integrity sha512-CBFl5Jc7+jlV36RwDm+PQ8Uw5r28pn2/uW/OaB+Gw5bFwn4Py/1eYMZ3hGf9S4meUFZ/sRvS+hVif2mRAp6WqQ== dependencies: - "@es-joy/jsdoccomment" "~0.40.1" + "@es-joy/jsdoccomment" "~0.41.0" are-docs-informative "^0.0.2" - comment-parser "1.4.0" + comment-parser "1.4.1" debug "^4.3.4" escape-string-regexp "^4.0.0" esquery "^1.5.0" is-builtin-module "^3.2.1" semver "^7.5.4" - spdx-expression-parse "^3.0.1" + spdx-expression-parse "^4.0.0" eslint-plugin-jsx-a11y@6.7.1: version "6.7.1" @@ -14498,7 +14498,7 @@ spdx-exceptions@^2.1.0: resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== -spdx-expression-parse@^3.0.0, spdx-expression-parse@^3.0.1: +spdx-expression-parse@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== @@ -14506,6 +14506,14 @@ spdx-expression-parse@^3.0.0, spdx-expression-parse@^3.0.1: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" +spdx-expression-parse@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz#a23af9f3132115465dac215c099303e4ceac5794" + integrity sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + spdx-license-ids@^3.0.0: version "3.0.13" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" From cafd9b2d5e4bf8ffd877c7df9d1045d88c5fcbed Mon Sep 17 00:00:00 2001 From: minnakt Date: Tue, 9 Jan 2024 11:47:27 -0500 Subject: [PATCH 03/14] v3.0.188 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2780f296c3..960ac3c75d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spruce", - "version": "3.0.187", + "version": "3.0.188", "private": true, "scripts": { "bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh", From 7a77eb3baeba6d15b38300aca5b95870215db128 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:11:18 -0500 Subject: [PATCH 04/14] CHORE(NPM) - bump @leafygreen-ui/text-area from 8.0.4 to 8.0.21 (#2215) --- package.json | 2 +- yarn.lock | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 960ac3c75d..1ed84c3f53 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "@leafygreen-ui/skeleton-loader": "1.1.0", "@leafygreen-ui/table": "12.1.4", "@leafygreen-ui/tabs": "11.0.4", - "@leafygreen-ui/text-area": "8.0.4", + "@leafygreen-ui/text-area": "8.0.21", "@leafygreen-ui/text-input": "12.1.0", "@leafygreen-ui/toast": "6.1.4", "@leafygreen-ui/toggle": "10.0.17", diff --git a/yarn.lock b/yarn.lock index aa872e46d9..b51c49e556 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3478,7 +3478,7 @@ "@leafygreen-ui/emotion" "^4.0.7" lodash "^4.17.21" -"@leafygreen-ui/icon@^11.12.1", "@leafygreen-ui/icon@^11.12.3", "@leafygreen-ui/icon@^11.12.4", "@leafygreen-ui/icon@^11.12.5", "@leafygreen-ui/icon@^11.15.0", "@leafygreen-ui/icon@^11.17.0", "@leafygreen-ui/icon@^11.22.1", "@leafygreen-ui/icon@^11.22.2", "@leafygreen-ui/icon@^11.23.0", "@leafygreen-ui/icon@^11.25.0", "@leafygreen-ui/icon@^11.25.1": +"@leafygreen-ui/icon@^11.12.1", "@leafygreen-ui/icon@^11.12.3", "@leafygreen-ui/icon@^11.12.4", "@leafygreen-ui/icon@^11.12.5", "@leafygreen-ui/icon@^11.15.0", "@leafygreen-ui/icon@^11.17.0", "@leafygreen-ui/icon@^11.22.1", "@leafygreen-ui/icon@^11.22.2", "@leafygreen-ui/icon@^11.23.0", "@leafygreen-ui/icon@^11.25.0", "@leafygreen-ui/icon@^11.25.1", "@leafygreen-ui/icon@^11.27.0": version "11.27.0" resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon/-/icon-11.27.0.tgz#12163437a5e02289d4e40142fb0aa049bb6a5b98" integrity sha512-Dk9ELFRG1DIM/3xXKeG44yU3x3G8PCyUL3+ptq0pCaClRQIdQvxSgr873bV8Mq7NNu8IcK/bjQKQ5sLAMpWChg== @@ -3921,18 +3921,18 @@ "@leafygreen-ui/portal" "^4.0.9" "@leafygreen-ui/tokens" "^2.0.0" -"@leafygreen-ui/text-area@8.0.4": - version "8.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/text-area/-/text-area-8.0.4.tgz#57d4d4eaad5210b90baa24ec1980afb24923c989" - integrity sha512-NnhVINOpf5TdlEikxAHM1k6TiJOpSCTuqRr5eQcTYnelyiStYiVhHqXqfPgQ4M5YZqYSyEVpyNqWz/li9c7o1w== +"@leafygreen-ui/text-area@8.0.21": + version "8.0.21" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/text-area/-/text-area-8.0.21.tgz#098a434d45d6092e1e54f0e1f0d3603477848e37" + integrity sha512-1gzzGt3dvNWzT3mhOrmjs3oKt+wruGs6Yq3Ij0gYwEzosSQc81dNwlPimN5S1Lzsu5aCbn4cgaQPuYi47QcLcw== dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.4.0" - "@leafygreen-ui/icon" "^11.12.4" - "@leafygreen-ui/lib" "^10.0.0" - "@leafygreen-ui/palette" "^3.4.7" - "@leafygreen-ui/tokens" "^2.0.0" - "@leafygreen-ui/typography" "^16.0.0" + "@leafygreen-ui/emotion" "^4.0.7" + "@leafygreen-ui/hooks" "^8.0.0" + "@leafygreen-ui/icon" "^11.27.0" + "@leafygreen-ui/lib" "^13.0.0" + "@leafygreen-ui/palette" "^4.0.7" + "@leafygreen-ui/tokens" "^2.2.0" + "@leafygreen-ui/typography" "^18.0.0" "@leafygreen-ui/text-input@12.1.0": version "12.1.0" From d5f65c899e4a6e15e4d56d2d11feb0df69d1a2bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 14:02:22 -0500 Subject: [PATCH 05/14] CHORE(NPM) - bump @leafygreen-ui/icon-button from 15.0.5 to 15.0.19 (#2216) --- package.json | 2 +- yarn.lock | 22 ++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 1ed84c3f53..2c4f8ff075 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@leafygreen-ui/expandable-card": "3.0.5", "@leafygreen-ui/guide-cue": "5.0.5", "@leafygreen-ui/icon": "11.26.0", - "@leafygreen-ui/icon-button": "15.0.5", + "@leafygreen-ui/icon-button": "15.0.19", "@leafygreen-ui/inline-definition": "6.0.14", "@leafygreen-ui/interaction-ring": "7.0.2", "@leafygreen-ui/leafygreen-provider": "3.1.10", diff --git a/yarn.lock b/yarn.lock index b51c49e556..5bc1bdc6ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3201,12 +3201,7 @@ "@leafygreen-ui/tokens" "^2.0.1" "@leafygreen-ui/typography" "^16.1.0" -"@leafygreen-ui/box@^3.1.1", "@leafygreen-ui/box@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/box/-/box-3.1.4.tgz#6ff56c8c205f83018373c9c0fe8f49681097dc0a" - integrity sha512-cdEXGEafHuaH4zGx3NTX1bMOQ52EpoWA595BC1hh4/8BmXL+H4NFMGywuhZnvYjC4lyVGauX6sCspxrunbmfMQ== - -"@leafygreen-ui/box@^3.1.8": +"@leafygreen-ui/box@^3.1.1", "@leafygreen-ui/box@^3.1.4", "@leafygreen-ui/box@^3.1.8": version "3.1.8" resolved "https://registry.yarnpkg.com/@leafygreen-ui/box/-/box-3.1.8.tgz#33e6dedbe3ee510ce88ffade0a3a9e68a96103a9" integrity sha512-qfjwhrie+mUrS2H+Qp98iQKBPoZtNpFmlGBYgg59sVOzotFvyvqwxlf/JcaNGo+v7nyOhC2XAHui0ywf9cScKw== @@ -3444,20 +3439,7 @@ dependencies: lodash "^4.17.21" -"@leafygreen-ui/icon-button@15.0.5": - version "15.0.5" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.5.tgz#4c9e6a8388c471262c98bcb52b2d95c061625eea" - integrity sha512-8zWWqInWVvG2399FeyoQcvuzdEt0aongqZi06eGEQOpXwRCaIxUXOqeEmAHPjFy2K3jAUs2KtMFVlrdZZnWNbg== - dependencies: - "@leafygreen-ui/a11y" "^1.3.4" - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.4" - "@leafygreen-ui/lib" "^10.0.0" - "@leafygreen-ui/palette" "^3.4.7" - "@leafygreen-ui/tokens" "^2.0.0" - -"@leafygreen-ui/icon-button@^15.0.10", "@leafygreen-ui/icon-button@^15.0.12", "@leafygreen-ui/icon-button@^15.0.16", "@leafygreen-ui/icon-button@^15.0.17", "@leafygreen-ui/icon-button@^15.0.19", "@leafygreen-ui/icon-button@^15.0.4", "@leafygreen-ui/icon-button@^15.0.7": +"@leafygreen-ui/icon-button@15.0.19", "@leafygreen-ui/icon-button@^15.0.10", "@leafygreen-ui/icon-button@^15.0.12", "@leafygreen-ui/icon-button@^15.0.16", "@leafygreen-ui/icon-button@^15.0.17", "@leafygreen-ui/icon-button@^15.0.19", "@leafygreen-ui/icon-button@^15.0.4", "@leafygreen-ui/icon-button@^15.0.7": version "15.0.19" resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.19.tgz#4c9bd36358c6568605bb76cd2477f6930d4039fc" integrity sha512-TXNFHpfuMXIcMQHW/D31GEFby63qhBLyeI5CLL8KQjD5Xom3Q6fqviu/eyXE097jTzQtd1dO/2IIiqyyLRW30g== From e4ff330d142883e992b0a2d889ddf6f25aacb8c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:11:04 -0500 Subject: [PATCH 06/14] CHORE(NPM) - bump @leafygreen-ui/modal from 16.0.1 to 16.0.3 (#2217) --- package.json | 2 +- yarn.lock | 34 +++++++++------------------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 2c4f8ff075..e8291e3c00 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "@leafygreen-ui/leafygreen-provider": "3.1.10", "@leafygreen-ui/loading-indicator": "2.0.6", "@leafygreen-ui/menu": "20.0.1", - "@leafygreen-ui/modal": "16.0.1", + "@leafygreen-ui/modal": "16.0.3", "@leafygreen-ui/number-input": "1.0.18", "@leafygreen-ui/pagination": "1.0.12", "@leafygreen-ui/palette": "4.0.7", diff --git a/yarn.lock b/yarn.lock index 5bc1bdc6ae..38ae66ba17 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3439,7 +3439,7 @@ dependencies: lodash "^4.17.21" -"@leafygreen-ui/icon-button@15.0.19", "@leafygreen-ui/icon-button@^15.0.10", "@leafygreen-ui/icon-button@^15.0.12", "@leafygreen-ui/icon-button@^15.0.16", "@leafygreen-ui/icon-button@^15.0.17", "@leafygreen-ui/icon-button@^15.0.19", "@leafygreen-ui/icon-button@^15.0.4", "@leafygreen-ui/icon-button@^15.0.7": +"@leafygreen-ui/icon-button@15.0.19", "@leafygreen-ui/icon-button@^15.0.10", "@leafygreen-ui/icon-button@^15.0.12", "@leafygreen-ui/icon-button@^15.0.16", "@leafygreen-ui/icon-button@^15.0.19", "@leafygreen-ui/icon-button@^15.0.4", "@leafygreen-ui/icon-button@^15.0.7": version "15.0.19" resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.19.tgz#4c9bd36358c6568605bb76cd2477f6930d4039fc" integrity sha512-TXNFHpfuMXIcMQHW/D31GEFby63qhBLyeI5CLL8KQjD5Xom3Q6fqviu/eyXE097jTzQtd1dO/2IIiqyyLRW30g== @@ -3597,18 +3597,18 @@ lodash "^4.17.21" react-transition-group "^4.4.1" -"@leafygreen-ui/modal@16.0.1", "@leafygreen-ui/modal@^16.0.0": - version "16.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/modal/-/modal-16.0.1.tgz#ce0a233c9efd814db9359e605aed5ec204b7becc" - integrity sha512-sdHr+u8DFwZBG7MIA2rQnYy1FcOWqREivpFJpLoXrqDEjpqxfdXDCTLtT0U+OTtOL4f9LHmu+9/j0d3YWHNxJA== +"@leafygreen-ui/modal@16.0.3", "@leafygreen-ui/modal@^16.0.0": + version "16.0.3" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/modal/-/modal-16.0.3.tgz#36483aa1642fab9e2955001c4b1adb54e15135fc" + integrity sha512-JvHV4Yy5KCaH3snnG19aYS1d0suslPTWXcPZqySCil+pruCMwCDVdf/21KqQSM/JmyJVwoHlVxHegQlFAMAWEg== dependencies: "@leafygreen-ui/emotion" "^4.0.7" "@leafygreen-ui/hooks" "^8.0.0" "@leafygreen-ui/icon" "^11.23.0" - "@leafygreen-ui/icon-button" "^15.0.17" - "@leafygreen-ui/lib" "^11.0.0" + "@leafygreen-ui/icon-button" "^15.0.19" + "@leafygreen-ui/lib" "^13.0.0" "@leafygreen-ui/palette" "^4.0.7" - "@leafygreen-ui/portal" "^5.0.1" + "@leafygreen-ui/portal" "^5.0.3" "@leafygreen-ui/tokens" "^2.2.0" focus-trap "6.9.4" focus-trap-react "^9.0.2" @@ -3707,23 +3707,7 @@ "@leafygreen-ui/hooks" "^7.7.5" "@leafygreen-ui/lib" "^10.4.0" -"@leafygreen-ui/portal@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/portal/-/portal-5.0.1.tgz#a5b6962210bca1809cd2dc67ae4c767e755a0f34" - integrity sha512-SL+Kw2088aopilmzKOTfzWE4tVKyRyClr1nnOaX+xplQ+6gu22C+LDFL4cJZkkWyP8WlqAE+2s1C631W3uHbPg== - dependencies: - "@leafygreen-ui/hooks" "^8.0.0" - "@leafygreen-ui/lib" "^11.0.0" - -"@leafygreen-ui/portal@^5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/portal/-/portal-5.0.2.tgz#abf03843deef4aa997bfb97ecdfc22e459207d3c" - integrity sha512-vLLB8wGmEtQHhIJ753KbO3zJDBP3idd9h965CPYWdRHHWP0A2QwIRhPr148SbH0/VxFVO6zXVBcTeqPGHhrXZw== - dependencies: - "@leafygreen-ui/hooks" "^8.0.0" - "@leafygreen-ui/lib" "^12.0.0" - -"@leafygreen-ui/portal@^5.0.3": +"@leafygreen-ui/portal@^5.0.1", "@leafygreen-ui/portal@^5.0.2", "@leafygreen-ui/portal@^5.0.3": version "5.0.3" resolved "https://registry.yarnpkg.com/@leafygreen-ui/portal/-/portal-5.0.3.tgz#062ec8710afcee4c2f4cf3aa78b1f9a3bc25c86e" integrity sha512-vwoZHtdrMzR5uBsfxAvl1kdB/xtQwtfpRTuCqC5Q3X+DsLg9JReDl+5dsGMegwDwkqwzsndYVGpq0BcFuDITXQ== From 7eb85f7e4e599b70949904fc6c6119dea1787f38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:13:58 -0500 Subject: [PATCH 07/14] CHORE(NPM) - bump follow-redirects from 1.15.2 to 1.15.4 (#2219) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 38ae66ba17..fe81c105a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9619,9 +9619,9 @@ focus-trap@6.9.4, focus-trap@^6.9.4: tabbable "^5.3.3" follow-redirects@^1.0.0, follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + version "1.15.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" + integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== for-each@^0.3.3: version "0.3.3" From 5858fa73d71949d619418b43eda2919e6edbad1a Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Tue, 9 Jan 2024 15:56:00 -0500 Subject: [PATCH 08/14] DEVPROD-823 Remove terminated status from hosts table filters (#2218) --- src/constants/hosts.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/constants/hosts.ts b/src/constants/hosts.ts index 182e6fd3df..e85d6bf186 100644 --- a/src/constants/hosts.ts +++ b/src/constants/hosts.ts @@ -12,11 +12,6 @@ export const hostStatuses: Status[] = [ value: HostStatus.Running, key: HostStatus.Running, }, - { - title: "Terminated", - value: HostStatus.Terminated, - key: HostStatus.Terminated, - }, { title: "Uninitialized", value: HostStatus.Uninitialized, From 1a766b108304537fc82bc98b1fc59d0f8b281c0c Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Wed, 10 Jan 2024 15:41:24 -0500 Subject: [PATCH 09/14] DEVPROD-3283 Support virtualization for BaseTable component (#2205) --- src/components/Table/BaseTable.stories.tsx | 42 +++- src/components/Table/BaseTable.tsx | 259 ++++++++++++--------- src/gql/generated/types.ts | 5 + 3 files changed, 180 insertions(+), 126 deletions(-) diff --git a/src/components/Table/BaseTable.stories.tsx b/src/components/Table/BaseTable.stories.tsx index 1d1f2834a2..700ee890cd 100644 --- a/src/components/Table/BaseTable.stories.tsx +++ b/src/components/Table/BaseTable.stories.tsx @@ -1,4 +1,5 @@ -import { useRef } from "react"; +import { useRef, useState } from "react"; +import { css } from "@leafygreen-ui/emotion"; import { LGColumnDef, useLeafyGreenTable } from "@leafygreen-ui/table"; import { WordBreak } from "components/styles"; import { CustomStoryObj, CustomMeta } from "test_utils/types"; @@ -9,7 +10,7 @@ export default { } satisfies CustomMeta; export const Default: CustomStoryObj = { - render: (args) => , + render: (args) => , args: { shouldAlternateRowColor: true, darkMode: false, @@ -39,6 +40,23 @@ export const LongContent: CustomStoryObj = { darkMode: false, }, }; +const virtualScrollingContainerHeight = css` + height: 500px; +`; +export const VirtualTable: CustomStoryObj = { + render: (args) => ( + + ), + args: { + shouldAlternateRowColor: true, + darkMode: false, + }, +}; export const Loading: CustomStoryObj = { render: (args) => , @@ -55,11 +73,12 @@ interface DataShape { size: string; } -const defaultRows: DataShape[] = Array.from({ length: 100 }, (_, i) => ({ - name: `name ${i}`, - type: `type ${i}`, - size: `size ${i}`, -})); +const makeDefaultRows = (count: number): DataShape[] => + Array.from({ length: count }, (_, i) => ({ + name: `name ${i}`, + type: `type ${i}`, + size: `size ${i}`, + })); const nestedRows: DataShape[] = Array.from({ length: 50 }, (_, i) => ({ name: `name ${i}`, @@ -115,17 +134,20 @@ const columns: LGColumnDef[] = [ const TemplateComponent: React.FC< React.ComponentProps & { data: DataShape[]; + useVirtualScrolling?: boolean; } > = (args) => { - const { data, ...rest } = args; + const { data, useVirtualScrolling, ...rest } = args; const tableContainerRef = useRef(null); + const tableData = useState(() => data)[0]; const table = useLeafyGreenTable({ - data, + data: tableData, columns, containerRef: tableContainerRef, + useVirtualScrolling, }); - return ; + return ; }; interface CellProps { diff --git a/src/components/Table/BaseTable.tsx b/src/components/Table/BaseTable.tsx index 06fb85aa67..afb823447f 100644 --- a/src/components/Table/BaseTable.tsx +++ b/src/components/Table/BaseTable.tsx @@ -1,3 +1,4 @@ +import { ForwardedRef, forwardRef } from "react"; import styled from "@emotion/styled"; import { css } from "@leafygreen-ui/emotion"; import { @@ -12,6 +13,8 @@ import { TableBody, type TableProps, TableHead, + VirtualItem, + LeafyGreenTableRow, } from "@leafygreen-ui/table"; import { RowData } from "@tanstack/react-table"; import { @@ -53,125 +56,149 @@ type SpruceTableProps = { loadingRows?: number; }; -export const BaseTable = ({ - "data-cy-row": dataCyRow, - "data-cy-table": dataCyTable, - emptyComponent, - loading, - loadingRows = 5, - table, - ...args -}: SpruceTableProps & TableProps) => ( - <> - - - {table.getHeaderGroups().map((headerGroup) => ( - - {headerGroup.headers.map((header) => { - const { columnDef } = header.column ?? {}; - const { meta } = columnDef; - return ( - - {flexRender(columnDef.header, header.getContext())} - {header.column.getCanFilter() && - (meta?.treeSelect ? ( - - header.column.setFilterValue(value) - } - options={ - meta.treeSelect?.filterOptions - ? meta.treeSelect.options.filter( - ({ value }) => - !!header.column - .getFacetedUniqueValues() - .get(value) - ) - : meta.treeSelect.options - } - value={ - (header?.column?.getFilterValue() as string[]) ?? [] - } - /> - ) : ( - - header.column.setFilterValue(value) - } - placeholder={meta?.search?.placeholder} - value={ - (header?.column?.getFilterValue() as string) ?? "" - } - /> - ))} - - ); - })} - - ))} - - - {loading && ( - - )} - {table.getRowModel().rows.map((row) => ( - div { - max-height: unset; - } - `} - > - {row.getVisibleCells().map((cell) => ( - - {flexRender(cell.column.columnDef.cell, cell.getContext())} - +export const BaseTable = forwardRef( + ( + { + "data-cy-row": dataCyRow, + "data-cy-table": dataCyTable, + emptyComponent, + loading, + loadingRows = 5, + table, + ...args + }: SpruceTableProps & TableProps, + ref: ForwardedRef + ) => { + const { virtualRows } = table; + const { rows } = table.getRowModel(); + const hasVirtualRows = virtualRows && virtualRows.length > 0; + + return ( + <> + + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => { + const { columnDef } = header.column ?? {}; + const { meta } = columnDef; + return ( + + {flexRender(columnDef.header, header.getContext())} + {header.column.getCanFilter() && + (meta?.treeSelect ? ( + + header.column.setFilterValue(value) + } + options={ + meta.treeSelect?.filterOptions + ? meta.treeSelect.options.filter( + ({ value }) => + !!header.column + .getFacetedUniqueValues() + .get(value) + ) + : meta.treeSelect.options + } + value={ + (header?.column?.getFilterValue() as string[]) ?? + [] + } + /> + ) : ( + + header.column.setFilterValue(value) + } + placeholder={meta?.search?.placeholder} + value={ + (header?.column?.getFilterValue() as string) ?? "" + } + /> + ))} + + ); + })} + ))} - {row.original.renderExpandedContent && ( - + + + {loading && ( + )} - {row.subRows && - row.subRows.map((subRow) => ( - div[data-state="entered"] { - max-height: unset; - } - `} - > - {subRow.getVisibleCells().map((cell) => ( - - {flexRender( - cell.column.columnDef.cell, - cell.getContext() - )} - - ))} - - ))} - - ))} - - + {hasVirtualRows + ? virtualRows.map((vr) => { + const row = rows[vr.index]; + return ( + + ); + }) + : rows.map((row) => ( + + ))} + + + {!loading && + rows.length === 0 && + (emptyComponent || "No data to display")} + + ); + } +); - {!loading && - table.getRowModel().rows.length === 0 && - (emptyComponent || "No data to display")} - +const RenderableRow = ({ + row, + virtualRow, +}: { + row: LeafyGreenTableRow; + virtualRow: VirtualItem; +}) => ( + div { + max-height: unset; + } + `} + virtualRow={virtualRow} + > + {row.getVisibleCells().map((cell) => ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ))} + {row.original.renderExpandedContent && } + {row.subRows && + row.subRows.map((subRow) => ( + div[data-state="entered"] { + max-height: unset; + } + `} + virtualRow={virtualRow} + > + {subRow.getVisibleCells().map((cell) => ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ))} + + ))} + ); const StyledTable = styled(Table)` diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index ae8b0f91b9..1e9c899952 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -364,6 +364,7 @@ export type DisplayTask = { /** Distro models an environment configuration for a host. */ export type Distro = { __typename?: "Distro"; + adminOnly: Scalars["Boolean"]["output"]; aliases: Array; arch: Arch; authorizedKeysFile: Scalars["String"]["output"]; @@ -429,6 +430,8 @@ export type DistroInfo = { }; export type DistroInput = { + /** TODO: require adminOnly field upon completion of DEVPROD-3533 */ + adminOnly?: InputMaybe; aliases: Array; arch: Arch; authorizedKeysFile: Scalars["String"]["input"]; @@ -2786,11 +2789,13 @@ export type TestFilterOptions = { export type TestLog = { __typename?: "TestLog"; lineNum?: Maybe; + renderingType?: Maybe; url?: Maybe; /** @deprecated Use urlParsley instead */ urlLobster?: Maybe; urlParsley?: Maybe; urlRaw?: Maybe; + version?: Maybe; }; export type TestResult = { From 89edebe3f44bf55b616cc9b12717409f6ca97773 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Thu, 11 Jan 2024 10:47:20 -0500 Subject: [PATCH 10/14] Update README with corrections and formatting (#2221) --- README.md | 109 ++++++++++++++++++++++++------------------------------ 1 file changed, 48 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index c49280f869..5bd3e5a696 100644 --- a/README.md +++ b/README.md @@ -2,32 +2,19 @@ Spruce is the React UI for MongoDB's continuous integration software. -## Table of Contents - -- [Getting Started](#getting-started) - - [Running Locally](#running-locally) - - [Environment Variables](#environment-variables) -- [Deployment](#deployment) - - [Requirements](#requirements) - - [How to Deploy](#how-to-deploy) - ## Getting Started ### Running Locally -1. Clone the Spruce Github repository -2. Ensure you have Node.js v16+ and MongoDB Command Line Database Tools +1. Clone the Spruce GitHub repository +2. Ensure you have Node.js v20+ and MongoDB Command Line Database Tools v100.8.0+ installed -3. Ask a colleague for their .cmdrc.json file and follow the instructions - [here](#environment-variables) -4. Run `yarn` -5. Start a local evergreen server by doing the following: - -- Clone the evergreen repo -- Run `make local-evergreen` - -6. Run `yarn run dev`. This will launch the app and point it at the local - evergreen server you just ran. +3. Run `yarn install` +4. Start a local Evergreen server by doing the following: + - Clone the [Evergreen repo](https://github.com/evergreen-ci/evergreen) + - From the Evergreen directory, run `make local-evergreen` +5. Run `yarn run dev`. This will launch the app and point it at the local + Evergreen server you just started. ### Storybook @@ -47,11 +34,11 @@ results. 1. Symlink the standard definition language GraphQL schema used in your backend to a file named sdlschema in the root of the Spruce directory to enable query - linting with ESlint like so + linting with ESLint like so `ln -s /graphql/schema sdlschema` 2. Run `yarn run eslint` to see the results of query linting in your terminal or install a plugin to integrate ESlint into your editor. If you are using - VSCode, we recommend ESLint by Dirk Baeumer. + VS Code, we recommend ESLint by Dirk Baeumer. ### Environment Variables @@ -62,11 +49,11 @@ with non-sensitive information, and `.env-cmdrc.json` for builds deployed to S3. This file is git ignored because it contains API keys that we do not want to publish. It should be named `.env-cmdrc.json` and placed in the root of the project. This file is required to deploy Spruce to production and to staging. -The credential file is located in the R&D Dev Prod 1password vault. +The credential file is located in the R&D Dev Prod 1Password vault. ## GraphQL Type Generation -We use Code generation to generate our types for our GraphQL queries and +We use code generation to generate our types for our GraphQL queries and mutations. When you create a query or mutation you can run the code generation script with the steps below. The types for your query/mutation response and variables will be generated and saved to `gql/generated/types.ts`. Much of the @@ -75,12 +62,15 @@ well and you can refer to those before creating your own. ### Setting up code generation -- create a symlink from the `schema` folder from evergreen with the spruce - folder using `ln -s /graphql/schema sdlschema` +- Create a symlink from the `schema` folder from Evergreen to Spruce using + +```bash +ln -s /graphql/schema sdlschema` +``` ### Using code generation -- From within the spruce folder run `yarn codegen` +- From within the Spruce folder run `yarn codegen` - As long as your queries are declared correctly the types should generate ### Code generation troubleshooting and tips @@ -88,8 +78,8 @@ well and you can refer to those before creating your own. - Queries should be declared with a query name so the code generation knows what to name the corresponding type. - Each query and mutation should have a unique name. -- Since query analysis for type generation occurs statically we cant place - dynamic variables with in query strings we instead have to hard code the +- Since query analysis for type generation occurs statically we can't place + dynamic variables with in query strings. We instead have to hard code the variable in the query or pass it in as query variable. ### Common errors @@ -107,47 +97,44 @@ Cypress. ### Unit tests -Unit Tests are used to test individual features in isolation. We utilize the -[Jest Test Runner](https://jestjs.io/) to execute our Unit Tests and generate +Unit tests are used to test individual features in isolation. We utilize the +[Jest Test Runner](https://jestjs.io/) to execute our unit tests and generate reports. There are 3 types of unit tests you may encounter in this codebase. #### Component Tests -These test React Componenents. We utilize +These test React components. We utilize [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) to help us write our component tests. React Testing Library provides several utilities that are useful for making assertions on React Componenents. When writing component tests you should import [test_utils](https://github.com/evergreen-ci/spruce/blob/main/src/test_utils/index.tsx) -instead of React Testing Library, `test_utils` is a wrapper around React Testing +instead of React Testing Library; `test_utils` is a wrapper around React Testing Library which provides a series of helpful utilities for common testing -scenarios such as `queryByDataCy` which is a helper for selecting `data-cy` -attributes or `renderWithRouterMatch` which is helpful for testing components +scenarios such as `queryByDataCy`, which is a helper for selecting `data-cy` +attributes, or `renderWithRouterMatch`, which is helpful for testing components that rely on React Router. #### Hook Tests Often times you may find yourself writing -[custom react hooks](https://reactjs.org/docs/hooks-custom.html). The best way -to test these is using -[React Hooks Testing Library](https://react-hooks-testing-library.com/). React -Hooks Testing Library allows you to test your custom Hooks in isolation without -needing to wrap them in a Component. It provides several methods that make it -easy to assert and test different behaviors in your hooks. Such as -[`waitForNextUpdate`](https://react-hooks-testing-library.com/reference/api#waitfornextupdate) +[custom React hooks](https://reactjs.org/docs/hooks-custom.html). The best way +to test these is using React Testing Library's [`renderHook`](https://testing-library.com/docs/react-testing-library/api#renderhook) utility. This allows you to test your custom hooks in isolation without +needing to wrap them in a component. It provides several methods that make it +easy to assert and test different behaviors in your hooks. Such as [`waitFor`](https://testing-library.com/docs/dom-testing-library/api-async/#waitfor), which will wait for your hook to rerender before allowing a test to proceed. #### Standard utility tests These are the most basic of tests. They do not require any special libraries to -run and often just test standard javascript functions. +run and often just test standard JavaScript functions. -- You can run all Unit Tests using `yarn test` -- You can run a specific Unit Test using `yarn test -t ` -- You can run jest in watch mode using `yarn test:watch` This will open an - interactive CLI you can use to automatically run tests as you update them. +- You can run all unit tests using `yarn test` +- You can run a specific unit test using `yarn test -t ` +- You can run Jest in watch mode using `yarn test:watch` This will open an + interactive CLI that can be used to automatically run tests as you update them. ### E2E tests @@ -155,10 +142,10 @@ At a high level, we use [Cypress](https://www.cypress.io/) to start a virtual browser that is running Spruce. Cypress then is able to run our test specs, which tell it to interact with the browser in certain ways and makes assertions about what happens in the UI. Note that you must be running the Evergreen server -on localhost:9090 for the front-end to work. +on http://localhost:9090 for the front-end to work. In order to run the Cypress tests, do the following, assuming you have this repo -checked out and all the dependencies installed by yarn: +checked out and all the dependencies installed by Yarn: 1. Increase the limit on open files by running `ulimit -n 64000` before running mongod in the same shell. @@ -177,16 +164,16 @@ checked out and all the dependencies installed by yarn: ### Snapshot Tests -Snapshot tests are automatically generated when we create storybook stories. -These Tests create a snapshot of the UI and compare them to previous snapshots -which are stored as files along side your storybook stories in a `__snapshots__` +Snapshot tests are automatically generated when we create Storybook stories. +These tests create a snapshot of the UI and compare them to previous snapshots +which are stored as files along side your Storybook stories in a `__snapshots__` directory. They try to catch unexpected UI regressions. Read more about them -[Here](https://jestjs.io/docs/snapshot-testing). +[here](https://jestjs.io/docs/snapshot-testing). ## How to get data for your feature -If you need more data to be able to test out your feature locally the easiest -way to do it is to populate the local db using real data from the staging or +If you need more data to be able to test out your feature locally, the easiest +way to do so is to populate the local db using real data from the staging or production environments. 1. You should identify if the data you need is located in the staging or prod db @@ -244,12 +231,12 @@ so you don't accidently export an entire collection you can do this by passing a ### Logkeeper -Spruce has a minimal dependency on Logkeeper: it is used for Cypress tests on +Spruce has a minimal dependency on Logkeeper: it is used by Cypress tests on the Job Logs page. If you'd like to get set up to develop these tests, complete the following: -1. Clone the [Logkeeper Repository](https://github.com/evergreen-ci/logkeeper) -2. Run `yarn bootstrap-logkeeper` to download some sample resmoke logs from S3. +1. Clone the [Logkeeper repository](https://github.com/evergreen-ci/logkeeper) +2. Run `yarn bootstrap-logkeeper` within Spruce to download some sample resmoke logs from S3. 3. Run the command output by the previous step to seed the env variables and start the local logkeeper server at http://localhost:8080. @@ -257,9 +244,9 @@ the following: ### Requirements -You must be on the `main` Branch if deploying to prod. +You must be on the `main` branch if deploying to prod. -A `.cmdrc.json` file is required to deploy because it sets the environment +An `.env-cmdrc.json` file is required to deploy because it sets the environment variables that the application needs in production and staging environments. See [Environment Variables](#environment-variables) section for more info about this file. From 134b2eef1b09d45c796b785e47b24913ed074d81 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Thu, 11 Jan 2024 10:48:15 -0500 Subject: [PATCH 11/14] Remove errant backtick from README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bd3e5a696..74c38b2a8c 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ well and you can refer to those before creating your own. - Create a symlink from the `schema` folder from Evergreen to Spruce using ```bash -ln -s /graphql/schema sdlschema` +ln -s /graphql/schema sdlschema ``` ### Using code generation From 5cec588aa0fbcdc1676f1104e664f1f142cb0522 Mon Sep 17 00:00:00 2001 From: minnakt Date: Thu, 11 Jan 2024 11:11:56 -0500 Subject: [PATCH 12/14] v3.0.189 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8291e3c00..f20a047dd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spruce", - "version": "3.0.188", + "version": "3.0.189", "private": true, "scripts": { "bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh", From cb3ccecb3cd3be585d8624b2613c8a89d2ebb697 Mon Sep 17 00:00:00 2001 From: SupaJoon Date: Tue, 16 Jan 2024 09:04:21 -0500 Subject: [PATCH 13/14] DEVPROD-3425: Update cypress_spec param default value (#2211) --- .evergreen.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index 36ae9a03b8..b548e2421f 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -243,7 +243,7 @@ functions: if [[ "${requester}" == "github_pr" || "${requester}" == "commit" ]]; then yarn cy:run --record --key "${cypress_record_key}" --reporter junit elif [[ "${requester}" == "patch" ]]; then - yarn cy:run --record --key "${cypress_record_key}" --reporter junit --spec ${cypress_spec} + yarn cy:run --record --key "${cypress_record_key}" --reporter junit --spec "${cypress_spec}" else yarn cy:run --reporter junit fi @@ -524,5 +524,5 @@ buildvariants: parameters: - key: cypress_spec - value: "cypress/integration/**/*" + value: cypress/integration/**/* description: Specify the Cypress spec files to run for user submitted patches running the e2e_test task. From 39e3be5374b3deb303776e37446f2a584a85ae53 Mon Sep 17 00:00:00 2001 From: Annie Black Date: Tue, 16 Jan 2024 11:03:53 -0500 Subject: [PATCH 14/14] DEVPROD-3720 switch to new module definition schema (#2223) --- .evergreen.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index b548e2421f..6dc2f03761 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -6,11 +6,13 @@ ignore: modules: - name: evergreen - repo: git@github.com:evergreen-ci/evergreen.git + owner: evergreen-ci + repo: evergreen branch: main auto_update: true - name: logkeeper - repo: git@github.com:evergreen-ci/logkeeper.git + owner: evergreen-ci + repo: logkeeper branch: main auto_update: true