From 9747083e4c798169d7a3b635ec853f2594129783 Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Mon, 19 Oct 2026 15:27:21 +0100 Subject: [PATCH 1/5] Fix and expand Lighthouse checks --- .github/lighthouse/lighthouse-config-dev.json | 3 ++- .github/lighthouse/lighthouse-config-prod.json | 3 ++- src/js/report.js | 6 +++++- src/layouts/Base.astro | 2 +- src/pages/reports/[report_id].astro | 1 - tools/scripts/set_lighthouse_urls.sh | 7 +++++++ 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/lighthouse/lighthouse-config-dev.json b/.github/lighthouse/lighthouse-config-dev.json index f7d0bb52..45fa6992 100644 --- a/.github/lighthouse/lighthouse-config-dev.json +++ b/.github/lighthouse/lighthouse-config-dev.json @@ -48,7 +48,8 @@ "uses-rel-preconnect": "off", "uses-responsive-images": "off", "uses-text-compression": "off", - "uses-webp-images": "off" + "uses-webp-images": "off", + "valid-source-maps": "off" } } } diff --git a/.github/lighthouse/lighthouse-config-prod.json b/.github/lighthouse/lighthouse-config-prod.json index 26e8084b..2540058c 100644 --- a/.github/lighthouse/lighthouse-config-prod.json +++ b/.github/lighthouse/lighthouse-config-prod.json @@ -46,7 +46,8 @@ "uses-rel-preconnect": "off", "uses-responsive-images": "off", "uses-text-compression": "off", - "uses-webp-images": "off" + "uses-webp-images": "off", + "valid-source-maps": "off" } } } diff --git a/src/js/report.js b/src/js/report.js index ece65e46..cca28084 100644 --- a/src/js/report.js +++ b/src/js/report.js @@ -118,7 +118,11 @@ class Report { } } - url.searchParams.set('view', this.view); + if (this.view) { + url.searchParams.set('view', this.view); + } else { + url.searchParams.delete('view'); + } this.permalink.value = url.toString(); } diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index b170ff94..bca9c673 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -44,7 +44,7 @@ const getPageDates = (pathname: string) => { const pageDates = getPageDates(Astro.url.pathname); const defaultDate = new Date().toISOString(); -const canonicalURL = new URL(Astro.url.pathname, Astro.site); +const canonicalURL = new URL(Astro.url.pathname.replace(/\/$/, ''), Astro.site); const { title = 'HTTP Archive', diff --git a/src/pages/reports/[report_id].astro b/src/pages/reports/[report_id].astro index d0d43b02..7289b046 100644 --- a/src/pages/reports/[report_id].astro +++ b/src/pages/reports/[report_id].astro @@ -73,7 +73,6 @@ const imageHeight = report.image ? 460 : 160; imageHeight={imageHeight} > -
diff --git a/tools/scripts/set_lighthouse_urls.sh b/tools/scripts/set_lighthouse_urls.sh index da357ee0..c89cd781 100755 --- a/tools/scripts/set_lighthouse_urls.sh +++ b/tools/scripts/set_lighthouse_urls.sh @@ -39,7 +39,14 @@ http://127.0.0.1:8080/reports http://127.0.0.1:8080/reports/state-of-the-web http://127.0.0.1:8080/reports/techreport/landing http://127.0.0.1:8080/reports/techreport/tech +http://127.0.0.1:8080/reports/techreport/tech?tech=ALL,WordPress,Wix,Next.js http://127.0.0.1:8080/reports/techreport/category +http://127.0.0.1:8080/about +http://127.0.0.1:8080/faq +http://127.0.0.1:8080/docs +http://127.0.0.1:8080/docs/guides/getting-started +http://127.0.0.1:8080/docs/docs/reference/tables/pages + END ) From bbebbedf786fe1139342c99e808bae97093d38bc Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Mon, 19 Oct 2026 15:44:52 +0100 Subject: [PATCH 2/5] Fix typo in URL --- tools/scripts/set_lighthouse_urls.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scripts/set_lighthouse_urls.sh b/tools/scripts/set_lighthouse_urls.sh index c89cd781..991e0275 100755 --- a/tools/scripts/set_lighthouse_urls.sh +++ b/tools/scripts/set_lighthouse_urls.sh @@ -45,7 +45,7 @@ http://127.0.0.1:8080/about http://127.0.0.1:8080/faq http://127.0.0.1:8080/docs http://127.0.0.1:8080/docs/guides/getting-started -http://127.0.0.1:8080/docs/docs/reference/tables/pages +http://127.0.0.1:8080/docs/reference/tables/pages END ) From 52bc9b97fd62c6e003a39deda92daf4792c42d44 Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Mon, 19 Oct 2026 16:02:39 +0100 Subject: [PATCH 3/5] Exclude `[report-id]` URLs --- tools/scripts/set_lighthouse_urls.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/scripts/set_lighthouse_urls.sh b/tools/scripts/set_lighthouse_urls.sh index 991e0275..075d6bd8 100755 --- a/tools/scripts/set_lighthouse_urls.sh +++ b/tools/scripts/set_lighthouse_urls.sh @@ -66,8 +66,7 @@ elif [ "${RUN_TYPE}" == "pull_request" ] && [ "${COMMIT_SHA}" != "" ]; then git pull --quiet git checkout main # Then get the changes - CHANGED_FILES=$(git diff --name-only "main...${COMMIT_SHA}" --diff-filter=d src/pages config/reports.json | grep -v ejs | grep -v sitemap | grep -v 404 | grep -v comparison | grep -v drilldown) - echo "${CHANGED_FILES}" + CHANGED_FILES=$(git diff --name-only "main...${COMMIT_SHA}" --diff-filter=d src/pages config/reports.json | grep -v ejs | grep -v sitemap | grep -v 404 | grep -v comparison | grep -v drilldown | grep -v "\[report-id\]") echo "${CHANGED_FILES}" # Then back to the pull request changes git checkout --progress --force "${COMMIT_SHA}" From 0607792532315a9d39654479697cc85f4d7506cf Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Mon, 19 Oct 2026 16:07:55 +0100 Subject: [PATCH 4/5] Fix linting --- tools/scripts/set_lighthouse_urls.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/scripts/set_lighthouse_urls.sh b/tools/scripts/set_lighthouse_urls.sh index 075d6bd8..f7303106 100755 --- a/tools/scripts/set_lighthouse_urls.sh +++ b/tools/scripts/set_lighthouse_urls.sh @@ -66,7 +66,8 @@ elif [ "${RUN_TYPE}" == "pull_request" ] && [ "${COMMIT_SHA}" != "" ]; then git pull --quiet git checkout main # Then get the changes - CHANGED_FILES=$(git diff --name-only "main...${COMMIT_SHA}" --diff-filter=d src/pages config/reports.json | grep -v ejs | grep -v sitemap | grep -v 404 | grep -v comparison | grep -v drilldown | grep -v "\[report-id\]") echo "${CHANGED_FILES}" + CHANGED_FILES=$(git diff --name-only "main...${COMMIT_SHA}" --diff-filter=d src/pages config/reports.json | grep -v ejs | grep -v sitemap | grep -v 404 | grep -v comparison | grep -v drilldown | grep -v "\[report-id\]") + echo "${CHANGED_FILES}" # Then back to the pull request changes git checkout --progress --force "${COMMIT_SHA}" From 5ca474328317d6a9b0d5e72bdef509a271efee2c Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Mon, 19 Oct 2026 16:14:08 +0100 Subject: [PATCH 5/5] Fix report-id --- tools/scripts/set_lighthouse_urls.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scripts/set_lighthouse_urls.sh b/tools/scripts/set_lighthouse_urls.sh index f7303106..a88220ad 100755 --- a/tools/scripts/set_lighthouse_urls.sh +++ b/tools/scripts/set_lighthouse_urls.sh @@ -66,7 +66,7 @@ elif [ "${RUN_TYPE}" == "pull_request" ] && [ "${COMMIT_SHA}" != "" ]; then git pull --quiet git checkout main # Then get the changes - CHANGED_FILES=$(git diff --name-only "main...${COMMIT_SHA}" --diff-filter=d src/pages config/reports.json | grep -v ejs | grep -v sitemap | grep -v 404 | grep -v comparison | grep -v drilldown | grep -v "\[report-id\]") + CHANGED_FILES=$(git diff --name-only "main...${COMMIT_SHA}" --diff-filter=d src/pages config/reports.json | grep -v ejs | grep -v sitemap | grep -v 404 | grep -v comparison | grep -v drilldown | grep -v "\[report_id\]") echo "${CHANGED_FILES}" # Then back to the pull request changes