diff --git a/package-lock.json b/package-lock.json index 2454ed131..fd0590a28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "@mui/x-date-pickers": "^6.18.5", "@popperjs/core": "^2.11.8", "@react-icons/all-files": "^4.1.0", + "axios": "^1.6.3", "bootstrap": "^5.3.2", "date-fns": "^2.30.0", "flexsearch": "^0.7.31", @@ -52,7 +53,7 @@ "html-to-text": "^9.0.5", "i18next": "^23.7.11", "iso-639-1": "^3.1.0", - "jest-canvas-mock": "2.5.2", + "jest-canvas-mock": "2.5.1", "moment": "^2.30.1", "prismjs": "^1.29.0", "prop-types": "^15.8.1", @@ -84,6 +85,7 @@ "@vitejs/plugin-react": "^4.2.1", "@vitest/coverage-v8": "^1.1.0", "ajv": "^8.12.0", + "axios-mock-adapter": "^1.22.0", "babel-preset-gatsby": "^3.12.1", "gatsby-cli": "^5.12.4", "jsdom": "^22.1.0", @@ -277,19 +279,19 @@ } }, "node_modules/@babel/core": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.6.tgz", - "integrity": "sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", + "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.23.5", "@babel/generator": "^7.23.6", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.6", + "@babel/helpers": "^7.23.7", "@babel/parser": "^7.23.6", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.6", + "@babel/traverse": "^7.23.7", "@babel/types": "^7.23.6", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -374,9 +376,9 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.6.tgz", - "integrity": "sha512-cBXU1vZni/CpGF29iTu4YRbOZt3Wat6zCoMDxRF1MayiEc4URxOj31tT65HUM0CRpMowA3HCJaAOVOUnMf96cw==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz", + "integrity": "sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-environment-visitor": "^7.22.20", @@ -619,12 +621,12 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.6.tgz", - "integrity": "sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.7.tgz", + "integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==", "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.6", + "@babel/traverse": "^7.23.7", "@babel/types": "^7.23.6" }, "engines": { @@ -686,9 +688,9 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz", - "integrity": "sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz", + "integrity": "sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-plugin-utils": "^7.22.5" @@ -1069,9 +1071,9 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.4.tgz", - "integrity": "sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.7.tgz", + "integrity": "sha512-PdxEpL71bJp1byMG0va5gwQcXHxuEYC/BgI/e88mGTtohbZN28O5Yit0Plkkm/dBzCF/BxmbNcses1RH1T+urA==", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-plugin-utils": "^7.22.5", @@ -1756,15 +1758,15 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.6.tgz", - "integrity": "sha512-kF1Zg62aPseQ11orDhFRw+aPG/eynNQtI+TyY+m33qJa2cJ5EEvza2P2BNTIA9E5MyqFABHEyY6CPHwgdy9aNg==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.7.tgz", + "integrity": "sha512-fa0hnfmiXc9fq/weK34MUV0drz2pOL/vfKWvN7Qw127hiUPabFCUMgAbYWcchRzMJit4o5ARsK/s+5h0249pLw==", "dependencies": { "@babel/helper-module-imports": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", - "babel-plugin-polyfill-corejs2": "^0.4.6", - "babel-plugin-polyfill-corejs3": "^0.8.5", - "babel-plugin-polyfill-regenerator": "^0.5.3", + "babel-plugin-polyfill-corejs2": "^0.4.7", + "babel-plugin-polyfill-corejs3": "^0.8.7", + "babel-plugin-polyfill-regenerator": "^0.5.4", "semver": "^6.3.1" }, "engines": { @@ -1922,9 +1924,9 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.6.tgz", - "integrity": "sha512-2XPn/BqKkZCpzYhUUNZ1ssXw7DcXfKQEjv/uXZUXgaebCMYmkEsfZ2yY+vv+xtXv50WmL5SGhyB6/xsWxIvvOQ==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.7.tgz", + "integrity": "sha512-SY27X/GtTz/L4UryMNJ6p4fH4nsgWbz84y9FE0bQeWJP6O5BhgVCt53CotQKHCOeXJel8VyhlhujhlltKms/CA==", "dependencies": { "@babel/compat-data": "^7.23.5", "@babel/helper-compilation-targets": "^7.23.6", @@ -1932,7 +1934,7 @@ "@babel/helper-validator-option": "^7.23.5", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.3", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.7", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -1953,7 +1955,7 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.23.3", - "@babel/plugin-transform-async-generator-functions": "^7.23.4", + "@babel/plugin-transform-async-generator-functions": "^7.23.7", "@babel/plugin-transform-async-to-generator": "^7.23.3", "@babel/plugin-transform-block-scoped-functions": "^7.23.3", "@babel/plugin-transform-block-scoping": "^7.23.4", @@ -2001,9 +2003,9 @@ "@babel/plugin-transform-unicode-regex": "^7.23.3", "@babel/plugin-transform-unicode-sets-regex": "^7.23.3", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.6", - "babel-plugin-polyfill-corejs3": "^0.8.5", - "babel-plugin-polyfill-regenerator": "^0.5.3", + "babel-plugin-polyfill-corejs2": "^0.4.7", + "babel-plugin-polyfill-corejs3": "^0.8.7", + "babel-plugin-polyfill-regenerator": "^0.5.4", "core-js-compat": "^3.31.0", "semver": "^6.3.1" }, @@ -2070,9 +2072,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.6.tgz", - "integrity": "sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.7.tgz", + "integrity": "sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2094,9 +2096,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.6.tgz", - "integrity": "sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", + "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", "dependencies": { "@babel/code-frame": "^7.23.5", "@babel/generator": "^7.23.6", @@ -2279,9 +2281,9 @@ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.10.tgz", - "integrity": "sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", + "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", "cpu": [ "ppc64" ], @@ -2295,9 +2297,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.10.tgz", - "integrity": "sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", + "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", "cpu": [ "arm" ], @@ -2311,9 +2313,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.10.tgz", - "integrity": "sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", + "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", "cpu": [ "arm64" ], @@ -2327,9 +2329,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.10.tgz", - "integrity": "sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", + "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", "cpu": [ "x64" ], @@ -2343,9 +2345,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.10.tgz", - "integrity": "sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", + "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", "cpu": [ "arm64" ], @@ -2359,9 +2361,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.10.tgz", - "integrity": "sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", + "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", "cpu": [ "x64" ], @@ -2375,9 +2377,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.10.tgz", - "integrity": "sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", + "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", "cpu": [ "arm64" ], @@ -2391,9 +2393,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.10.tgz", - "integrity": "sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", + "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", "cpu": [ "x64" ], @@ -2407,9 +2409,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.10.tgz", - "integrity": "sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", + "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", "cpu": [ "arm" ], @@ -2423,9 +2425,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.10.tgz", - "integrity": "sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", + "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", "cpu": [ "arm64" ], @@ -2439,9 +2441,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.10.tgz", - "integrity": "sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", + "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", "cpu": [ "ia32" ], @@ -2455,9 +2457,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.10.tgz", - "integrity": "sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", + "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", "cpu": [ "loong64" ], @@ -2471,9 +2473,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.10.tgz", - "integrity": "sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", + "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", "cpu": [ "mips64el" ], @@ -2487,9 +2489,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.10.tgz", - "integrity": "sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", + "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", "cpu": [ "ppc64" ], @@ -2503,9 +2505,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.10.tgz", - "integrity": "sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", + "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", "cpu": [ "riscv64" ], @@ -2519,9 +2521,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.10.tgz", - "integrity": "sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", + "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", "cpu": [ "s390x" ], @@ -2535,9 +2537,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.10.tgz", - "integrity": "sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", + "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", "cpu": [ "x64" ], @@ -2551,9 +2553,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.10.tgz", - "integrity": "sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", + "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", "cpu": [ "x64" ], @@ -2567,9 +2569,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.10.tgz", - "integrity": "sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", + "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", "cpu": [ "x64" ], @@ -2583,9 +2585,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.10.tgz", - "integrity": "sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", + "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", "cpu": [ "x64" ], @@ -2599,9 +2601,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.10.tgz", - "integrity": "sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", + "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", "cpu": [ "arm64" ], @@ -2615,9 +2617,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.10.tgz", - "integrity": "sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", + "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", "cpu": [ "ia32" ], @@ -2631,9 +2633,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.10.tgz", - "integrity": "sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", "cpu": [ "x64" ], @@ -3380,9 +3382,9 @@ } }, "node_modules/@lezer/common": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.1.2.tgz", - "integrity": "sha512-V+GqBsga5+cQJMfM0GdnHmg4DgWvLzgMWjbldBg0+jC3k9Gu6nJNZDLJxXEBT1Xj8KhRN4jmbC5CY7SIL++sVw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.0.tgz", + "integrity": "sha512-Wmvlm4q6tRpwiy20TnB3yyLTZim38Tkc50dPY8biQRwqE+ati/wD84rm3N15hikvdT4uSg9phs9ubjvcLmkpKg==" }, "node_modules/@lezer/lr": { "version": "1.3.14", @@ -3594,14 +3596,14 @@ ] }, "node_modules/@mui/base": { - "version": "5.0.0-beta.28", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.28.tgz", - "integrity": "sha512-KIoSc5sUFceeCaZTq5MQBapFzhHqMo4kj+4azWaCAjorduhcRQtN+BCgVHmo+gvEjix74bUfxwTqGifnu2fNTg==", + "version": "5.0.0-beta.29", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.29.tgz", + "integrity": "sha512-OXfUssYrB6ch/xpBVHMKAjThPlI9VyGGKdvQLMXef2j39wXfcxPlUVQlwia/lmE3rxWIGvbwkZsDtNYzLMsDUg==", "dependencies": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.6", "@floating-ui/react-dom": "^2.0.4", "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "@mui/utils": "^5.15.2", "@popperjs/core": "^2.11.8", "clsx": "^2.0.0", "prop-types": "^15.8.1" @@ -3634,15 +3636,15 @@ } }, "node_modules/@mui/lab": { - "version": "5.0.0-alpha.157", - "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.157.tgz", - "integrity": "sha512-gY7UM2kNSxiVLfsm0o6HG2G5rM2Vr47prJhDCazY+VG/NOSRc8CG7la6dpL9WDTJhotEZdWwfj1FOUxTonmuQA==", + "version": "5.0.0-alpha.158", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.158.tgz", + "integrity": "sha512-MNn/J07GAipfElEEzDD9O7KLxz+mKgONJ+zBmlLgcCpDFsOh6nAuVQ2ONbeg1cgV/e553jXv8QHTWSRXw8KX4A==", "dependencies": { - "@babel/runtime": "^7.23.5", - "@mui/base": "5.0.0-beta.28", - "@mui/system": "^5.15.1", + "@babel/runtime": "^7.23.6", + "@mui/base": "5.0.0-beta.29", + "@mui/system": "^5.15.2", "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "@mui/utils": "^5.15.2", "clsx": "^2.0.0", "prop-types": "^15.8.1" }, @@ -3717,37 +3719,6 @@ } } }, - "node_modules/@mui/material/node_modules/@mui/base": { - "version": "5.0.0-beta.29", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.29.tgz", - "integrity": "sha512-OXfUssYrB6ch/xpBVHMKAjThPlI9VyGGKdvQLMXef2j39wXfcxPlUVQlwia/lmE3rxWIGvbwkZsDtNYzLMsDUg==", - "dependencies": { - "@babel/runtime": "^7.23.6", - "@floating-ui/react-dom": "^2.0.4", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.2", - "@popperjs/core": "^2.11.8", - "clsx": "^2.0.0", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@mui/private-theming": { "version": "5.15.2", "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.2.tgz", @@ -5709,9 +5680,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.1.tgz", - "integrity": "sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.2.tgz", + "integrity": "sha512-RKzxFxBHq9ysZ83fn8Iduv3A283K7zPPYuhL/z9CQuyFrjwpErJx0h4aeb/bnJ+q29GRLgJpY66ceQ/Wcsn3wA==", "cpu": [ "arm" ], @@ -5722,9 +5693,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.1.tgz", - "integrity": "sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.2.tgz", + "integrity": "sha512-yZ+MUbnwf3SHNWQKJyWh88ii2HbuHCFQnAYTeeO1Nb8SyEiWASEi5dQUygt3ClHWtA9My9RQAYkjvrsZ0WK8Xg==", "cpu": [ "arm64" ], @@ -5735,9 +5706,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.1.tgz", - "integrity": "sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.2.tgz", + "integrity": "sha512-vqJ/pAUh95FLc/G/3+xPqlSBgilPnauVf2EXOQCZzhZJCXDXt/5A8mH/OzU6iWhb3CNk5hPJrh8pqJUPldN5zw==", "cpu": [ "arm64" ], @@ -5748,9 +5719,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.1.tgz", - "integrity": "sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.2.tgz", + "integrity": "sha512-otPHsN5LlvedOprd3SdfrRNhOahhVBwJpepVKUN58L0RnC29vOAej1vMEaVU6DadnpjivVsNTM5eNt0CcwTahw==", "cpu": [ "x64" ], @@ -5761,9 +5732,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.1.tgz", - "integrity": "sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.2.tgz", + "integrity": "sha512-ewG5yJSp+zYKBYQLbd1CUA7b1lSfIdo9zJShNTyc2ZP1rcPrqyZcNlsHgs7v1zhgfdS+kW0p5frc0aVqhZCiYQ==", "cpu": [ "arm" ], @@ -5774,9 +5745,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.1.tgz", - "integrity": "sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.2.tgz", + "integrity": "sha512-pL6QtV26W52aCWTG1IuFV3FMPL1m4wbsRG+qijIvgFO/VBsiXJjDPE/uiMdHBAO6YcpV4KvpKtd0v3WFbaxBtg==", "cpu": [ "arm64" ], @@ -5787,9 +5758,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.1.tgz", - "integrity": "sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.2.tgz", + "integrity": "sha512-On+cc5EpOaTwPSNetHXBuqylDW+765G/oqB9xGmWU3npEhCh8xu0xqHGUA+4xwZLqBbIZNcBlKSIYfkBm6ko7g==", "cpu": [ "arm64" ], @@ -5800,9 +5771,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.1.tgz", - "integrity": "sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.2.tgz", + "integrity": "sha512-Wnx/IVMSZ31D/cO9HSsU46FjrPWHqtdF8+0eyZ1zIB5a6hXaZXghUKpRrC4D5DcRTZOjml2oBhXoqfGYyXKipw==", "cpu": [ "riscv64" ], @@ -5813,9 +5784,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.1.tgz", - "integrity": "sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.2.tgz", + "integrity": "sha512-ym5x1cj4mUAMBummxxRkI4pG5Vht1QMsJexwGP8547TZ0sox9fCLDHw9KCH9c1FO5d9GopvkaJsBIOkTKxksdw==", "cpu": [ "x64" ], @@ -5826,9 +5797,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.1.tgz", - "integrity": "sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.2.tgz", + "integrity": "sha512-m0hYELHGXdYx64D6IDDg/1vOJEaiV8f1G/iO+tejvRCJNSwK4jJ15e38JQy5Q6dGkn1M/9KcyEOwqmlZ2kqaZg==", "cpu": [ "x64" ], @@ -5839,9 +5810,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.1.tgz", - "integrity": "sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.2.tgz", + "integrity": "sha512-x1CWburlbN5JjG+juenuNa4KdedBdXLjZMp56nHFSHTOsb/MI2DYiGzLtRGHNMyydPGffGId+VgjOMrcltOksA==", "cpu": [ "arm64" ], @@ -5852,9 +5823,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.1.tgz", - "integrity": "sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.2.tgz", + "integrity": "sha512-VVzCB5yXR1QlfsH1Xw1zdzQ4Pxuzv+CPr5qpElpKhVxlxD3CRdfubAG9mJROl6/dmj5gVYDDWk8sC+j9BI9/kQ==", "cpu": [ "ia32" ], @@ -5865,9 +5836,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.1.tgz", - "integrity": "sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.2.tgz", + "integrity": "sha512-SYRedJi+mweatroB+6TTnJYLts0L0bosg531xnQWtklOI6dezEagx4Q0qDyvRdK+qgdA3YZpjjGuPFtxBmddBA==", "cpu": [ "x64" ], @@ -6203,9 +6174,9 @@ } }, "node_modules/@testing-library/user-event": { - "version": "14.5.1", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.1.tgz", - "integrity": "sha512-UCcUKrUYGj7ClomOo2SpNVvx4/fkd/2BbIHDCle8A0ax+P3bU7yJwDBDrS6ZwdTMARWTGODX1hEsCcO+7beJjg==", + "version": "14.5.2", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", + "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==", "dev": true, "engines": { "node": ">=12", @@ -6300,9 +6271,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.4", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz", - "integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" @@ -6408,9 +6379,9 @@ } }, "node_modules/@types/hast": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.8.tgz", - "integrity": "sha512-aMIqAlFd2wTIDZuvLbhUT+TGvMxrNC8ECUIVtH6xxy0sQLs3iu6NO8Kp/VT5je7i5ufnebXzdV1dNDMnvaH6IQ==", + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.9.tgz", + "integrity": "sha512-pTHyNlaMD/oKJmS+ZZUyFUcsZeBZpC0lmGquw98CqRVNgAdJZJeD7GoeLiT6Xbx5rU9VCjSt0RwEvDgzh4obFw==", "dependencies": { "@types/unist": "^2" } @@ -6489,17 +6460,17 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.10.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", - "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "version": "20.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", + "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==", + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.10.tgz", + "integrity": "sha512-PPpPK6F9ALFTn59Ka3BaL+qGuipRfxNE8qVgkp0bVixeiR2c2/L+IVOiBdu9JhhT22sWnQEp6YyHGI2b2+CMcA==", "dependencies": { "@types/node": "*", "form-data": "^4.0.0" @@ -6543,17 +6514,17 @@ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/reach__router": { - "version": "1.3.14", - "resolved": "https://registry.npmjs.org/@types/reach__router/-/reach__router-1.3.14.tgz", - "integrity": "sha512-2iOQZbwfw1ZYwYK+dRp7D1b8kU6GlFPJ/iEt33zDYxfId5CAKT7vX3lN/XmJ+FaMZ3FyB99tPgfajcmZnTqdtg==", + "version": "1.3.15", + "resolved": "https://registry.npmjs.org/@types/reach__router/-/reach__router-1.3.15.tgz", + "integrity": "sha512-5WEHKGglRjq/Ae3F8UQxg+GYUIhTUEiyBT9GKPoOLU/vPTn8iZrRbdzxqvarOaGludIejJykHLMdOCdhgWqaxA==", "dependencies": { "@types/react": "*" } }, "node_modules/@types/react": { - "version": "18.2.45", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.45.tgz", - "integrity": "sha512-TtAxCNrlrBp8GoeEp1npd5g+d/OejJHFxS3OWmrPBMFaVQMSN0OFySozJio5BHxTuTeug00AVXVAjfDSfk+lUg==", + "version": "18.2.46", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.46.tgz", + "integrity": "sha512-nNCvVBcZlvX4NU1nRRNV/mFl1nNRuTuslAJglQsq+8ldXe5Xv0Wd2f7WTE3jOxhLH2BFfiZGC6GCp+kHQbgG+w==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -6910,9 +6881,9 @@ } }, "node_modules/@vitest/coverage-v8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.1.0.tgz", - "integrity": "sha512-kHQRk70vTdXAyQY2C0vKOHPyQD/R6IUzcGdO4vCuyr4alE5Yg1+Sk2jSdjlIrTTXdcNEs+ReWVM09mmSFJpzyQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.1.1.tgz", + "integrity": "sha512-TCXSh6sA92t7D5p7HJ64sPCi+szP8E3NiKTsR3YR8vVEVZB9yclQu2btktCthxahKBl7PwheP5OuejYg13xccg==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.1", @@ -6937,13 +6908,13 @@ } }, "node_modules/@vitest/expect": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.1.0.tgz", - "integrity": "sha512-9IE2WWkcJo2BR9eqtY5MIo3TPmS50Pnwpm66A6neb2hvk/QSLfPXBz2qdiwUOQkwyFuuXEUj5380CbwfzW4+/w==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.1.1.tgz", + "integrity": "sha512-Qpw01C2Hyb3085jBkOJLQ7HRX0Ncnh2qV4p+xWmmhcIUlMykUF69zsnZ1vPmAjZpomw9+5tWEGOQ0GTfR8U+kA==", "dev": true, "dependencies": { - "@vitest/spy": "1.1.0", - "@vitest/utils": "1.1.0", + "@vitest/spy": "1.1.1", + "@vitest/utils": "1.1.1", "chai": "^4.3.10" }, "funding": { @@ -6951,12 +6922,12 @@ } }, "node_modules/@vitest/runner": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.1.0.tgz", - "integrity": "sha512-zdNLJ00pm5z/uhbWF6aeIJCGMSyTyWImy3Fcp9piRGvueERFlQFbUwCpzVce79OLm2UHk9iwaMSOaU9jVHgNVw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.1.1.tgz", + "integrity": "sha512-8HokyJo1SnSi3uPFKfWm/Oq1qDwLC4QDcVsqpXIXwsRPAg3gIDh8EbZ1ri8cmQkBxdOu62aOF9B4xcqJhvt4xQ==", "dev": true, "dependencies": { - "@vitest/utils": "1.1.0", + "@vitest/utils": "1.1.1", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -6992,9 +6963,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.1.0.tgz", - "integrity": "sha512-5O/wyZg09V5qmNmAlUgCBqflvn2ylgsWJRRuPrnHEfDNT6tQpQ8O1isNGgo+VxofISHqz961SG3iVvt3SPK/QQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.1.1.tgz", + "integrity": "sha512-WnMHjv4VdHLbFGgCdVVvyRkRPnOKN75JJg+LLTdr6ah7YnL75W+7CTIMdzPEPzaDxA8r5yvSVlc1d8lH3yE28w==", "dev": true, "dependencies": { "magic-string": "^0.30.5", @@ -7032,9 +7003,9 @@ } }, "node_modules/@vitest/spy": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.1.0.tgz", - "integrity": "sha512-sNOVSU/GE+7+P76qYo+VXdXhXffzWZcYIPQfmkiRxaNCSPiLANvQx5Mx6ZURJ/ndtEkUJEpvKLXqAYTKEY+lTg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.1.1.tgz", + "integrity": "sha512-hDU2KkOTfFp4WFFPWwHFauddwcKuGQ7gF6Un/ZZkCogoAiTMN7/7YKvUDbywPZZ754iCQGjdUmXN3t4k0jm1IQ==", "dev": true, "dependencies": { "tinyspy": "^2.2.0" @@ -7044,9 +7015,9 @@ } }, "node_modules/@vitest/utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.1.0.tgz", - "integrity": "sha512-z+s510fKmYz4Y41XhNs3vcuFTFhcij2YF7F8VQfMEYAAUfqQh0Zfg7+w9xdgFGhPf3tX3TicAe+8BDITk6ampQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.1.1.tgz", + "integrity": "sha512-E9LedH093vST/JuBSyHLFMpxJKW3dLhe/flUSPFedoyj4wKiFX7Jm8gYLtOIiin59dgrssfmFv0BJ1u8P/LC/A==", "dev": true, "dependencies": { "diff-sequences": "^29.6.3", @@ -7249,9 +7220,9 @@ } }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "bin": { "acorn": "bin/acorn" }, @@ -7902,11 +7873,26 @@ } }, "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", + "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", "dependencies": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios-mock-adapter": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", + "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "is-buffer": "^2.0.5" + }, + "peerDependencies": { + "axios": ">= 0.17.0" } }, "node_modules/axobject-query": { @@ -8827,9 +8813,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001571", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001571.tgz", - "integrity": "sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==", + "version": "1.0.30001572", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz", + "integrity": "sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==", "funding": [ { "type": "opencollective", @@ -9073,9 +9059,9 @@ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" }, "node_modules/classnames": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", - "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" }, "node_modules/clean-stack": { "version": "4.2.0", @@ -9369,9 +9355,9 @@ } }, "node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", "engines": { "node": ">=6" } @@ -9684,9 +9670,9 @@ } }, "node_modules/core-js": { - "version": "3.34.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.34.0.tgz", - "integrity": "sha512-aDdvlDder8QmY91H88GzNi9EtQi2TjvQhpCX6B1v/dAZHU1AuLgHvRh54RiOerpEhEW46Tkf+vgAViB/CWC0ag==", + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.35.0.tgz", + "integrity": "sha512-ntakECeqg81KqMueeGJ79Q5ZgQNR+6eaE8sxGCx62zMbAIj65q+uYvatToew3m6eAGdU4gNZwpZ34NMe4GYswg==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -9694,9 +9680,9 @@ } }, "node_modules/core-js-compat": { - "version": "3.34.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.34.0.tgz", - "integrity": "sha512-4ZIyeNbW/Cn1wkMMDy+mvrRUxrwFNjKwbhCfQpDd+eLgYipDqp8oGFGtLmhh18EDPKA0g3VUBYOxQGGwvWLVpA==", + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.0.tgz", + "integrity": "sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==", "dependencies": { "browserslist": "^4.22.2" }, @@ -9706,9 +9692,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.34.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.34.0.tgz", - "integrity": "sha512-pmhivkYXkymswFfbXsANmBAewXx86UBfmagP+w0wkK06kLsLlTK5oQmsURPivzMkIBQiYq2cjamcZExIwlFQIg==", + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.35.0.tgz", + "integrity": "sha512-f+eRYmkou59uh7BPcyJ8MC76DiGhspj1KMxVIcF24tzP8NA9HVa1uC7BTW2tgx7E1QVCzDzsgp7kArrzhlz8Ew==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -11154,9 +11140,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.10.tgz", - "integrity": "sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", "dev": true, "hasInstallScript": true, "bin": { @@ -11166,29 +11152,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.10", - "@esbuild/android-arm": "0.19.10", - "@esbuild/android-arm64": "0.19.10", - "@esbuild/android-x64": "0.19.10", - "@esbuild/darwin-arm64": "0.19.10", - "@esbuild/darwin-x64": "0.19.10", - "@esbuild/freebsd-arm64": "0.19.10", - "@esbuild/freebsd-x64": "0.19.10", - "@esbuild/linux-arm": "0.19.10", - "@esbuild/linux-arm64": "0.19.10", - "@esbuild/linux-ia32": "0.19.10", - "@esbuild/linux-loong64": "0.19.10", - "@esbuild/linux-mips64el": "0.19.10", - "@esbuild/linux-ppc64": "0.19.10", - "@esbuild/linux-riscv64": "0.19.10", - "@esbuild/linux-s390x": "0.19.10", - "@esbuild/linux-x64": "0.19.10", - "@esbuild/netbsd-x64": "0.19.10", - "@esbuild/openbsd-x64": "0.19.10", - "@esbuild/sunos-x64": "0.19.10", - "@esbuild/win32-arm64": "0.19.10", - "@esbuild/win32-ia32": "0.19.10", - "@esbuild/win32-x64": "0.19.10" + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" } }, "node_modules/escalade": { @@ -12487,9 +12473,9 @@ "integrity": "sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA==" }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "funding": [ { "type": "individual", @@ -14773,6 +14759,14 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/gatsby/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, "node_modules/gatsby/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -16064,9 +16058,9 @@ } }, "node_modules/i18next": { - "version": "23.7.11", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.7.11.tgz", - "integrity": "sha512-A/vOkw8vY99YHU9A1Td3I1dcTiYaPnwBWzrpVzfXUXSYgogK3cmBcmop/0cnXPc6QpUWIyqaugKNxRUEZVk9Nw==", + "version": "23.7.13", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.7.13.tgz", + "integrity": "sha512-DbCPlw6VmURSZa43iOnycxq9o15e+WuBWDBZ3aj+gQZcDz4sgnuKwrcwmP1n8gSSCwCN7CRFGTpnwTd93A16Mg==", "funding": [ { "type": "individual", @@ -17258,9 +17252,9 @@ "integrity": "sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==" }, "node_modules/jest-canvas-mock": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jest-canvas-mock/-/jest-canvas-mock-2.5.2.tgz", - "integrity": "sha512-vgnpPupjOL6+L5oJXzxTxFrlGEIbHdZqFU+LFNdtLxZ3lRDCl17FlTMM7IatoRQkrcyOTMlDinjUguqmQ6bR2A==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jest-canvas-mock/-/jest-canvas-mock-2.5.1.tgz", + "integrity": "sha512-IVnRiz+v4EYn3ydM/pBo8GW/J+nU/Hg5gHBQQOUQhdRyNfvHnabB8ReqARLO0p+kvQghqr4V0tA92CF3JcUSRg==", "dependencies": { "cssfontparser": "^1.2.1", "moo-color": "^1.0.2" @@ -20758,9 +20752,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/msgpackr": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.10.0.tgz", - "integrity": "sha512-rVQ5YAQDoZKZLX+h8tNq7FiHrPJoeGHViz3U4wIcykhAEpwF/nH2Vbk8dQxmpX5JavkI8C7pt4bnkJ02ZmRoUw==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.10.1.tgz", + "integrity": "sha512-r5VRLv9qouXuLiIBrLpl2d5ZvPt8svdQTl5/vMvE4nzDMyEX4sgW5yWhuBBj5UmgwOTWj8CIdSXn5sAfsHAWIQ==", "optionalDependencies": { "msgpackr-extract": "^3.0.2" } @@ -22862,9 +22856,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -23181,6 +23175,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -23821,16 +23820,16 @@ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" }, "node_modules/react-world-flags/node_modules/svgo": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.1.0.tgz", - "integrity": "sha512-R5SnNA89w1dYgNv570591F66v34b3eQShpIBcQtZtM5trJwm1VvxbIoMpRYY3ybTAutcKTLEmTsdnaknOHbiQA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.2.0.tgz", + "integrity": "sha512-4PP6CMW/V7l/GmKRKzsLR8xxjdHTV4IMvhTnpuHwwBazSIlw5W/5SmPjN8Dwyt7lKbSJrRDgp4t9ph0HgChFBQ==", "dependencies": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^5.1.0", - "css-tree": "^2.2.1", + "css-tree": "^2.3.1", "css-what": "^6.1.0", - "csso": "5.0.5", + "csso": "^5.0.5", "picocolors": "^1.0.0" }, "bin": { @@ -25212,9 +25211,9 @@ } }, "node_modules/rollup": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", - "integrity": "sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.2.tgz", + "integrity": "sha512-66RB8OtFKUTozmVEh3qyNfH+b+z2RXBVloqO2KCC/pjFaGaHtxP9fVfOQKPSGXg2mElmjmxjW/fZ7iKrEpMH5Q==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -25224,19 +25223,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.1", - "@rollup/rollup-android-arm64": "4.9.1", - "@rollup/rollup-darwin-arm64": "4.9.1", - "@rollup/rollup-darwin-x64": "4.9.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.1", - "@rollup/rollup-linux-arm64-gnu": "4.9.1", - "@rollup/rollup-linux-arm64-musl": "4.9.1", - "@rollup/rollup-linux-riscv64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-musl": "4.9.1", - "@rollup/rollup-win32-arm64-msvc": "4.9.1", - "@rollup/rollup-win32-ia32-msvc": "4.9.1", - "@rollup/rollup-win32-x64-msvc": "4.9.1", + "@rollup/rollup-android-arm-eabi": "4.9.2", + "@rollup/rollup-android-arm64": "4.9.2", + "@rollup/rollup-darwin-arm64": "4.9.2", + "@rollup/rollup-darwin-x64": "4.9.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.2", + "@rollup/rollup-linux-arm64-gnu": "4.9.2", + "@rollup/rollup-linux-arm64-musl": "4.9.2", + "@rollup/rollup-linux-riscv64-gnu": "4.9.2", + "@rollup/rollup-linux-x64-gnu": "4.9.2", + "@rollup/rollup-linux-x64-musl": "4.9.2", + "@rollup/rollup-win32-arm64-msvc": "4.9.2", + "@rollup/rollup-win32-ia32-msvc": "4.9.2", + "@rollup/rollup-win32-x64-msvc": "4.9.2", "fsevents": "~2.3.2" } }, @@ -26894,15 +26893,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -28222,9 +28221,9 @@ } }, "node_modules/vite-node": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.1.0.tgz", - "integrity": "sha512-jV48DDUxGLEBdHCQvxL1mEh7+naVy+nhUUUaPAZLd3FJgXuxQiewHcfeZebbJ6onDqNGkP4r3MhQ342PRlG81Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.1.1.tgz", + "integrity": "sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow==", "dev": true, "dependencies": { "cac": "^6.7.14", @@ -28244,16 +28243,16 @@ } }, "node_modules/vitest": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.1.0.tgz", - "integrity": "sha512-oDFiCrw7dd3Jf06HoMtSRARivvyjHJaTxikFxuqJjO76U436PqlVw1uLn7a8OSPrhSfMGVaRakKpA2lePdw79A==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.1.1.tgz", + "integrity": "sha512-Ry2qs4UOu/KjpXVfOCfQkTnwSXYGrqTbBZxw6reIYEFjSy1QUARRg5pxiI5BEXy+kBVntxUYNMlq4Co+2vD3fQ==", "dev": true, "dependencies": { - "@vitest/expect": "1.1.0", - "@vitest/runner": "1.1.0", - "@vitest/snapshot": "1.1.0", - "@vitest/spy": "1.1.0", - "@vitest/utils": "1.1.0", + "@vitest/expect": "1.1.1", + "@vitest/runner": "1.1.1", + "@vitest/snapshot": "1.1.1", + "@vitest/spy": "1.1.1", + "@vitest/utils": "1.1.1", "acorn-walk": "^8.3.0", "cac": "^6.7.14", "chai": "^4.3.10", @@ -28268,7 +28267,7 @@ "tinybench": "^2.5.1", "tinypool": "^0.8.1", "vite": "^5.0.0", - "vite-node": "1.1.0", + "vite-node": "1.1.1", "why-is-node-running": "^2.2.2" }, "bin": { @@ -28356,6 +28355,16 @@ "vitest": "*" } }, + "node_modules/vitest-canvas-mock/node_modules/jest-canvas-mock": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jest-canvas-mock/-/jest-canvas-mock-2.5.2.tgz", + "integrity": "sha512-vgnpPupjOL6+L5oJXzxTxFrlGEIbHdZqFU+LFNdtLxZ3lRDCl17FlTMM7IatoRQkrcyOTMlDinjUguqmQ6bR2A==", + "dev": true, + "dependencies": { + "cssfontparser": "^1.2.1", + "moo-color": "^1.0.2" + } + }, "node_modules/vitest/node_modules/execa": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", @@ -29107,9 +29116,9 @@ } }, "node_modules/ws": { - "version": "8.15.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", - "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "dev": true, "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index ccb9388a3..6fdb663e7 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@mui/x-date-pickers": "^6.18.5", "@popperjs/core": "^2.11.8", "@react-icons/all-files": "^4.1.0", + "axios": "^1.6.3", "bootstrap": "^5.3.2", "date-fns": "^2.30.0", "flexsearch": "^0.7.31", @@ -48,7 +49,7 @@ "html-to-text": "^9.0.5", "i18next": "^23.7.11", "iso-639-1": "^3.1.0", - "jest-canvas-mock": "2.5.2", + "jest-canvas-mock": "2.5.1", "moment": "^2.30.1", "prismjs": "^1.29.0", "prop-types": "^15.8.1", @@ -80,6 +81,7 @@ "@vitejs/plugin-react": "^4.2.1", "@vitest/coverage-v8": "^1.1.0", "ajv": "^8.12.0", + "axios-mock-adapter": "^1.22.0", "babel-preset-gatsby": "^3.12.1", "gatsby-cli": "^5.12.4", "jsdom": "^22.1.0", diff --git a/src/hooks/__tests__/__snapshots__/fetchMarketplace.test.tsx.snap b/src/hooks/__tests__/__snapshots__/fetchMarketplace.test.tsx.snap index f98dc9b4e..deb20419a 100644 --- a/src/hooks/__tests__/__snapshots__/fetchMarketplace.test.tsx.snap +++ b/src/hooks/__tests__/__snapshots__/fetchMarketplace.test.tsx.snap @@ -7,7 +7,6 @@ exports[`getAllPkgsForVersion > returns valid JSON - Alpine Linux 1`] = ` { "architecture": "arch_mock", "image_type": "jdk", - "installer": undefined, "os": "os_mock", "package": { "checksum": "checksum_mock", @@ -22,8 +21,8 @@ exports[`getAllPkgsForVersion > returns valid JSON - Alpine Linux 1`] = ` "release_link": "https://release_link_mock/", "release_name": "release_name_mock", "release_type": "release_type_mock", - "timestamp": 2020-01-01T00:00:00.000Z, - "updated_at": 2020-01-01T00:00:00.000Z, + "timestamp": "2020-01-01T00:00:00.000Z", + "updated_at": "2020-01-01T00:00:00.000Z", "vendor": "vendor_mock", "version_data": { "build": 0, @@ -64,8 +63,8 @@ exports[`getAllPkgsForVersion > returns valid JSON - installer 1`] = ` "release_link": "https://release_link_mock/", "release_name": "release_name_mock", "release_type": "release_type_mock", - "timestamp": 2020-01-01T00:00:00.000Z, - "updated_at": 2020-01-01T00:00:00.000Z, + "timestamp": "2020-01-01T00:00:00.000Z", + "updated_at": "2020-01-01T00:00:00.000Z", "vendor": "vendor_mock", "version_data": { "build": 0, @@ -86,7 +85,6 @@ exports[`getAllPkgsForVersion > returns valid JSON 1`] = ` { "architecture": "arch_mock", "image_type": "jdk", - "installer": undefined, "os": "os_mock", "package": { "checksum": "checksum_mock", @@ -101,8 +99,8 @@ exports[`getAllPkgsForVersion > returns valid JSON 1`] = ` "release_link": "https://release_link_mock/", "release_name": "release_name_mock", "release_type": "release_type_mock", - "timestamp": 2020-01-01T00:00:00.000Z, - "updated_at": 2020-01-01T00:00:00.000Z, + "timestamp": "2020-01-01T00:00:00.000Z", + "updated_at": "2020-01-01T00:00:00.000Z", "vendor": "vendor_mock", "version_data": { "build": 0, diff --git a/src/hooks/__tests__/__snapshots__/fetchNews.test.tsx.snap b/src/hooks/__tests__/__snapshots__/fetchNews.test.tsx.snap index abd1a3ebb..0a5fedfab 100644 --- a/src/hooks/__tests__/__snapshots__/fetchNews.test.tsx.snap +++ b/src/hooks/__tests__/__snapshots__/fetchNews.test.tsx.snap @@ -4,7 +4,7 @@ exports[`fetchNewsItems > returns valid news and events object 1`] = ` { "events": [ { - "date": 2020-01-01T00:00:00.000Z, + "date": "2020-01-01T00:00:00.000Z", "id": "id_mock", "infoLink": "https://link_mock/", "title": "events_title_mock", @@ -14,7 +14,7 @@ exports[`fetchNewsItems > returns valid news and events object 1`] = ` "news": [ { "body": "body_mock", - "date": 2020-01-01T00:00:00.000Z, + "date": "2020-01-01T00:00:00.000Z", "id": "id_mock", "link": "https://link_mock/", "title": "news_title_mock", diff --git a/src/hooks/__tests__/__snapshots__/fetchTemurinArchive.test.tsx.snap b/src/hooks/__tests__/__snapshots__/fetchTemurinArchive.test.tsx.snap index cbc89cc4a..51ee2eea2 100644 --- a/src/hooks/__tests__/__snapshots__/fetchTemurinArchive.test.tsx.snap +++ b/src/hooks/__tests__/__snapshots__/fetchTemurinArchive.test.tsx.snap @@ -22,7 +22,7 @@ exports[`getAssetsForVersion > returns valid JSON - ea 1`] = ` }, "release_link": "https://release_link_mock/", "release_name": "release_name_mock", - "timestamp": 2020-01-01T00:00:00.000Z, + "timestamp": "2020-01-01T00:00:00.000Z", }, ], } @@ -54,7 +54,7 @@ exports[`getAssetsForVersion > returns valid JSON - with installers 1`] = ` }, "release_link": "https://release_link_mock/", "release_name": "release_name_mock", - "timestamp": 2020-01-01T00:00:00.000Z, + "timestamp": "2020-01-01T00:00:00.000Z", }, ], } @@ -83,7 +83,7 @@ exports[`getAssetsForVersion > returns valid JSON - with release notes 1`] = ` "release_link": "https://release_link_mock/", "release_name": "release_name_mock", "release_notes": true, - "timestamp": 2020-01-01T00:00:00.000Z, + "timestamp": "2020-01-01T00:00:00.000Z", }, ], } @@ -112,7 +112,7 @@ exports[`getAssetsForVersion > returns valid JSON - with source 1`] = ` "release_link": "https://release_link_mock/", "release_name": "release_name_mock", "source_url": "https://source_mock/", - "timestamp": 2020-01-01T00:00:00.000Z, + "timestamp": "2020-01-01T00:00:00.000Z", }, ], } @@ -140,7 +140,7 @@ exports[`getAssetsForVersion > returns valid JSON 1`] = ` }, "release_link": "https://release_link_mock/", "release_name": "release_name_mock", - "timestamp": 2020-01-01T00:00:00.000Z, + "timestamp": "2020-01-01T00:00:00.000Z", }, ], } diff --git a/src/hooks/__tests__/fetchLatestTemurin.test.tsx b/src/hooks/__tests__/fetchLatestTemurin.test.tsx index 319a0cafe..b1c367962 100644 --- a/src/hooks/__tests__/fetchLatestTemurin.test.tsx +++ b/src/hooks/__tests__/fetchLatestTemurin.test.tsx @@ -2,37 +2,60 @@ import { renderHook, waitFor } from '@testing-library/react' import { describe, expect, it, vi } from 'vitest' import { fetchLatestForOS } from '../fetchLatestTemurin'; import { mockLatestTemurin } from '../../__fixtures__/hooks'; +import axios from 'axios' +import MockAdapter from 'axios-mock-adapter'; -let mockResponse = [mockLatestTemurin(false)]; - -global.fetch = vi.fn(() => Promise.resolve({ - json: () => Promise.resolve(mockResponse) -})); +const mock = new MockAdapter(axios); afterEach(() => { vi.clearAllMocks(); + mock.reset(); +}); + +afterAll(() => { + mock.restore(); }); describe('fetchLatestForOS', () => { it('binary URL is set correctly', async () => { + const mockResponse = [mockLatestTemurin(false)]; + + mock.onGet().reply(200, mockResponse); + let spy = vi.spyOn(axios, "get"); + const { result } = renderHook(() => fetchLatestForOS(true, 11, 'linux', 'x64')); await waitFor(() => { expect(result.current?.release_name).toBe('release_name_mock') }, { interval: 1 }); - expect(global.fetch).toHaveBeenCalledTimes(1) - expect(fetch).toHaveBeenCalledWith( + expect(spy).toHaveBeenCalledTimes(1) + expect(spy).toHaveBeenCalledWith( "https://api.adoptium.net/v3/assets/feature_releases/11/ga?os=linux&architecture=x64&image_type=jdk&jvm_impl=hotspot&page_size=1&vendor=eclipse" ); expect(result.current).toMatchSnapshot() }) it('installer is returned if available', async () => { - mockResponse = [mockLatestTemurin(true)]; + const mockResponse = [mockLatestTemurin(true)]; + + mock.onGet().reply(200, mockResponse); + let spy = vi.spyOn(axios, "get"); + const { result } = renderHook(() => fetchLatestForOS(true, 11, 'linux', 'x64')); await waitFor(() => { expect(result.current?.release_name).toBe('release_name_mock') }, { interval: 1 }); - expect(global.fetch).toHaveBeenCalledTimes(1) + expect(spy).toHaveBeenCalledTimes(1) expect(result.current).toMatchSnapshot() }) + + it('binary to be null on error', async() => { + mock.onGet().reply(500); + let spy = vi.spyOn(axios, "get"); + + const { result } = renderHook(() => fetchLatestForOS(true, 11, 'linux', 'x64')); + await waitFor(() => { + expect(result).toBeNull + }, { interval: 1 }); + expect(spy).toHaveBeenCalledTimes(1) + }) }); \ No newline at end of file diff --git a/src/hooks/__tests__/fetchMarketplace.test.tsx b/src/hooks/__tests__/fetchMarketplace.test.tsx index c4bdf3d59..85565b799 100644 --- a/src/hooks/__tests__/fetchMarketplace.test.tsx +++ b/src/hooks/__tests__/fetchMarketplace.test.tsx @@ -4,20 +4,21 @@ import { getAllPkgsForVersion, getImageForDistribution } from '../fetchMarketpla import { createMockTemurinFeatureReleaseAPI } from '../../__fixtures__/hooks'; import vendors from '../../json/marketplace.json'; import getVendorIdentifier from '../../util/vendors'; +import AxiosInstance from 'axios' +import MockAdapter from 'axios-mock-adapter'; +const mock = new MockAdapter(AxiosInstance); let mockResponse = [createMockTemurinFeatureReleaseAPI(false)]; let selectedVendorIdentifiers = vendors.map(v => getVendorIdentifier(v)); -global.fetch = vi.fn(() => Promise.resolve({ - json: () => Promise.resolve(mockResponse) -})); - afterEach(() => { vi.clearAllMocks(); }); describe('getAllPkgsForVersion', () => { it('returns valid JSON', async() => { + mock.onGet().reply(200, mockResponse); + renderHook(async() => { await getAllPkgsForVersion(8, 'linux', 'x64', 'jdk', selectedVendorIdentifiers).then((data) => { expect(data).toMatchSnapshot() @@ -26,6 +27,8 @@ describe('getAllPkgsForVersion', () => { }); it('returns valid JSON - Alpine Linux', async() => { + mock.onGet().reply(200, mockResponse); + renderHook(async() => { await getAllPkgsForVersion(8, 'alpine-linux', 'x64', 'any', selectedVendorIdentifiers).then((data) => { expect(data).toMatchSnapshot() @@ -35,6 +38,9 @@ describe('getAllPkgsForVersion', () => { it('returns valid JSON - installer', async() => { mockResponse = [createMockTemurinFeatureReleaseAPI(true)]; + + mock.onGet().reply(200, mockResponse); + renderHook(async() => { await getAllPkgsForVersion(8, 'linux', 'x64', 'jdk', selectedVendorIdentifiers).then((data) => { expect(data).toMatchSnapshot() @@ -50,4 +56,14 @@ describe('getAllPkgsForVersion', () => { expect(getImageForDistribution('zulu')).toBe('/images/azul-logo.png'); expect(getImageForDistribution('semeru')).toBe('/images/ibm-logo.png'); }); + + it('MarketplaceReleases to be null on error', async() => { + mock.onGet().reply(500); + + renderHook(async() => { + await getAllPkgsForVersion(8, 'linux', 'x64', 'jdk', selectedVendorIdentifiers).then((data) => { + expect(data).toBeNull + }) + }); + }) }); \ No newline at end of file diff --git a/src/hooks/__tests__/fetchNews.test.tsx b/src/hooks/__tests__/fetchNews.test.tsx index 1f5c1dab2..d80ba0eb6 100644 --- a/src/hooks/__tests__/fetchNews.test.tsx +++ b/src/hooks/__tests__/fetchNews.test.tsx @@ -2,33 +2,45 @@ import { renderHook, waitFor } from '@testing-library/react' import { describe, expect, it, vi } from 'vitest' import { fetchNewsItems } from '../fetchNews'; import { mockNewsAPI, mockEventsAPI } from '../../__fixtures__/hooks'; +import axios from 'axios' +import MockAdapter from 'axios-mock-adapter'; -global.fetch = vi.fn() - .mockImplementation((url: URL) => { - switch (url.pathname) { - case '/api/news': - return Promise.resolve({ - json: () => Promise.resolve(mockNewsAPI()) - }); - case '/api/events': - return Promise.resolve({ - json: () => Promise.resolve(mockEventsAPI()) - }); - } - }); +const mock = new MockAdapter(axios); afterEach(() => { vi.clearAllMocks(); + mock.reset(); +}); + +afterAll(() => { + mock.restore(); }); describe('fetchNewsItems', () => { it('returns valid news and events object', async () => { + mock.onGet(/.*\/api\/news.*/).reply(200, mockNewsAPI()); + mock.onGet(/.*\/api\/events.*/).reply(200, mockEventsAPI()); + let spy = vi.spyOn(axios, "get"); + const { result } = renderHook(() => fetchNewsItems(true, 1)); await waitFor(() => { expect(result.current?.news.news[0].title).toBe('news_title_mock') expect(result.current?.events[0].title).toBe('events_title_mock') }, { interval: 1 }); - expect(global.fetch).toHaveBeenCalledTimes(2) + expect(spy).toHaveBeenCalledTimes(2) expect(result.current).toMatchSnapshot() }) + + it('newsAndEvents to be empty on error', async() => { + mock.onGet().reply(500); + let spy = vi.spyOn(axios, "get"); + + const { result } = renderHook(() => fetchNewsItems(true, 1)); + await waitFor(() => { + expect(result.current?.news.news).toStrictEqual([]) + expect(result.current?.events).toStrictEqual([]) + }, { interval: 1 }); + + expect(spy).toHaveBeenCalledTimes(2) + }) }); \ No newline at end of file diff --git a/src/hooks/__tests__/fetchReleaseNotes.test.tsx b/src/hooks/__tests__/fetchReleaseNotes.test.tsx index a03ac8f81..db1d40920 100644 --- a/src/hooks/__tests__/fetchReleaseNotes.test.tsx +++ b/src/hooks/__tests__/fetchReleaseNotes.test.tsx @@ -2,51 +2,63 @@ import { renderHook, waitFor } from '@testing-library/react' import { describe, expect, it, vi } from 'vitest' import { fetchReleaseNotesForVersion } from '../fetchReleaseNotes'; import { createMockReleaseNotesAPI } from '../../__fixtures__/hooks'; +import axios from 'axios' +import MockAdapter from 'axios-mock-adapter'; +const mock = new MockAdapter(axios); let mockResponse = createMockReleaseNotesAPI(1); -// @ts-ignore -global.fetch = vi.fn(() => Promise.resolve({ - json: () => Promise.resolve(mockResponse) -})); - afterEach(() => { vi.clearAllMocks(); + mock.reset(); +}); + +afterAll(() => { + mock.restore(); }); let sortReleaseNotesByCallback = vi.fn(); describe('fetchReleaseNotesForVersion', () => { it('returns valid JSON', async () => { + mock.onGet().reply(200, mockResponse); + let spy = vi.spyOn(axios, "get"); + const { result } = renderHook(() => fetchReleaseNotesForVersion(true, 'sample_version', sortReleaseNotesByCallback)); await waitFor(() => { expect(result.current?.release_name).toBe('release_name_mock') }, { interval: 1 }); - expect(global.fetch).toHaveBeenCalledTimes(1) - expect(fetch).toHaveBeenCalledWith( + expect(spy).toHaveBeenCalledTimes(1) + expect(spy).toHaveBeenCalledWith( "https://api.adoptium.net/v3/info/release_notes/sample_version" ); expect(result.current).toMatchSnapshot() }); it('returns null if error is caught in fetch', async () => { - global.fetch = vi.fn(() => Promise.reject('error')); + mock.onGet().reply(200, mockResponse); + let spy = vi.spyOn(axios, "get"); + const { result } = renderHook(() => fetchReleaseNotesForVersion(true, 'sample_version', sortReleaseNotesByCallback)); await waitFor(() => { expect(result.current).toBe(null) }, { interval: 1 }); - expect(global.fetch).toHaveBeenCalledTimes(1) - expect(fetch).toHaveBeenCalledWith( + expect(spy).toHaveBeenCalledTimes(1) + expect(spy).toHaveBeenCalledWith( "https://api.adoptium.net/v3/info/release_notes/sample_version" ); }); it('returns null if version is not defined', async () => { + mock.onGet().reply(200, mockResponse); + const { result } = renderHook(() => fetchReleaseNotesForVersion(true, null, sortReleaseNotesByCallback)); expect(result.current).toBe(null) }); it('checks sortReleaseNotesByCallback to be called', async () => { + mock.onGet().reply(200, mockResponse); + const { result } = renderHook(() => fetchReleaseNotesForVersion(true, 'sample_version', sortReleaseNotesByCallback)); await waitFor(() => { expect(sortReleaseNotesByCallback).toHaveBeenCalledTimes(1) @@ -54,9 +66,22 @@ describe('fetchReleaseNotesForVersion', () => { }); it('checks sortReleaseNotesByCallback NOT to be called', async () => { + mock.onGet().reply(200, mockResponse); + const { result } = renderHook(() => fetchReleaseNotesForVersion(true, 'sample_version')); await waitFor(() => { expect(sortReleaseNotesByCallback).toHaveBeenCalledTimes(0); }, { interval: 1 }); }); + + it('releaseNotes to be null on error', async() => { + mock.onGet().reply(500); + let spy = vi.spyOn(axios, "get"); + + const { result } = renderHook(() => fetchReleaseNotesForVersion(true, 'sample_version')); + await waitFor(() => { + expect(result).toBeNull + }, { interval: 1 }); + expect(spy).toHaveBeenCalledTimes(1) + }) }); \ No newline at end of file diff --git a/src/hooks/__tests__/fetchTemurinArchive.test.tsx b/src/hooks/__tests__/fetchTemurinArchive.test.tsx index 8d3ea9a7b..9c5981bd3 100644 --- a/src/hooks/__tests__/fetchTemurinArchive.test.tsx +++ b/src/hooks/__tests__/fetchTemurinArchive.test.tsx @@ -2,17 +2,12 @@ import { renderHook } from '@testing-library/react' import { describe, expect, it, vi } from 'vitest' import { getAssetsForVersion } from '../fetchTemurinArchive'; import { createMockTemurinFeatureReleaseAPI } from '../../__fixtures__/hooks'; +import AxiosInstance from 'axios' +import MockAdapter from 'axios-mock-adapter'; +const mock = new MockAdapter(AxiosInstance); let mockResponse = [createMockTemurinFeatureReleaseAPI(false)]; -// @ts-ignore -global.fetch = vi.fn(() => Promise.resolve({ - json: () => Promise.resolve(mockResponse), - headers: { - get: () => '3' - } -})); - afterEach(() => { vi.clearAllMocks(); mockResponse = [createMockTemurinFeatureReleaseAPI(false)]; @@ -20,6 +15,8 @@ afterEach(() => { describe('getAssetsForVersion', () => { it('returns valid JSON', async() => { + mock.onGet().reply(200, mockResponse, { 'pagecount': '3' }); + renderHook(async() => { await getAssetsForVersion(8, 'ga', 5, new Date(Date.UTC(2020, 0, 1)), 0).then((data) => { expect(data).toMatchSnapshot() @@ -46,6 +43,8 @@ describe('getAssetsForVersion', () => { // add a second binary same as the first but with invalid image_type mockResponse[0].binaries.push(newBinary); + mock.onGet().reply(200, mockResponse, { 'pagecount': '3' }); + renderHook(async() => { await getAssetsForVersion(8, 'ea', 5, new Date(Date.UTC(2020, 0, 1)), 0).then((data) => { expect(data).toMatchSnapshot() @@ -59,6 +58,9 @@ describe('getAssetsForVersion', () => { size: 100, link: new URL('https://source_mock/') } + + mock.onGet().reply(200, mockResponse, { 'pagecount': '3' }); + renderHook(async() => { await getAssetsForVersion(8, 'ga', 5, new Date(Date.UTC(2020, 0, 1)), 0).then((data) => { expect(data).toMatchSnapshot() @@ -72,6 +74,9 @@ describe('getAssetsForVersion', () => { size: 100, link: new URL('https://release_notes_mock/') } + + mock.onGet().reply(200, mockResponse, { 'pagecount': '3' }); + renderHook(async() => { await getAssetsForVersion(8, 'ga', 5, new Date(Date.UTC(2020, 0, 1)), 0).then((data) => { expect(data).toMatchSnapshot() @@ -81,6 +86,9 @@ describe('getAssetsForVersion', () => { it('returns valid JSON - invalid image_type', async() => { mockResponse[0].binaries[0].image_type = 'foobar'; + + mock.onGet().reply(200, mockResponse, { 'pagecount': '3' }); + renderHook(async() => { await getAssetsForVersion(8, 'ga', 5, new Date(Date.UTC(2020, 0, 1)), 0).then((data) => { expect(data?.releases[0].platforms).toStrictEqual({}) @@ -90,10 +98,24 @@ describe('getAssetsForVersion', () => { it('returns valid JSON - with installers', async() => { mockResponse = [createMockTemurinFeatureReleaseAPI(true)]; + + mock.onGet().reply(200, mockResponse, { 'pagecount': '3' }); + renderHook(async() => { await getAssetsForVersion(8, 'ga', 5, new Date(Date.UTC(2020, 0, 1)), 0).then((data) => { expect(data).toMatchSnapshot() }) }); }); + + it('ReturnedReleases to be empty on error', async() => { + mock.onGet().reply(500); + + renderHook(async() => { + await getAssetsForVersion(8, 'ga', 5, new Date(Date.UTC(2020, 0, 1)), 0).then((data) => { + expect(data?.releases).toStrictEqual([]) + expect(data?.pagecount).toBe(0) + }) + }); + }) }); \ No newline at end of file diff --git a/src/hooks/__tests__/fetchTemurinReleases.test.tsx b/src/hooks/__tests__/fetchTemurinReleases.test.tsx index 20d47a95d..c359d81d2 100644 --- a/src/hooks/__tests__/fetchTemurinReleases.test.tsx +++ b/src/hooks/__tests__/fetchTemurinReleases.test.tsx @@ -2,20 +2,20 @@ import { renderHook } from '@testing-library/react' import { describe, expect, it, vi } from 'vitest' import { loadLatestAssets } from '../fetchTemurinReleases'; import { createMockTemurinReleaseAPI } from '../../__fixtures__/hooks'; +import AxiosInstance from 'axios' +import MockAdapter from 'axios-mock-adapter'; +const mock = new MockAdapter(AxiosInstance); let mockResponse = [createMockTemurinReleaseAPI(false, 'jdk')]; -// @ts-ignore -global.fetch = vi.fn(() => Promise.resolve({ - json: () => Promise.resolve(mockResponse) -})); - afterEach(() => { vi.clearAllMocks(); }); describe('loadLatestAssets', () => { it('returns valid JSON', async() => { + mock.onGet().reply(200, mockResponse); + renderHook(async() => { await loadLatestAssets(8, 'linux', 'x64', 'jdk').then((data) => { expect(data).toMatchSnapshot() @@ -28,6 +28,9 @@ describe('loadLatestAssets', () => { createMockTemurinReleaseAPI(false, 'sources'), createMockTemurinReleaseAPI(false, 'jdk') ]; + + mock.onGet().reply(200, mockResponse); + renderHook(async() => { await loadLatestAssets(8, 'linux', 'x64', 'any').then((data) => { expect(data).toMatchSnapshot() @@ -40,10 +43,23 @@ describe('loadLatestAssets', () => { createMockTemurinReleaseAPI(true, 'jdk'), createMockTemurinReleaseAPI(true, 'jre') ] + + mock.onGet().reply(200, mockResponse); + renderHook(async() => { await loadLatestAssets(8, 'linux', 'x64', 'jre').then((data) => { expect(data).toMatchSnapshot() }) }); }); + + it('pkgsFound to be empty on error', async() => { + mock.onGet().reply(500); + + renderHook(async() => { + await loadLatestAssets(8, 'linux', 'x64', 'jdk').then((data) => { + expect(data).toStrictEqual([]) + }) + }); + }) }); diff --git a/src/hooks/__tests__/useAdoptiumContributorsApi.test.tsx b/src/hooks/__tests__/useAdoptiumContributorsApi.test.tsx index 44a620889..2d2442d6b 100644 --- a/src/hooks/__tests__/useAdoptiumContributorsApi.test.tsx +++ b/src/hooks/__tests__/useAdoptiumContributorsApi.test.tsx @@ -2,11 +2,19 @@ import { renderHook, waitFor } from '@testing-library/react' import { vi } from 'vitest'; import { useAdoptiumContributorsApi } from '../useAdoptiumContributorsApi'; import { createMockAdoptiumContributorsApi } from '../../__fixtures__/hooks'; +import axios from 'axios' +import MockAdapter from 'axios-mock-adapter'; +const mock = new MockAdapter(axios); const mockResponse = [createMockAdoptiumContributorsApi()]; afterEach(() => { vi.clearAllMocks(); + mock.reset(); +}); + +afterAll(() => { + mock.restore(); }); describe('useAdoptiumContributorsApi hook', () => { @@ -34,18 +42,8 @@ describe('useAdoptiumContributorsApi hook', () => { }); it('fetches data when isVisible is true', async () => { - // @ts-ignore - global.fetch = vi.fn(() => Promise.resolve({ - json: () => Promise.resolve(mockResponse), - headers: { - get: (header: string) => { - if (header === 'Link') { - return '; rel="next", ; rel="last"'; - } - return null; - } - } - })); + mock.onGet().reply(200, mockResponse, {'Link': '; rel="next", ; rel="last"'}); + const { result } = renderHook(() => useAdoptiumContributorsApi(true)); await waitFor(() => { @@ -68,12 +66,40 @@ describe('useAdoptiumContributorsApi hook', () => { }); it('returns null if error is caught in fetch', async () => { - global.fetch = vi.fn(() => Promise.reject('error')); + mock.onGet().reply(500); + let spy = vi.spyOn(axios, "get"); + + const { result } = renderHook(() => useAdoptiumContributorsApi(true)); + await waitFor(() => { + expect(spy).toHaveBeenCalledTimes(1); + }); + + expect(result.current).toBeNull(); + }); + + it('getMaxContributors fails on error', async () => { + mock.onGet().reply(500); + let spy = vi.spyOn(axios, "get"); + const { result } = renderHook(() => useAdoptiumContributorsApi(true)); await waitFor(() => { - expect(global.fetch).toHaveBeenCalledTimes(1); + expect(spy).toHaveBeenCalledTimes(1); + }); + + expect(result.current).toBeNull(); + }); + + it('getContributor fails on error', async () => { + mock.onGet(/.*\/contributors\?per_page=1$/).reply(200, mockResponse, {'Link': '; rel="next", ; rel="last"'}); + mock.onGet().reply(500); + let spy = vi.spyOn(axios, "get"); + + const { result } = renderHook(() => useAdoptiumContributorsApi(true)); + + await waitFor(() => { + expect(spy).toHaveBeenCalledTimes(2); }); expect(result.current).toBeNull(); diff --git a/src/hooks/fetchLatestTemurin.tsx b/src/hooks/fetchLatestTemurin.tsx index cd86b91d3..a9ca54195 100644 --- a/src/hooks/fetchLatestTemurin.tsx +++ b/src/hooks/fetchLatestTemurin.tsx @@ -1,5 +1,6 @@ import { useEffect, useState } from 'react'; import { VersionMetaData } from "."; +import axios from 'axios'; const baseUrl = 'https://api.adoptium.net/v3'; @@ -9,38 +10,47 @@ export function fetchLatestForOS( os: string, arch: string ): Binary | null { + if (!os) { return null } + const [binary, setBinary] = useState(null); + useEffect(() => { if (isVisible) { (async () => { - setBinary(await fetchLatestForOSRequest(version, os, arch)); + const url = `${baseUrl}/assets/feature_releases/${version}/ga?os=${os}&architecture=${arch}&image_type=jdk&jvm_impl=hotspot&page_size=1&vendor=eclipse`; + + axios.get(url) + .then(function (response) { + const json: LatestTemurin = response.data[0]; + + let binary_link = json.binaries[0].package.link + let binary_checksum = json.binaries[0].package.checksum + + if (json.binaries[0].installer) { + binary_link = json.binaries[0].installer.link, + binary_checksum = json.binaries[0].installer.checksum + } + + const binary = { + release_name: json.release_name, + link: binary_link, + checksum: binary_checksum, + }; + setBinary(binary); + }) + .catch(function (error) { + setBinary(null); + }); })(); } - }, [isVisible]); + }, [isVisible, version, os, arch]); return binary; } -async function fetchLatestForOSRequest(version: number, os: string, arch: string) { - const url = `${baseUrl}/assets/feature_releases/${version}/ga?os=${os}&architecture=${arch}&image_type=jdk&jvm_impl=hotspot&page_size=1&vendor=eclipse`; - const response = await fetch(url); - const json: LatestTemurin = (await response.json())[0]; - let binary_link = json.binaries[0].package.link - let binary_checksum = json.binaries[0].package.checksum - if (json.binaries[0].installer) { - binary_link = json.binaries[0].installer.link, - binary_checksum = json.binaries[0].installer.checksum - } - return { - release_name: json.release_name, - link: binary_link, - checksum: binary_checksum, - }; -} - export interface Binary { release_name: string; link: URL; diff --git a/src/hooks/fetchMarketplace.tsx b/src/hooks/fetchMarketplace.tsx index f8033ff0c..2d211fd1a 100644 --- a/src/hooks/fetchMarketplace.tsx +++ b/src/hooks/fetchMarketplace.tsx @@ -1,6 +1,8 @@ -const baseUrl = 'https://marketplace-api.adoptium.net'; import { VersionMetaData } from "."; - +import axios from 'axios'; + +const baseUrl = 'https://marketplace-api.adoptium.net'; + export async function getAllPkgsForVersion( version: number, os: string, @@ -33,14 +35,16 @@ export async function getAllPkgsForVersion( params += ('&vendor=' + vendor) } - const url = new URL(baseUrl + '/v1/assets/latestForVendors' + params); - const data = await getPkgs(url); - return data -} + const url = baseUrl + '/v1/assets/latestForVendors' + params; + const data = await axios.get(url) + .then(function (response) { + return response.data; + }) + .catch(function (error) { + return null; + }); -async function getPkgs(url: URL) { - const response = await fetch(url) - return response.json(); + return data } export function getImageForDistribution(distribution: string) { diff --git a/src/hooks/fetchNews.tsx b/src/hooks/fetchNews.tsx index 35a95daae..3d4e4b636 100644 --- a/src/hooks/fetchNews.tsx +++ b/src/hooks/fetchNews.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react'; +import axios from 'axios'; const baseUrl = 'https://newsroom.eclipse.org/api'; @@ -6,8 +7,10 @@ export function fetchNewsItems( isVisible: boolean, page: number, ): News | null { + const [news, setNews] = useState({news: [], pagination: null}); const [events, setEvents] = useState([]); + useEffect(() => { if (isVisible) { (async () => { @@ -30,17 +33,27 @@ async function fetchLatestNews(page) { url.searchParams.append('parameters[publish_to]', 'adoptium'); url.searchParams.append('page', page); url.searchParams.append('pagesize', '5'); - const response = await fetch(url); - const json = (await response.json()); - return json + + return axios.get(url.toString()) + .then(function (response) { + return response.data; + }) + .catch(function (error) { + return [] + }); } async function fetchLatestEvents() { const url = new URL(`${baseUrl}/events`); url.searchParams.append('parameters[publish_to]', 'adoptium'); - const response = await fetch(url); - const json = (await response.json()); - return json.events + + return axios.get(url.toString()) + .then(function (response) { + return response.data.events; + }) + .catch(function (error) { + return [] + }); } export interface News { diff --git a/src/hooks/fetchReleaseNotes.tsx b/src/hooks/fetchReleaseNotes.tsx index efe3f8787..79bf79e7f 100644 --- a/src/hooks/fetchReleaseNotes.tsx +++ b/src/hooks/fetchReleaseNotes.tsx @@ -1,5 +1,6 @@ import { VersionMetaData } from '.'; import { useEffect, useState } from 'react'; +import axios from 'axios'; const baseUrl = 'https://api.adoptium.net/v3/info/release_notes'; @@ -13,30 +14,28 @@ export function fetchReleaseNotesForVersion( } const [releaseNotes, setReleaseNotes] = useState(null); + useEffect(() => { if (isVisible) { (async () => { - let result = await fetchReleaseNote(version); - if(sortReleaseNotesByCallback) sortReleaseNotesByCallback(result); - setReleaseNotes(result); + const url = `${baseUrl}/${version}`; + + await axios.get(url.toString()) + .then(function (response) { + let result = response.data + if(sortReleaseNotesByCallback) sortReleaseNotesByCallback(result); + setReleaseNotes(result) + }) + .catch(function (error) { + setReleaseNotes(null) + }); })(); } - }, [isVisible]); + }, [isVisible, version]); return releaseNotes; } -async function fetchReleaseNote(version) { - const url = `${baseUrl}/${version}`; - try { - // fetch the data from the API - const response = await fetch(url); - return await response.json(); - } catch (error) { - return { release_notes: null }; - } -} - export interface ReleaseNoteAPIResponse { id: string; release_name: string; diff --git a/src/hooks/fetchTemurinArchive.tsx b/src/hooks/fetchTemurinArchive.tsx index 2b03a2737..536c15b74 100644 --- a/src/hooks/fetchTemurinArchive.tsx +++ b/src/hooks/fetchTemurinArchive.tsx @@ -1,6 +1,7 @@ import moment from 'moment'; import { VersionMetaData } from '.'; import { fetchExtension } from '../util/fetchExtension'; +import axios from 'axios'; const baseUrl = 'https://api.adoptium.net/v3'; @@ -27,13 +28,21 @@ export async function getAssetsForVersion( } releases = [] - const response = await fetch(url) - const packages = await response.json(); - const pagecount = Number(response.headers.get('pagecount')) + let pagecount = 0; let pkgsFound: TemurinReleases[] = [] - for (let pkg of packages) { - pkgsFound.push(pkg); - } + + await axios.get(url.toString()) + .then(function (response) { + for (let pkg of response.data) { + pkgsFound.push(pkg); + } + pagecount = Number(response.headers.get('pagecount')) + }) + .catch(function (error) { + pagecount = 0; + pkgsFound = []; + }); + return renderReleases(pkgsFound, pagecount, releaseType); } diff --git a/src/hooks/fetchTemurinReleases.tsx b/src/hooks/fetchTemurinReleases.tsx index a9606b261..a9f1f8fdb 100644 --- a/src/hooks/fetchTemurinReleases.tsx +++ b/src/hooks/fetchTemurinReleases.tsx @@ -1,5 +1,6 @@ import { VersionMetaData } from '.'; import { fetchExtension } from '../util/fetchExtension'; +import axios from 'axios'; const baseUrl = 'https://api.adoptium.net/v3'; @@ -16,25 +17,29 @@ export async function loadLatestAssets( if (architecture !== 'any') { url.searchParams.append('architecture', architecture); } - let data = await getPkgs(url); - - // Filter JDK/JRE if necessary - if (packageType === 'jdk') { - data = data.filter((pkg: TemurinRelease) => pkg.binary.image_type !== 'jre'); - } else if (packageType === 'jre') { - data = data.filter((pkg: TemurinRelease) => pkg.binary.image_type !== 'jdk'); - } let pkgsFound: TemurinRelease[] = [] - for (let pkg of data) { - pkgsFound.push(pkg); - } - return renderReleases(pkgsFound); -} -async function getPkgs(url: URL) { - let response = await fetch(url) - return response.json(); + await axios.get(url.toString()) + .then(function (response) { + let data = response.data; + + // Filter JDK/JRE if necessary + if (packageType === 'jdk') { + data = data.filter((pkg: TemurinRelease) => pkg.binary.image_type !== 'jre'); + } else if (packageType === 'jre') { + data = data.filter((pkg: TemurinRelease) => pkg.binary.image_type !== 'jdk'); + } + + for (let pkg of data) { + pkgsFound.push(pkg); + } + }) + .catch(function (error) { + pkgsFound = [] + }); + + return renderReleases(pkgsFound); } function renderReleases(pkgs: Array): ReleaseAsset[] { diff --git a/src/hooks/useAdoptiumContributorsApi.tsx b/src/hooks/useAdoptiumContributorsApi.tsx index fdb6f406c..fe8d6befd 100644 --- a/src/hooks/useAdoptiumContributorsApi.tsx +++ b/src/hooks/useAdoptiumContributorsApi.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react'; +import axios from 'axios'; // List of repos that will be checked for contributions const repositories = [ @@ -52,8 +53,15 @@ function linkParser(linkHeader: string): { * Returns array with random contributor index and max contributors found. */ async function getMaxContributors(): Promise<[number, number]> { - const response = await fetch(CONTRIBUTORS_API_URI); - const linksHeaderValue = response.headers.get('Link'); + // this call is used to know how many contributors there are in this repo + // check the Link header to compute first and last + const linksHeaderValue = await axios.get(CONTRIBUTORS_API_URI) + .then(function (response) { + return response.headers.get('Link') + }) + .catch(function (error) { + return undefined + }); if (linksHeaderValue) { const links = linkParser(linksHeaderValue); @@ -72,10 +80,19 @@ async function getMaxContributors(): Promise<[number, number]> { * only return 'type: User' to filter out Bot * @param randomPage */ -async function getContributor(randomPage: number): Promise { - const response = await fetch(`${CONTRIBUTORS_API_URI}&page=${randomPage}`); - const contributor = (await response.json())[0] as ContributorApiResponse; - +async function getContributor(randomPage: number): Promise { + const contributor = await axios.get(`${CONTRIBUTORS_API_URI}&page=${randomPage}`) + .then(function (response) { + return response.data[0] as ContributorApiResponse; + }) + .catch(function (error) { + return undefined + }); + + if(!contributor) { + return null; + } + return { avatarUri: contributor.avatar_url, commitsListUri: `https://github.com/adoptium/${repoToCheck}/commits?author=${contributor.login}`, @@ -103,9 +120,7 @@ async function fetchRandomContributor() { const maxContributorsStored = window.localStorage.getItem(wlsMaxContributors); const fetchDateStored = window.localStorage.getItem(wlsFetchDate); - maxContributors = maxContributorsStored - ? parseInt(maxContributorsStored, 10) - : null; + maxContributors = maxContributorsStored ? parseInt(maxContributorsStored, 10) : null; fetchDate = fetchDateStored ? parseInt(fetchDateStored, 10) : null; } diff --git a/src/pages/__tests__/__snapshots__/news.test.tsx.snap b/src/pages/__tests__/__snapshots__/news.test.tsx.snap index d611f0bd5..2a3df24d6 100644 --- a/src/pages/__tests__/__snapshots__/news.test.tsx.snap +++ b/src/pages/__tests__/__snapshots__/news.test.tsx.snap @@ -223,7 +223,7 @@ exports[`News page > renders correctly 1`] = ` class="MuiTimeline-root MuiTimeline-positionAlternate css-55vwbm-MuiTimeline-root" >
  • { return { @@ -25,6 +29,8 @@ afterEach(() => { describe('Marketplace page', () => { it('renders correctly', () => { + mock.onGet().reply(200, []); + const { container } = render(); // eslint-disable-next-line const pageContent = container.querySelector('main'); @@ -32,6 +38,8 @@ describe('Marketplace page', () => { }); it('head renders correctly', () => { + mock.onGet().reply(200, []); + const { container } = render(); // eslint-disable-next-line const title = container.querySelector('title'); @@ -39,6 +47,8 @@ describe('Marketplace page', () => { }); it('has no accessibility violations', async () => { + mock.onGet().reply(200, []); + const { container } = render(); const results = await axe(container); expect(results).toHaveNoViolations(); diff --git a/src/pages/temurin/__tests__/__snapshots__/nightly.test.tsx.snap b/src/pages/temurin/__tests__/__snapshots__/nightly.test.tsx.snap index f34d6508e..c63acfc46 100644 --- a/src/pages/temurin/__tests__/__snapshots__/nightly.test.tsx.snap +++ b/src/pages/temurin/__tests__/__snapshots__/nightly.test.tsx.snap @@ -283,9 +283,7 @@ exports[`Temurin Nightly page > renders correctly 1`] = ` - - + />
    { + vi.clearAllMocks(); +}); describe('Temurin Archive page', () => { it('renders correctly', () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); // eslint-disable-next-line const pageContent = container.querySelector('main'); @@ -14,6 +24,8 @@ describe('Temurin Archive page', () => { }); it('head renders correctly', () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); // eslint-disable-next-line const title = container.querySelector('title'); @@ -21,6 +33,8 @@ describe('Temurin Archive page', () => { }); it('has no accessibility violations', async () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); const results = await axe(container); expect(results).toHaveNoViolations(); diff --git a/src/pages/temurin/__tests__/nightly.test.tsx b/src/pages/temurin/__tests__/nightly.test.tsx index 38691cd0c..1ac37b5e1 100644 --- a/src/pages/temurin/__tests__/nightly.test.tsx +++ b/src/pages/temurin/__tests__/nightly.test.tsx @@ -1,12 +1,22 @@ import React from 'react'; import { render } from '@testing-library/react'; import { act, screen, fireEvent } from '@testing-library/react'; -import { describe, expect, it } from 'vitest' +import { describe, expect, it, vi } from 'vitest' import { axe } from 'vitest-axe'; import Nightly, { Head } from '../nightly'; +import AxiosInstance from 'axios' +import MockAdapter from 'axios-mock-adapter'; + +const mock = new MockAdapter(AxiosInstance); + +afterEach(() => { + vi.clearAllMocks(); +}); describe('Temurin Nightly page', () => { it('renders correctly', async () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); // eslint-disable-next-line const pageContent = container.querySelector('main'); @@ -21,6 +31,8 @@ describe('Temurin Nightly page', () => { }); it('head renders correctly', () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); // eslint-disable-next-line const title = container.querySelector('title'); @@ -28,6 +40,8 @@ describe('Temurin Nightly page', () => { }); it('has no accessibility violations', async () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); const results = await axe(container); expect(results).toHaveNoViolations(); diff --git a/src/pages/temurin/__tests__/releases.test.tsx b/src/pages/temurin/__tests__/releases.test.tsx index 5ae902fc8..3ce8f52b3 100644 --- a/src/pages/temurin/__tests__/releases.test.tsx +++ b/src/pages/temurin/__tests__/releases.test.tsx @@ -1,11 +1,21 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { describe, expect, it } from 'vitest' +import { describe, expect, it, vi } from 'vitest' import { axe } from 'vitest-axe'; import Releases, { Head } from '../releases'; +import AxiosInstance from 'axios' +import MockAdapter from 'axios-mock-adapter'; + +const mock = new MockAdapter(AxiosInstance); + +afterEach(() => { + vi.clearAllMocks(); +}); describe('Releases page', () => { it('renders correctly', () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); // eslint-disable-next-line const pageContent = container.querySelector('main'); @@ -14,6 +24,8 @@ describe('Releases page', () => { }); it('head renders correctly', () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); // eslint-disable-next-line const title = container.querySelector('title'); @@ -21,6 +33,8 @@ describe('Releases page', () => { }); it('has no accessibility violations', async () => { + mock.onGet().reply(200, [], {'pagecount': 0}); + const { container } = render(); const results = await axe(container); expect(results).toHaveNoViolations();