diff --git a/.eslintrc.json b/.eslintrc.json index 85c8789..ac455c8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,7 +6,7 @@ }, "parser": "@typescript-eslint/parser", "parserOptions": { - "project": ["tsconfig.json", "tsconfig.test.json"], + "project": ["./tsconfig.json", "./tsconfig.test.json"], "sourceType": "module" }, "plugins": [ diff --git a/jest.config.js b/jest.config.js index 6b0c346..7b3fefd 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,26 +1,18 @@ module.exports = { - 'globals': { - 'ts-jest': { - isolatedModules: true, - tsconfig: 'tsconfig.test.json', - }, - }, - moduleFileExtensions: [ - 'ts', - 'tsx', - 'js', - 'jsx', - 'json', - 'node', - ], - modulePathIgnorePatterns: [ - '/dist/' - ], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + modulePathIgnorePatterns: ['/dist/'], rootDir: 'src', testEnvironment: 'node', testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|js)x?$', transform: { - '\\.[jt]sx?$': 'ts-jest', + '\\.[jt]sx?$': [ + 'ts-jest', + { + isolatedModules: true, + tsconfig: 'tsconfig.test.json', + useESM: true, + }, + ], }, // transform all modules because it would be impossible to keep up with diff --git a/package-lock.json b/package-lock.json index 0faf537..bb4fede 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "aws-sdk": "^2.1260.0", "chrome-launcher": "^0.15.1", - "lighthouse": "^9.6.8", + "lighthouse": "^10.1.0", "node-fetch": "^3.3.0" }, "devDependencies": { @@ -29,7 +29,7 @@ "lint-staged": "^13.0.3", "prettier": "^2.8.0", "rimraf": "^3.0.2", - "ts-jest": "^29.0.3", + "ts-jest": "^29.0.5", "typescript": "^4.9.3" }, "engines": { @@ -1871,9 +1871,9 @@ } }, "node_modules/axe-core": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.1.tgz", - "integrity": "sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.6.3.tgz", + "integrity": "sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg==", "engines": { "node": ">=4" } @@ -1972,7 +1972,8 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/base64-js": { "version": "1.5.1", @@ -2030,6 +2031,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2213,6 +2215,17 @@ "node": ">=12.13.0" } }, + "node_modules/chromium-bidi": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.5.tgz", + "integrity": "sha512-rkav9YzRfAshSTG3wNXF7P7yNiI29QAo1xBXElPoCoSQR5n20q3cOyVhDv6S7+GlF/CJ/emUxlQiR0xOPurkGg==", + "dependencies": { + "mitt": "3.0.0" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, "node_modules/ci-info": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.6.2.tgz", @@ -2366,7 +2379,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/configstore": { "version": "5.0.1", @@ -2463,19 +2477,6 @@ "resolved": "https://registry.npmjs.org/csp_evaluator/-/csp_evaluator-1.1.1.tgz", "integrity": "sha512-N3ASg0C4kNPUaNxt1XAvzHIVuzdtr8KLgfk1O8WDyimp1GisPAHESupArO2ieHk9QWbrJ/WkQODyh21Ps/xhxw==" }, - "node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" - }, - "node_modules/cssstyle": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz", - "integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==", - "dependencies": { - "cssom": "0.3.x" - } - }, "node_modules/data-uri-to-buffer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", @@ -2548,9 +2549,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.981744", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", - "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==" + "version": "0.0.1107588", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1107588.tgz", + "integrity": "sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg==" }, "node_modules/diff-sequences": { "version": "29.3.1", @@ -3209,7 +3210,8 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/fsevents": { "version": "2.3.2", @@ -3285,6 +3287,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3421,9 +3424,12 @@ "dev": true }, "node_modules/http-link-header": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-0.8.0.tgz", - "integrity": "sha512-qsh/wKe1Mk1vtYEFr+LpQBFWTO1gxZQBdii2D0Umj+IUQ23r5sT088Rhpq4XzpSyIpaX7vwjB8Rrtx8u9JTg+Q==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.1.0.tgz", + "integrity": "sha512-pj6N1yxOz/ANO8HHsWGg/OoIL1kmRYvQnXQ7PIRpgp+15AnEsRH8fmIJE6D1OdWG2Bov+BJHVla1fFXxg1JbbA==", + "engines": { + "node": ">=6.0.0" + } }, "node_modules/https-proxy-agent": { "version": "5.0.1", @@ -3536,6 +3542,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -4404,9 +4411,9 @@ "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==" }, "node_modules/js-library-detector": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-6.5.0.tgz", - "integrity": "sha512-Kq7VckJ5kb26kHMAu1sDO8t2qr7M5Uw6Gf7fVGtu1YceoHdqTcobwnB5kStcktusPuPmiCE8PbCaiLzhiBsSAw==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-6.6.0.tgz", + "integrity": "sha512-z8OkDmXALZ22bIzBtIW8cpJ39MV93/Zu1rWrFdhsNw+sity2rOLaGT2kfWWQ6mnRTWs4ddONY5kiroA8e98Gvg==", "engines": { "node": ">=12" } @@ -4513,45 +4520,44 @@ } }, "node_modules/lighthouse": { - "version": "9.6.8", - "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-9.6.8.tgz", - "integrity": "sha512-5aRSvnqazci8D2oE7GJM6C7IStvUuMVV+74cGyBuS4n4NCixsDd6+uJdX834XiInSfo+OuVbAJCX4Xu6d2+N9Q==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-10.1.0.tgz", + "integrity": "sha512-lIBgCcKK9bdPg95lMA+9RW9f8JZPRewVruloBxxSuu+90Ln422S8dpxC70KhvojdaeqeOLT9zJazZYgG+k1s3g==", "dependencies": { "@sentry/node": "^6.17.4", - "axe-core": "4.4.1", - "chrome-launcher": "^0.15.0", + "axe-core": "4.6.3", + "chrome-launcher": "^0.15.1", "configstore": "^5.0.1", "csp_evaluator": "1.1.1", - "cssstyle": "1.2.1", "enquirer": "^2.3.6", - "http-link-header": "^0.8.0", + "http-link-header": "^1.1.0", "intl-messageformat": "^4.4.0", - "jpeg-js": "^0.4.3", - "js-library-detector": "^6.5.0", + "jpeg-js": "^0.4.4", + "js-library-detector": "^6.6.0", "lighthouse-logger": "^1.3.0", - "lighthouse-stack-packs": "1.8.2", + "lighthouse-stack-packs": "1.9.1", "lodash": "^4.17.21", "lookup-closest-locale": "6.2.0", - "metaviewport-parser": "0.2.0", + "metaviewport-parser": "0.3.0", "open": "^8.4.0", "parse-cache-control": "1.0.1", "ps-list": "^8.0.0", - "puppeteer-core": "^13.7.0", + "puppeteer-core": "^19.6.0", "robots-parser": "^3.0.0", "semver": "^5.3.0", "speedline-core": "^1.4.3", - "third-party-web": "^0.17.1", + "third-party-web": "^0.20.2", "ws": "^7.0.0", "yargs": "^17.3.1", "yargs-parser": "^21.0.0" }, "bin": { - "chrome-debug": "lighthouse-core/scripts/manual-chrome-launcher.js", - "lighthouse": "lighthouse-cli/index.js", - "smokehouse": "lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js" + "chrome-debug": "core/scripts/manual-chrome-launcher.js", + "lighthouse": "cli/index.js", + "smokehouse": "cli/test/smokehouse/frontends/smokehouse-bin.js" }, "engines": { - "node": ">=14.15" + "node": ">=16.16" } }, "node_modules/lighthouse-logger": { @@ -4577,9 +4583,9 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/lighthouse-stack-packs": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.8.2.tgz", - "integrity": "sha512-vlCUxxQAB8Nu6LQHqPpDRiMi06Du593/my/6JbMttQeEfJ7pf4OS8obSTh5xSOS80U/O7fq59Q8rQGAUxQatUQ==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.9.1.tgz", + "integrity": "sha512-9prq6oMkVHz3GeCkphq4FHXXdj3M/WPiFWUvJAczLYV8j/oTxsgiHSPMqh1KVV11CP0VTxD40hFC0pDfXF+khQ==" }, "node_modules/lighthouse/node_modules/semver": { "version": "5.7.1", @@ -5020,9 +5026,9 @@ } }, "node_modules/metaviewport-parser": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/metaviewport-parser/-/metaviewport-parser-0.2.0.tgz", - "integrity": "sha512-qL5NtY18LGs7lvZCkj3ep2H4Pes9rIiSLZRUyfDdvVw7pWFA0eLwmqaIxApD74RGvUrNEtk9e5Wt1rT+VlCvGw==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/metaviewport-parser/-/metaviewport-parser-0.3.0.tgz", + "integrity": "sha512-EoYJ8xfjQ6kpe9VbVHvZTZHiOl4HL1Z18CrZ+qahvLXT7ZO4YTC2JMyt5FaUp9JJp6J4Ybb/z7IsCXZt86/QkQ==" }, "node_modules/micromatch": { "version": "4.0.5", @@ -5071,6 +5077,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -5078,6 +5085,11 @@ "node": "*" } }, + "node_modules/mitt": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", + "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==" + }, "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", @@ -5201,9 +5213,9 @@ } }, "node_modules/open": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", - "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", @@ -5282,6 +5294,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, "engines": { "node": ">=6" } @@ -5325,6 +5338,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "engines": { "node": ">=8" } @@ -5333,6 +5347,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -5409,6 +5424,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, "dependencies": { "find-up": "^4.0.0" }, @@ -5420,6 +5436,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -5432,6 +5449,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -5443,6 +5461,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, "dependencies": { "p-try": "^2.0.0" }, @@ -5457,6 +5476,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -5514,14 +5534,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -5541,9 +5553,9 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/ps-list": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-8.1.0.tgz", - "integrity": "sha512-NoGBqJe7Ou3kfQxEvDzDyKGAyEgwIuD3YrfXinjcCmBRv0hTld0Xb71hrXvtsNPj7HSFATfemvzB8PPJtq6Yag==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-8.1.1.tgz", + "integrity": "sha512-OPS9kEJYVmiO48u/B9qneqhkMvgCxT+Tm28VCEJpheTpl8cJ0ffZRRNgS5mrQRTrX5yRTpaJ+hRDeefXYmmorQ==", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -5570,37 +5582,43 @@ } }, "node_modules/puppeteer-core": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.7.0.tgz", - "integrity": "sha512-rXja4vcnAzFAP1OVLq/5dWNfwBGuzcOARJ6qGV7oAZhnLmVRU8G5MsdeQEAOy332ZhkIOnn9jp15R89LKHyp2Q==", + "version": "19.8.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.8.0.tgz", + "integrity": "sha512-5gBkLR9nae7chWDhI3mpj5QA+hPmjEOW29qw5ap5g51Uo5Lxe5Yip1uyQwZSjg5Wn/eyE9grh2Lyx3m8rPK90A==", "dependencies": { + "chromium-bidi": "0.4.5", "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.981744", + "devtools-protocol": "0.0.1107588", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.1", - "pkg-dir": "4.2.0", - "progress": "2.0.3", "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", "tar-fs": "2.1.1", "unbzip2-stream": "1.4.3", - "ws": "8.5.0" + "ws": "8.13.0" }, "engines": { - "node": ">=10.18.1" + "node": ">=14.14.0" + }, + "peerDependencies": { + "typescript": ">= 4.7.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -5647,9 +5665,9 @@ "dev": true }, "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -5768,6 +5786,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -5779,11 +5798,11 @@ } }, "node_modules/robots-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/robots-parser/-/robots-parser-3.0.0.tgz", - "integrity": "sha512-6xkze3WRdneibICBAzMKcXyTKQw5shA3GbwoEJy7RSvxpZNGF0GMuYKE1T0VMP4fwx/fQs0n0mtriOqRtk5L1w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/robots-parser/-/robots-parser-3.0.1.tgz", + "integrity": "sha512-s+pyvQeIKIZ0dx5iJiQk1tPLJAWln39+MI5jtM8wnyws+G5azk+dMnMX0qfbqNetKKNgcWWOdi0sfm+FbQbgdQ==", "engines": { - "node": ">=0.10" + "node": ">=10.0.0" } }, "node_modules/run-parallel": { @@ -6177,9 +6196,9 @@ "dev": true }, "node_modules/third-party-web": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.17.1.tgz", - "integrity": "sha512-X9Mha8cVeBwakunlZXkXL6xRzw8VCcDGWqT59EzeTYAJIi8ien3CuufnEGEx4ZUFahumNQdoOwf4H2T9Ca6lBg==" + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.20.2.tgz", + "integrity": "sha512-KFaFBDto+gH2DZW6ooFCGYrR8CGV6b/Ibsc2RTUkKhTPbxOWZuKs0NTftdAMoz0Aivf4bAHgW+kAGKciSQpqFg==" }, "node_modules/through": { "version": "2.3.8", @@ -6219,15 +6238,15 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/ts-jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.3.tgz", - "integrity": "sha512-Ibygvmuyq1qp/z3yTh9QTwVVAbFdDy/+4BtIQR2sp6baF2SJU/8CKK/hhnGIDY2L90Az2jIqTwZPnN2p+BweiQ==", + "version": "29.0.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.5.tgz", + "integrity": "sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==", "dev": true, "dependencies": { "bs-logger": "0.x", "fast-json-stable-stringify": "2.x", "jest-util": "^29.0.0", - "json5": "^2.2.1", + "json5": "^2.2.3", "lodash.memoize": "4.x", "make-error": "1.x", "semver": "7.x", @@ -6326,7 +6345,7 @@ "version": "4.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", - "dev": true, + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8154,9 +8173,9 @@ } }, "axe-core": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.1.tgz", - "integrity": "sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw==" + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.6.3.tgz", + "integrity": "sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg==" }, "babel-jest": { "version": "29.3.1", @@ -8231,7 +8250,8 @@ "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "base64-js": { "version": "1.5.1", @@ -8263,6 +8283,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8387,6 +8408,14 @@ "lighthouse-logger": "^1.0.0" } }, + "chromium-bidi": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.5.tgz", + "integrity": "sha512-rkav9YzRfAshSTG3wNXF7P7yNiI29QAo1xBXElPoCoSQR5n20q3cOyVhDv6S7+GlF/CJ/emUxlQiR0xOPurkGg==", + "requires": { + "mitt": "3.0.0" + } + }, "ci-info": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.6.2.tgz", @@ -8505,7 +8534,8 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "configstore": { "version": "5.0.1", @@ -8583,19 +8613,6 @@ "resolved": "https://registry.npmjs.org/csp_evaluator/-/csp_evaluator-1.1.1.tgz", "integrity": "sha512-N3ASg0C4kNPUaNxt1XAvzHIVuzdtr8KLgfk1O8WDyimp1GisPAHESupArO2ieHk9QWbrJ/WkQODyh21Ps/xhxw==" }, - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" - }, - "cssstyle": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz", - "integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==", - "requires": { - "cssom": "0.3.x" - } - }, "data-uri-to-buffer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", @@ -8645,9 +8662,9 @@ "dev": true }, "devtools-protocol": { - "version": "0.0.981744", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", - "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==" + "version": "0.0.1107588", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1107588.tgz", + "integrity": "sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg==" }, "diff-sequences": { "version": "29.3.1", @@ -9135,7 +9152,8 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "fsevents": { "version": "2.3.2", @@ -9186,6 +9204,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -9280,9 +9299,9 @@ "dev": true }, "http-link-header": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-0.8.0.tgz", - "integrity": "sha512-qsh/wKe1Mk1vtYEFr+LpQBFWTO1gxZQBdii2D0Umj+IUQ23r5sT088Rhpq4XzpSyIpaX7vwjB8Rrtx8u9JTg+Q==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.1.0.tgz", + "integrity": "sha512-pj6N1yxOz/ANO8HHsWGg/OoIL1kmRYvQnXQ7PIRpgp+15AnEsRH8fmIJE6D1OdWG2Bov+BJHVla1fFXxg1JbbA==" }, "https-proxy-agent": { "version": "5.0.1", @@ -9356,6 +9375,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -10006,9 +10026,9 @@ "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==" }, "js-library-detector": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-6.5.0.tgz", - "integrity": "sha512-Kq7VckJ5kb26kHMAu1sDO8t2qr7M5Uw6Gf7fVGtu1YceoHdqTcobwnB5kStcktusPuPmiCE8PbCaiLzhiBsSAw==" + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-6.6.0.tgz", + "integrity": "sha512-z8OkDmXALZ22bIzBtIW8cpJ39MV93/Zu1rWrFdhsNw+sity2rOLaGT2kfWWQ6mnRTWs4ddONY5kiroA8e98Gvg==" }, "js-sdsl": { "version": "4.2.0", @@ -10084,34 +10104,33 @@ } }, "lighthouse": { - "version": "9.6.8", - "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-9.6.8.tgz", - "integrity": "sha512-5aRSvnqazci8D2oE7GJM6C7IStvUuMVV+74cGyBuS4n4NCixsDd6+uJdX834XiInSfo+OuVbAJCX4Xu6d2+N9Q==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-10.1.0.tgz", + "integrity": "sha512-lIBgCcKK9bdPg95lMA+9RW9f8JZPRewVruloBxxSuu+90Ln422S8dpxC70KhvojdaeqeOLT9zJazZYgG+k1s3g==", "requires": { "@sentry/node": "^6.17.4", - "axe-core": "4.4.1", - "chrome-launcher": "^0.15.0", + "axe-core": "4.6.3", + "chrome-launcher": "^0.15.1", "configstore": "^5.0.1", "csp_evaluator": "1.1.1", - "cssstyle": "1.2.1", "enquirer": "^2.3.6", - "http-link-header": "^0.8.0", + "http-link-header": "^1.1.0", "intl-messageformat": "^4.4.0", - "jpeg-js": "^0.4.3", - "js-library-detector": "^6.5.0", + "jpeg-js": "^0.4.4", + "js-library-detector": "^6.6.0", "lighthouse-logger": "^1.3.0", - "lighthouse-stack-packs": "1.8.2", + "lighthouse-stack-packs": "1.9.1", "lodash": "^4.17.21", "lookup-closest-locale": "6.2.0", - "metaviewport-parser": "0.2.0", + "metaviewport-parser": "0.3.0", "open": "^8.4.0", "parse-cache-control": "1.0.1", "ps-list": "^8.0.0", - "puppeteer-core": "^13.7.0", + "puppeteer-core": "^19.6.0", "robots-parser": "^3.0.0", "semver": "^5.3.0", "speedline-core": "^1.4.3", - "third-party-web": "^0.17.1", + "third-party-web": "^0.20.2", "ws": "^7.0.0", "yargs": "^17.3.1", "yargs-parser": "^21.0.0" @@ -10149,9 +10168,9 @@ } }, "lighthouse-stack-packs": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.8.2.tgz", - "integrity": "sha512-vlCUxxQAB8Nu6LQHqPpDRiMi06Du593/my/6JbMttQeEfJ7pf4OS8obSTh5xSOS80U/O7fq59Q8rQGAUxQatUQ==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.9.1.tgz", + "integrity": "sha512-9prq6oMkVHz3GeCkphq4FHXXdj3M/WPiFWUvJAczLYV8j/oTxsgiHSPMqh1KVV11CP0VTxD40hFC0pDfXF+khQ==" }, "lilconfig": { "version": "2.0.5", @@ -10467,9 +10486,9 @@ "dev": true }, "metaviewport-parser": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/metaviewport-parser/-/metaviewport-parser-0.2.0.tgz", - "integrity": "sha512-qL5NtY18LGs7lvZCkj3ep2H4Pes9rIiSLZRUyfDdvVw7pWFA0eLwmqaIxApD74RGvUrNEtk9e5Wt1rT+VlCvGw==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/metaviewport-parser/-/metaviewport-parser-0.3.0.tgz", + "integrity": "sha512-EoYJ8xfjQ6kpe9VbVHvZTZHiOl4HL1Z18CrZ+qahvLXT7ZO4YTC2JMyt5FaUp9JJp6J4Ybb/z7IsCXZt86/QkQ==" }, "micromatch": { "version": "4.0.5", @@ -10506,10 +10525,16 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, + "mitt": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", + "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==" + }, "mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", @@ -10598,9 +10623,9 @@ } }, "open": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", - "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "requires": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", @@ -10651,7 +10676,8 @@ "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, "parent-module": { "version": "1.0.1", @@ -10682,12 +10708,14 @@ "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true }, "path-key": { "version": "3.1.1", @@ -10740,6 +10768,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, "requires": { "find-up": "^4.0.0" }, @@ -10748,6 +10777,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -10757,6 +10787,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "requires": { "p-locate": "^4.1.0" } @@ -10765,6 +10796,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, "requires": { "p-try": "^2.0.0" } @@ -10773,6 +10805,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "requires": { "p-limit": "^2.2.0" } @@ -10810,11 +10843,6 @@ } } }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" - }, "prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -10831,9 +10859,9 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "ps-list": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-8.1.0.tgz", - "integrity": "sha512-NoGBqJe7Ou3kfQxEvDzDyKGAyEgwIuD3YrfXinjcCmBRv0hTld0Xb71hrXvtsNPj7HSFATfemvzB8PPJtq6Yag==" + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-8.1.1.tgz", + "integrity": "sha512-OPS9kEJYVmiO48u/B9qneqhkMvgCxT+Tm28VCEJpheTpl8cJ0ffZRRNgS5mrQRTrX5yRTpaJ+hRDeefXYmmorQ==" }, "pump": { "version": "3.0.0", @@ -10851,28 +10879,26 @@ "dev": true }, "puppeteer-core": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.7.0.tgz", - "integrity": "sha512-rXja4vcnAzFAP1OVLq/5dWNfwBGuzcOARJ6qGV7oAZhnLmVRU8G5MsdeQEAOy332ZhkIOnn9jp15R89LKHyp2Q==", + "version": "19.8.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.8.0.tgz", + "integrity": "sha512-5gBkLR9nae7chWDhI3mpj5QA+hPmjEOW29qw5ap5g51Uo5Lxe5Yip1uyQwZSjg5Wn/eyE9grh2Lyx3m8rPK90A==", "requires": { + "chromium-bidi": "0.4.5", "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.981744", + "devtools-protocol": "0.0.1107588", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.1", - "pkg-dir": "4.2.0", - "progress": "2.0.3", "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", "tar-fs": "2.1.1", "unbzip2-stream": "1.4.3", - "ws": "8.5.0" + "ws": "8.13.0" }, "dependencies": { "ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "requires": {} } } @@ -10895,9 +10921,9 @@ "dev": true }, "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -10981,14 +11007,15 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "requires": { "glob": "^7.1.3" } }, "robots-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/robots-parser/-/robots-parser-3.0.0.tgz", - "integrity": "sha512-6xkze3WRdneibICBAzMKcXyTKQw5shA3GbwoEJy7RSvxpZNGF0GMuYKE1T0VMP4fwx/fQs0n0mtriOqRtk5L1w==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/robots-parser/-/robots-parser-3.0.1.tgz", + "integrity": "sha512-s+pyvQeIKIZ0dx5iJiQk1tPLJAWln39+MI5jtM8wnyws+G5azk+dMnMX0qfbqNetKKNgcWWOdi0sfm+FbQbgdQ==" }, "run-parallel": { "version": "1.2.0", @@ -11268,9 +11295,9 @@ "dev": true }, "third-party-web": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.17.1.tgz", - "integrity": "sha512-X9Mha8cVeBwakunlZXkXL6xRzw8VCcDGWqT59EzeTYAJIi8ien3CuufnEGEx4ZUFahumNQdoOwf4H2T9Ca6lBg==" + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.20.2.tgz", + "integrity": "sha512-KFaFBDto+gH2DZW6ooFCGYrR8CGV6b/Ibsc2RTUkKhTPbxOWZuKs0NTftdAMoz0Aivf4bAHgW+kAGKciSQpqFg==" }, "through": { "version": "2.3.8", @@ -11304,15 +11331,15 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "ts-jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.3.tgz", - "integrity": "sha512-Ibygvmuyq1qp/z3yTh9QTwVVAbFdDy/+4BtIQR2sp6baF2SJU/8CKK/hhnGIDY2L90Az2jIqTwZPnN2p+BweiQ==", + "version": "29.0.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.5.tgz", + "integrity": "sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==", "dev": true, "requires": { "bs-logger": "0.x", "fast-json-stable-stringify": "2.x", "jest-util": "^29.0.0", - "json5": "^2.2.1", + "json5": "^2.2.3", "lodash.memoize": "4.x", "make-error": "1.x", "semver": "7.x", @@ -11366,7 +11393,7 @@ "version": "4.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", - "dev": true + "devOptional": true }, "unbzip2-stream": { "version": "1.4.3", diff --git a/package.json b/package.json index 1fcd014..d58f63f 100644 --- a/package.json +++ b/package.json @@ -31,12 +31,10 @@ }, "homepage": "https://github.com/foo-software/lighthouse-persist#readme", "lint-staged": { - "src/**/*.{ts,tsx}": [ - "prettier --single-quote --write", - "npm run lint" - ], - "*.ts": "eslint --cache --fix", - "*.{js,css,md}": "prettier --write" + "**/*.{ts,tsx}": [ + "eslint", + "prettier --write" + ] }, "scripts": { "build": "npm run clean && npm run build:js", @@ -44,7 +42,7 @@ "clean": "rimraf dist", "lint": "eslint . --ext .ts", "prepublish": "npm run build", - "test": "jest", + "test": "NODE_OPTIONS=--experimental-vm-modules npx jest", "prepare": "husky install" }, "devDependencies": { @@ -62,13 +60,13 @@ "lint-staged": "^13.0.3", "prettier": "^2.8.0", "rimraf": "^3.0.2", - "ts-jest": "^29.0.3", + "ts-jest": "^29.0.5", "typescript": "^4.9.3" }, "dependencies": { "aws-sdk": "^2.1260.0", "chrome-launcher": "^0.15.1", - "lighthouse": "^9.6.8", + "lighthouse": "^10.1.0", "node-fetch": "^3.3.0" } } diff --git a/src/@types/lighthouse.d.ts b/src/@types/lighthouse.d.ts index e7f3836..b27b574 100644 --- a/src/@types/lighthouse.d.ts +++ b/src/@types/lighthouse.d.ts @@ -1,3 +1,3 @@ declare module 'lighthouse'; -declare module 'lighthouse/report/generator/report-generator'; -declare module 'lighthouse/report/renderer/util.js'; +declare module 'lighthouse/report/renderer/report-utils.js'; +declare module 'lighthouse/report/generator/report-generator.js'; diff --git a/src/helpers/getOpportunities.test.ts b/src/helpers/getOpportunities.test.ts index 65517e0..c357b08 100644 --- a/src/helpers/getOpportunities.test.ts +++ b/src/helpers/getOpportunities.test.ts @@ -1,12 +1,12 @@ -import { loadUtil } from './getOpportunities'; +import { loadReportUtils } from './getOpportunities'; -describe('Util', () => { - it('Util.calculateRating should be a function', async () => { - const Util = await loadUtil(); - expect(typeof Util.calculateRating).toBe('function'); +describe('ReportUtils', () => { + it('ReportUtils.calculateRating should be a function', async () => { + const ReportUtils = await loadReportUtils(); + expect(typeof ReportUtils.calculateRating).toBe('function'); }); - it('Util.showAsPassed should be a function', async () => { - const Util = await loadUtil(); - expect(typeof Util.showAsPassed).toBe('function'); + it('ReportUtils.showAsPassed should be a function', async () => { + const ReportUtils = await loadReportUtils(); + expect(typeof ReportUtils.showAsPassed).toBe('function'); }); }); diff --git a/src/helpers/getOpportunities.ts b/src/helpers/getOpportunities.ts index ba47723..489515b 100644 --- a/src/helpers/getOpportunities.ts +++ b/src/helpers/getOpportunities.ts @@ -1,9 +1,9 @@ // a bit of a hack until we only support ES Modules // note the key here: // https://github.com/microsoft/TypeScript/pull/44501#issue-914346744 -export const loadUtil = async () => { - const module = await import('lighthouse/report/renderer/util.js'); - return module.Util; +export const loadReportUtils = async () => { + const module = await import('lighthouse/report/renderer/report-utils.js'); + return module.ReportUtils; }; // inspired by: @@ -23,12 +23,15 @@ const getWastedMs = (audit: any) => { // inspired by: // https://github.com/GoogleChrome/lighthouse/blob/2e9c3c9b5f7d75b39be9d1e2ba116d49cf811f81/lighthouse-core/report/html/renderer/performance-category-renderer.js#L224-L226 export default async (result: any) => { - const Util = await loadUtil(); + const ReportUtils = await loadReportUtils(); return result.categories.performance.auditRefs .reduce((accumulator: any, audit: any) => { const auditResult = result.audits[audit.id]; const detailsType = auditResult?.details?.type; - if (detailsType !== 'opportunity' || Util.showAsPassed(auditResult)) { + if ( + detailsType !== 'opportunity' || + ReportUtils.showAsPassed(auditResult) + ) { return accumulator; } @@ -40,7 +43,7 @@ export default async (result: any) => { ...auditResult, // "average" | "fail" | "pass" | ... - rating: Util.calculateRating( + rating: ReportUtils.calculateRating( auditResult.score, auditResult.scoreDisplayMode, ), diff --git a/src/helpers/loadLighthouse.test.ts b/src/helpers/loadLighthouse.test.ts new file mode 100644 index 0000000..e82efc7 --- /dev/null +++ b/src/helpers/loadLighthouse.test.ts @@ -0,0 +1,8 @@ +import loadLighthouse from './loadLighthouse'; + +describe('loadLighthouse', () => { + it('should load lighthouse', async () => { + const lighthouse = await loadLighthouse(); + expect(typeof lighthouse).toBe('function'); + }); +}); diff --git a/src/helpers/loadLighthouse.ts b/src/helpers/loadLighthouse.ts new file mode 100644 index 0000000..7093e09 --- /dev/null +++ b/src/helpers/loadLighthouse.ts @@ -0,0 +1,9 @@ +// a bit of a hack until we only support ES Modules +// note the key here: +// https://github.com/microsoft/TypeScript/pull/44501#issue-914346744 +const loadLighthouse = async () => { + const module = await import('lighthouse'); + return module.default; +}; + +export default loadLighthouse; diff --git a/src/helpers/loadReportGenerator.test.ts b/src/helpers/loadReportGenerator.test.ts new file mode 100644 index 0000000..01291b2 --- /dev/null +++ b/src/helpers/loadReportGenerator.test.ts @@ -0,0 +1,8 @@ +import loadReportGenerator from './loadReportGenerator'; + +describe('loadReportGenerator', () => { + it('should load ReportGenerator', async () => { + const ReportGenerator = await loadReportGenerator(); + expect(typeof ReportGenerator.generateReportHtml).toBe('function'); + }); +}); diff --git a/src/helpers/loadReportGenerator.ts b/src/helpers/loadReportGenerator.ts new file mode 100644 index 0000000..6bb89dd --- /dev/null +++ b/src/helpers/loadReportGenerator.ts @@ -0,0 +1,11 @@ +// a bit of a hack until we only support ES Modules +// note the key here: +// https://github.com/microsoft/TypeScript/pull/44501#issue-914346744 +const loadReportGenerator = async () => { + const module = await import( + 'lighthouse/report/generator/report-generator.js' + ); + return module.ReportGenerator; +}; + +export default loadReportGenerator; diff --git a/src/lighthousePersist.test.ts b/src/lighthousePersist.test.ts index bbb7d6a..a499bef 100644 --- a/src/lighthousePersist.test.ts +++ b/src/lighthousePersist.test.ts @@ -1,6 +1,6 @@ jest.mock('./helpers/getPageSpeedInsightsApiResult'); -import lighthousePersist, { ReportGenerator } from './lighthousePersist'; +import lighthousePersist from './lighthousePersist'; import getPageSpeedInsightsApiResult from './helpers/getPageSpeedInsightsApiResult'; jest.mock('chrome-launcher', () => ({ @@ -10,15 +10,15 @@ jest.mock('chrome-launcher', () => ({ }), })); -jest.mock('lighthouse', () => ({ +jest.mock('./helpers/loadLighthouse', () => ({ __esModule: true, - default: jest.fn().mockReturnValue({ + default: jest.fn().mockReturnValue(() => ({ lhr: { categories: { performance: {} }, mock: true, }, report: '

hello world

', - }), + })), })); jest.mock('./helpers/upload', () => ({ @@ -71,9 +71,3 @@ describe('@foo-software/lighthouse-persist', () => { expect(response).toMatchSnapshot(); }); }); - -describe('ReportGenerator', () => { - it('generateReportHtml should be a function', () => { - expect(typeof ReportGenerator.generateReportHtml).toBe('function'); - }); -}); diff --git a/src/lighthousePersist.ts b/src/lighthousePersist.ts index 77ababa..8180e40 100644 --- a/src/lighthousePersist.ts +++ b/src/lighthousePersist.ts @@ -1,16 +1,13 @@ import fs from 'fs'; -import lighthouse from 'lighthouse'; -import LighthouseResultInterface from 'lighthouse/types/lhr/lhr'; import * as chromeLauncher from 'chrome-launcher'; import AWS from 'aws-sdk'; -import ReportGenerator from 'lighthouse/report/generator/report-generator'; import config from './config'; import defaultOptions from './options'; import upload from './helpers/upload'; import getOpportunities from './helpers/getOpportunities'; import getPageSpeedInsightsApiResult from './helpers/getPageSpeedInsightsApiResult'; - -export { ReportGenerator }; +import loadLighthouse from './helpers/loadLighthouse'; +import loadReportGenerator from './helpers/loadReportGenerator'; interface OpportunitiesInterface { id: string; @@ -75,7 +72,7 @@ interface LighthousePersistResultInterface { loadingExperience?: LoadingExperienceInterface; localReport?: string; originLoadingExperience?: LoadingExperienceInterface; - result: LighthouseResultInterface; + result: any; report?: string; opportunities?: OpportunitiesInterface[]; } @@ -168,6 +165,7 @@ export default async ({ throw Error(psiResults.error.message); } + const ReportGenerator = await loadReportGenerator(); results = { lhr: psiResults.lighthouseResult, report: ReportGenerator.generateReportHtml(psiResults.lighthouseResult), @@ -194,6 +192,8 @@ export default async ({ options.output = 'html'; + const lighthouse = await loadLighthouse(); + results = !timeout ? await lighthouse(url, options, fullConfig) : await Promise.race([ diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000..674777e --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "allowJs": true, + "declaration": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "isolatedModules": true, + "module": "NodeNext", + "moduleResolution": "nodenext", + "outDir": "./dist", + "rootDir": "./src", + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "target": "esnext" + } +} diff --git a/tsconfig.json b/tsconfig.json index 4ff5eed..f68cad0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,5 @@ { - "compilerOptions": { - "allowJs": true, - "declaration": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "module": "NodeNext", - "outDir": "./dist", - "rootDir": "./src", - "sourceMap": true, - "strict": true, - "target": "esnext" - }, - "exclude": ["node_modules", "**/*.test.ts"], - "include": ["**/*.ts"] + "extends": "./tsconfig.base.json", + "exclude": ["node_modules", "./dist", "./src/**/*.test.ts"], + "include": ["./src/**/*.ts"] } diff --git a/tsconfig.test.json b/tsconfig.test.json index 8cab304..778933a 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -1,10 +1,5 @@ { - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "es2020", - "moduleResolution": "node", - "target": "es2020" - }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.test.ts"] + "extends": "./tsconfig.base.json", + "exclude": ["node_modules", "./dist"], + "include": ["./src/**/*.ts"] }