diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index db95c4f02..e4dbfa7ca 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index f930610fd..f86f68886 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -16,11 +16,11 @@ jobs: DOCKER_TAG: ghcr.io/macbre/phantomas:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # https://github.com/marketplace/actions/build-and-push-docker-images - name: Build the Docker image with ${{ env.DOCKER_TAG }} tag - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . tags: ${{ env.DOCKER_TAG }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 1ae9d11c5..ee2e960b3 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: latest cache: npm - name: Install dependencies diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 12eb6b140..e2c078efe 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -11,14 +11,14 @@ jobs: npm-publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm # - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: 'latest' registry-url: 'https://npm.pkg.github.com' # GitHub Packages only supports scoped npm packages. @@ -38,7 +38,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: 'latest' registry-url: 'https://registry.npmjs.org' - name: Publish to npm diff --git a/.github/workflows/push-to-ghcr.yml b/.github/workflows/push-to-ghcr.yml index 03f28ff67..7f425b9da 100644 --- a/.github/workflows/push-to-ghcr.yml +++ b/.github/workflows/push-to-ghcr.yml @@ -16,7 +16,7 @@ jobs: runs-on: "ubuntu-20.04" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build and publish a Docker image for ${{ github.repository }} uses: macbre/push-to-ghcr@master diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ed623cb77..38c21ac47 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,10 +17,10 @@ jobs: fail-fast: false matrix: # https://github.com/nodejs/release#release-schedule + # https://github.com/actions/setup-node#supported-version-syntax node-version: - - '16.x' - - '18.x' - - '20.x' + - "lts/*" + - "latest" services: # https://github.com/postmanlabs/httpbin @@ -31,13 +31,16 @@ jobs: - "5555:80" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: cache: npm node-version: ${{ matrix.node-version }} + - name: Log the Node.js version used + run: echo "::notice::Using Node.js $( node -v)" + - name: Install dependencies run: npm ci @@ -79,7 +82,7 @@ jobs: # upload coverage report for just one of Node.js version matrix runs - name: Upload coverage report to Coveralls if: matrix.node-version == '16.x' - uses: coverallsapp/github-action@v2.2.1 + uses: coverallsapp/github-action@v2.2.3 continue-on-error: true with: github-token: ${{ github.token }} diff --git a/.github/workflows/upgrade-puppeteer.yml b/.github/workflows/upgrade-puppeteer.yml index 15ef5d60f..13035d224 100644 --- a/.github/workflows/upgrade-puppeteer.yml +++ b/.github/workflows/upgrade-puppeteer.yml @@ -36,14 +36,14 @@ jobs: steps: # https://github.com/actions/checkout - name: Cloning ${{ env.GIT_BRANCH }} branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ env.GIT_BRANCH }} - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: latest - name: Install dependencies and try to bump puppeteer run: | @@ -82,7 +82,7 @@ jobs: --label 'external dependency' \ --base ${{ env.GIT_BRANCH }} \ --title "bump puppeteer to v${VERSION}" \ - --body "[Release notes](https://github.com/puppeteer/puppeteer/releases/tag/v${VERSION})" + --body "[Release notes](https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-v${VERSION})" # e.g. https://github.com/macbre/analyze-css/pull/443 export PR_URL=$(gh pr view ${PR_BRANCH} --json url | jq -r .url) diff --git a/modules/lazyLoadableImages/scope.js b/modules/lazyLoadableImages/scope.js index 5ff914cd8..c87e15517 100644 --- a/modules/lazyLoadableImages/scope.js +++ b/modules/lazyLoadableImages/scope.js @@ -12,6 +12,7 @@ len = images.length, offset, path, + native, processedImages = {}, src, viewportHeight = window.innerHeight; @@ -30,6 +31,9 @@ // @see https://stackoverflow.com/questions/35586728/detect-used-srcset-or-picture-tag-source-with-javascript src = images[i].currentSrc; + // Chrome headless loads images with native lazyloading, therefore we need to filter by ourself. + native = images[i].loading === "lazy"; + // ignore base64-encoded images if (src === null || src === "" || /^data:/.test(src)) { continue; @@ -42,6 +46,7 @@ processedImages[src] = { offset: offset, path: path, + native: native, }; } @@ -50,6 +55,7 @@ processedImages[src] = { offset: offset, path: path, + native: native, }; } } @@ -62,7 +68,7 @@ Object.keys(processedImages).forEach((src) => { var img = processedImages[src]; - if (img.offset > viewportHeight) { + if (img.offset > viewportHeight && !img.native) { phantomas.log( "lazyLoadableImages: <%s> image (%s) is below the fold (at %dpx)", src, diff --git a/package-lock.json b/package-lock.json index 45570a858..45f23da64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "decamelize": "^5.0.0", "fast-stats": "0.0.6", "js-yaml": "^4.0.0", - "puppeteer": "^21.0.2" + "puppeteer": "^21.2.1" }, "bin": { "phantomas": "bin/phantomas.js" @@ -1039,14 +1039,14 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.5.1.tgz", - "integrity": "sha512-OY8S5/DIsCSn/jahxw+qhCKa6jYQff6yq1oenzakISLvGcwWpyMzshJ3BIR7iP0vG0RPJjvHRLRxbsWw4kah1w==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.7.1.tgz", + "integrity": "sha512-nIb8SOBgDEMFY2iS2MdnUZOg2ikcYchRrBoF+wtdjieRFKR2uGRipHY/oFLo+2N6anDualyClPzGywTHRGrLfw==", "dependencies": { "debug": "4.3.4", "extract-zip": "2.0.1", "progress": "2.0.3", - "proxy-agent": "6.3.0", + "proxy-agent": "6.3.1", "tar-fs": "3.0.4", "unbzip2-stream": "1.4.3", "yargs": "17.7.1" @@ -2452,9 +2452,9 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "node_modules/chromium-bidi": { - "version": "0.4.20", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.20.tgz", - "integrity": "sha512-ruHgVZFEv00mAQMz1tQjfjdG63jiPWrQPF6HLlX2ucqLqVTJoWngeBEKHaJ6n1swV/HSvgnBNbtTRIlcVyW3Fw==", + "version": "0.4.26", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.26.tgz", + "integrity": "sha512-lukBGfogAI4T0y3acc86RaacqgKQve47/8pV2c+Hr1PjcICj2K4OkL3qfX3qrqxxnd4ddurFC0WBA3VCQqYeUQ==", "dependencies": { "mitt": "3.0.1" }, @@ -2646,13 +2646,13 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cosmiconfig": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz", - "integrity": "sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.5.tgz", + "integrity": "sha512-A5Xry3xfS96wy2qbiLkQLAg4JUrR2wvfybxj6yqLmrUfMAvhS3MZxIP2oQn0grgYIvJqzpeTEWu4vK0t+12NNw==", "dependencies": { - "import-fresh": "^3.2.1", + "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", + "parse-json": "^5.2.0", "path-type": "^4.0.0" }, "engines": { @@ -2660,6 +2660,14 @@ }, "funding": { "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/cross-fetch": { @@ -3129,9 +3137,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1147663", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", - "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==" + "version": "0.0.1159816", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1159816.tgz", + "integrity": "sha512-2cZlHxC5IlgkIWe2pSDmCrDiTzbSJWywjbDDnupOImEBcG31CQgBLV8wWE+5t+C4rimcjHsbzy7CBzf9oFjboA==" }, "node_modules/diff-sequences": { "version": "28.1.1", @@ -3786,9 +3794,9 @@ "dev": true }, "node_modules/fast-fifo": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.0.tgz", - "integrity": "sha512-IgfweLvEpwyA4WgiQe9Nx6VV2QkML2NkvZnk1oKnIzXgXdWxuhF7zw4DvLTPZJn6PIUneiAXPF24QmoEqHTjyw==" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" }, "node_modules/fast-glob": { "version": "3.3.1", @@ -4417,9 +4425,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.1.tgz", - "integrity": "sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -5942,9 +5950,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -6234,18 +6242,18 @@ } }, "node_modules/pac-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.0.tgz", - "integrity": "sha512-t4tRAMx0uphnZrio0S0Jw9zg3oDbz1zVhQ/Vy18FjLfP1XOLNUEjaVxYCYRI6NS+BsMBXKIzV6cTLOkO9AtywA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.0.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "pac-resolver": "^7.0.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.2" }, "engines": { "node": ">= 14" @@ -6587,18 +6595,18 @@ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==" }, "node_modules/proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz", + "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==", "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", + "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.2" }, "engines": { "node": ">= 14" @@ -6664,30 +6672,30 @@ } }, "node_modules/puppeteer": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.0.2.tgz", - "integrity": "sha512-RAgbVjvwLABz8y+83xGdE+v7JLmvvcyGSlhQUX6k3rpBeRIO593E3DCaSY9VRUq3VJPMm7nWzDiZjUaK1tIpQg==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.2.1.tgz", + "integrity": "sha512-bgY/lYBH3rR+m5EP1FxzY2MRMrau7Pyq+N5YlspA63sF+cBkUiTn5WZXwXm7mEHwkkOSVi5LiS74T5QIgrSklg==", "hasInstallScript": true, "dependencies": { - "@puppeteer/browsers": "1.5.1", - "cosmiconfig": "8.2.0", - "puppeteer-core": "21.0.2" + "@puppeteer/browsers": "1.7.1", + "cosmiconfig": "8.3.5", + "puppeteer-core": "21.2.1" }, "engines": { "node": ">=16.3.0" } }, "node_modules/puppeteer-core": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.0.2.tgz", - "integrity": "sha512-6tRjB9RZmPApPhQhzXZxmPUBt+6KM2P/eCp8p2o0DvK3P1V2qYkRi6/EQJEBIFquqZ+kF1zaW9Tg69p0dQlqFg==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.2.1.tgz", + "integrity": "sha512-+I8EjpWFeeFKScpQiTEnC4jGve2Wr4eA9qUMoa8S317DJPm9h7wzrT4YednZK2TQZMyPtPQ2Disb/Tg02+4Naw==", "dependencies": { - "@puppeteer/browsers": "1.5.1", - "chromium-bidi": "0.4.20", + "@puppeteer/browsers": "1.7.1", + "chromium-bidi": "0.4.26", "cross-fetch": "4.0.0", "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" + "devtools-protocol": "0.0.1159816", + "ws": "8.14.1" }, "engines": { "node": ">=16.3.0" @@ -7206,11 +7214,11 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.1.tgz", - "integrity": "sha512-59EjPbbgg8U3x62hhKOFVAmySQUcfRQ4C7Q/D5sEHnZTQRrQlNKINks44DMR1gwXp0p4LaVIeccX2KHTTcHVqQ==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", + "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", "dependencies": { - "agent-base": "^7.0.1", + "agent-base": "^7.0.2", "debug": "^4.3.4", "socks": "^2.7.1" }, @@ -7725,9 +7733,9 @@ } }, "node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -7941,9 +7949,9 @@ } }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", + "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", "engines": { "node": ">=10.0.0" }, @@ -8796,14 +8804,14 @@ } }, "@puppeteer/browsers": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.5.1.tgz", - "integrity": "sha512-OY8S5/DIsCSn/jahxw+qhCKa6jYQff6yq1oenzakISLvGcwWpyMzshJ3BIR7iP0vG0RPJjvHRLRxbsWw4kah1w==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.7.1.tgz", + "integrity": "sha512-nIb8SOBgDEMFY2iS2MdnUZOg2ikcYchRrBoF+wtdjieRFKR2uGRipHY/oFLo+2N6anDualyClPzGywTHRGrLfw==", "requires": { "debug": "4.3.4", "extract-zip": "2.0.1", "progress": "2.0.3", - "proxy-agent": "6.3.0", + "proxy-agent": "6.3.1", "tar-fs": "3.0.4", "unbzip2-stream": "1.4.3", "yargs": "17.7.1" @@ -9883,9 +9891,9 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "chromium-bidi": { - "version": "0.4.20", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.20.tgz", - "integrity": "sha512-ruHgVZFEv00mAQMz1tQjfjdG63jiPWrQPF6HLlX2ucqLqVTJoWngeBEKHaJ6n1swV/HSvgnBNbtTRIlcVyW3Fw==", + "version": "0.4.26", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.26.tgz", + "integrity": "sha512-lukBGfogAI4T0y3acc86RaacqgKQve47/8pV2c+Hr1PjcICj2K4OkL3qfX3qrqxxnd4ddurFC0WBA3VCQqYeUQ==", "requires": { "mitt": "3.0.1" } @@ -10036,13 +10044,13 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "cosmiconfig": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz", - "integrity": "sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.5.tgz", + "integrity": "sha512-A5Xry3xfS96wy2qbiLkQLAg4JUrR2wvfybxj6yqLmrUfMAvhS3MZxIP2oQn0grgYIvJqzpeTEWu4vK0t+12NNw==", "requires": { - "import-fresh": "^3.2.1", + "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", + "parse-json": "^5.2.0", "path-type": "^4.0.0" } }, @@ -10402,9 +10410,9 @@ "dev": true }, "devtools-protocol": { - "version": "0.0.1147663", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", - "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==" + "version": "0.0.1159816", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1159816.tgz", + "integrity": "sha512-2cZlHxC5IlgkIWe2pSDmCrDiTzbSJWywjbDDnupOImEBcG31CQgBLV8wWE+5t+C4rimcjHsbzy7CBzf9oFjboA==" }, "diff-sequences": { "version": "28.1.1", @@ -10867,9 +10875,9 @@ "dev": true }, "fast-fifo": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.0.tgz", - "integrity": "sha512-IgfweLvEpwyA4WgiQe9Nx6VV2QkML2NkvZnk1oKnIzXgXdWxuhF7zw4DvLTPZJn6PIUneiAXPF24QmoEqHTjyw==" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" }, "fast-glob": { "version": "3.3.1", @@ -11344,9 +11352,9 @@ } }, "https-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.1.tgz", - "integrity": "sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "requires": { "agent-base": "^7.0.2", "debug": "4" @@ -12482,9 +12490,9 @@ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" }, "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "requires": { "whatwg-url": "^5.0.0" } @@ -12686,18 +12694,18 @@ "dev": true }, "pac-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.0.tgz", - "integrity": "sha512-t4tRAMx0uphnZrio0S0Jw9zg3oDbz1zVhQ/Vy18FjLfP1XOLNUEjaVxYCYRI6NS+BsMBXKIzV6cTLOkO9AtywA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", "requires": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.0.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "pac-resolver": "^7.0.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.2" }, "dependencies": { "agent-base": { @@ -12945,18 +12953,18 @@ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==" }, "proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz", + "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==", "requires": { "agent-base": "^7.0.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", + "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.2" }, "dependencies": { "agent-base": { @@ -13009,26 +13017,26 @@ "dev": true }, "puppeteer": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.0.2.tgz", - "integrity": "sha512-RAgbVjvwLABz8y+83xGdE+v7JLmvvcyGSlhQUX6k3rpBeRIO593E3DCaSY9VRUq3VJPMm7nWzDiZjUaK1tIpQg==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.2.1.tgz", + "integrity": "sha512-bgY/lYBH3rR+m5EP1FxzY2MRMrau7Pyq+N5YlspA63sF+cBkUiTn5WZXwXm7mEHwkkOSVi5LiS74T5QIgrSklg==", "requires": { - "@puppeteer/browsers": "1.5.1", - "cosmiconfig": "8.2.0", - "puppeteer-core": "21.0.2" + "@puppeteer/browsers": "1.7.1", + "cosmiconfig": "8.3.5", + "puppeteer-core": "21.2.1" } }, "puppeteer-core": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.0.2.tgz", - "integrity": "sha512-6tRjB9RZmPApPhQhzXZxmPUBt+6KM2P/eCp8p2o0DvK3P1V2qYkRi6/EQJEBIFquqZ+kF1zaW9Tg69p0dQlqFg==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.2.1.tgz", + "integrity": "sha512-+I8EjpWFeeFKScpQiTEnC4jGve2Wr4eA9qUMoa8S317DJPm9h7wzrT4YednZK2TQZMyPtPQ2Disb/Tg02+4Naw==", "requires": { - "@puppeteer/browsers": "1.5.1", - "chromium-bidi": "0.4.20", + "@puppeteer/browsers": "1.7.1", + "chromium-bidi": "0.4.26", "cross-fetch": "4.0.0", "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" + "devtools-protocol": "0.0.1159816", + "ws": "8.14.1" } }, "query-string": { @@ -13382,11 +13390,11 @@ } }, "socks-proxy-agent": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.1.tgz", - "integrity": "sha512-59EjPbbgg8U3x62hhKOFVAmySQUcfRQ4C7Q/D5sEHnZTQRrQlNKINks44DMR1gwXp0p4LaVIeccX2KHTTcHVqQ==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", + "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", "requires": { - "agent-base": "^7.0.1", + "agent-base": "^7.0.2", "debug": "^4.3.4", "socks": "^2.7.1" }, @@ -13769,9 +13777,9 @@ } }, "tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "tunnel-agent": { "version": "0.6.0", @@ -13933,9 +13941,9 @@ } }, "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", + "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", "requires": {} }, "xtend": { diff --git a/package.json b/package.json index c1f8b11b4..f9caebcbc 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "decamelize": "^5.0.0", "fast-stats": "0.0.6", "js-yaml": "^4.0.0", - "puppeteer": "^21.0.2" + "puppeteer": "^21.2.1" }, "devDependencies": { "@jest/globals": "^28.0.0", diff --git a/test/integration-spec.yaml b/test/integration-spec.yaml index 9146c72c0..1c2199ab4 100644 --- a/test/integration-spec.yaml +++ b/test/integration-spec.yaml @@ -946,6 +946,7 @@ - { url: "http://127.0.0.1:8888/static/style.css", size: 320 } - url: "http://127.0.0.1:5555/basic-auth/foo/bar" label: "httpbin's /basic-auth (with --auth-user and --auth-pass)" + flaky: "http-bin sometimes gives us a single response" options: auth-user: "foo" auth-pass: "bar" diff --git a/test/webroot/lazy-loadable-images.html b/test/webroot/lazy-loadable-images.html index 073381c2c..e8acea639 100644 --- a/test/webroot/lazy-loadable-images.html +++ b/test/webroot/lazy-loadable-images.html @@ -25,6 +25,7 @@

Issue #494

+ Foo bar
@@ -44,5 +45,7 @@

Issue #494

+ +