lighthouse 12.5.1 → 12.6.0-dev.20250428
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/run.js +1 -1
- package/cli/test/smokehouse/config/exclusions.js +2 -0
- package/cli/test/smokehouse/lib/concurrent-mapper.d.ts +3 -3
- package/core/audits/audit.d.ts +1 -1
- package/core/audits/audit.js +3 -2
- package/core/audits/bootup-time.d.ts +1 -1
- package/core/audits/bootup-time.js +3 -3
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +1 -1
- package/core/audits/byte-efficiency/duplicated-javascript.js +1 -1
- package/core/audits/byte-efficiency/efficient-animated-content.js +1 -1
- package/core/audits/byte-efficiency/legacy-javascript.js +2 -3
- package/core/audits/byte-efficiency/modern-image-formats.js +1 -1
- package/core/audits/byte-efficiency/offscreen-images.js +4 -4
- package/core/audits/byte-efficiency/render-blocking-resources.js +4 -4
- package/core/audits/byte-efficiency/total-byte-weight.d.ts +1 -1
- package/core/audits/byte-efficiency/total-byte-weight.js +2 -2
- package/core/audits/byte-efficiency/unminified-css.js +1 -1
- package/core/audits/byte-efficiency/unminified-javascript.js +1 -1
- package/core/audits/byte-efficiency/unused-css-rules.js +2 -2
- package/core/audits/byte-efficiency/unused-javascript.js +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.js +2 -2
- package/core/audits/byte-efficiency/uses-optimized-images.js +2 -2
- package/core/audits/byte-efficiency/uses-responsive-images.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
- package/core/audits/byte-efficiency/uses-text-compression.js +1 -1
- package/core/audits/clickjacking-mitigation.js +2 -2
- package/core/audits/critical-request-chains.js +3 -3
- package/core/audits/csp-xss.js +2 -2
- package/core/audits/diagnostics.js +3 -3
- package/core/audits/dobetterweb/charset.js +2 -2
- package/core/audits/dobetterweb/doctype.js +2 -2
- package/core/audits/dobetterweb/dom-size.d.ts +1 -1
- package/core/audits/dobetterweb/dom-size.js +3 -3
- package/core/audits/dobetterweb/uses-http2.js +2 -2
- package/core/audits/final-screenshot.js +2 -2
- package/core/audits/font-display.js +2 -2
- package/core/audits/has-hsts.js +2 -2
- package/core/audits/image-size-responsive.d.ts +3 -2
- package/core/audits/image-size-responsive.js +30 -4
- package/core/audits/insights/{use-cache-insight.d.ts → cache-insight.d.ts} +3 -3
- package/core/audits/insights/{use-cache-insight.js → cache-insight.js} +15 -13
- package/core/audits/insights/cls-culprits-insight.js +3 -3
- package/core/audits/insights/document-latency-insight.js +1 -1
- package/core/audits/insights/dom-size-insight.js +1 -1
- package/core/audits/insights/duplicated-javascript-insight.d.ts +13 -0
- package/core/audits/insights/duplicated-javascript-insight.js +36 -9
- package/core/audits/insights/font-display-insight.js +1 -1
- package/core/audits/insights/forced-reflow-insight.js +1 -1
- package/core/audits/insights/image-delivery-insight.js +1 -1
- package/core/audits/insights/insight-audit.d.ts +11 -9
- package/core/audits/insights/insight-audit.js +37 -35
- package/core/audits/insights/interaction-to-next-paint-insight.js +3 -6
- package/core/audits/insights/lcp-discovery-insight.js +6 -3
- package/core/audits/insights/lcp-phases-insight.js +3 -6
- package/core/audits/insights/legacy-javascript-insight.d.ts +23 -0
- package/core/audits/insights/legacy-javascript-insight.js +101 -0
- package/core/audits/insights/modern-http-insight.d.ts +11 -0
- package/core/audits/insights/modern-http-insight.js +53 -0
- package/core/audits/insights/network-dependency-tree-insight.d.ts +5 -0
- package/core/audits/insights/network-dependency-tree-insight.js +35 -13
- package/core/audits/insights/render-blocking-insight.js +1 -1
- package/core/audits/insights/slow-css-selector-insight.js +3 -1
- package/core/audits/insights/third-parties-insight.d.ts +3 -3
- package/core/audits/insights/third-parties-insight.js +28 -23
- package/core/audits/insights/viewport-insight.js +1 -1
- package/core/audits/is-on-https.js +2 -2
- package/core/audits/largest-contentful-paint-element.js +3 -3
- package/core/audits/layout-shifts.js +4 -4
- package/core/audits/lcp-lazy-loaded.js +1 -1
- package/core/audits/long-tasks.d.ts +1 -1
- package/core/audits/long-tasks.js +3 -3
- package/core/audits/main-thread-tasks.js +2 -2
- package/core/audits/mainthread-work-breakdown.d.ts +1 -1
- package/core/audits/mainthread-work-breakdown.js +2 -2
- package/core/audits/manual/manual-audit.d.ts +1 -1
- package/core/audits/metrics/cumulative-layout-shift.d.ts +1 -1
- package/core/audits/metrics/cumulative-layout-shift.js +2 -2
- package/core/audits/metrics/first-contentful-paint.js +3 -3
- package/core/audits/metrics/first-meaningful-paint.js +1 -1
- package/core/audits/metrics/interaction-to-next-paint.d.ts +1 -1
- package/core/audits/metrics/interaction-to-next-paint.js +2 -2
- package/core/audits/metrics/interactive.js +3 -3
- package/core/audits/metrics/largest-contentful-paint.js +3 -3
- package/core/audits/metrics/max-potential-fid.d.ts +1 -1
- package/core/audits/metrics/max-potential-fid.js +3 -3
- package/core/audits/metrics/speed-index.js +3 -3
- package/core/audits/metrics/total-blocking-time.js +3 -3
- package/core/audits/metrics.js +3 -3
- package/core/audits/network-requests.js +2 -2
- package/core/audits/network-rtt.js +2 -2
- package/core/audits/network-server-latency.js +2 -2
- package/core/audits/origin-isolation.js +2 -2
- package/core/audits/predictive-perf.js +3 -3
- package/core/audits/preload-fonts.js +2 -2
- package/core/audits/prioritize-lcp-image.js +3 -3
- package/core/audits/redirects.js +3 -3
- package/core/audits/resource-summary.js +2 -2
- package/core/audits/screenshot-thumbnails.js +2 -2
- package/core/audits/script-treemap-data.js +32 -2
- package/core/audits/seo/canonical.js +2 -2
- package/core/audits/seo/http-status-code.js +2 -2
- package/core/audits/seo/is-crawlable.js +2 -2
- package/core/audits/server-response-time.js +2 -2
- package/core/audits/third-party-cookies.js +1 -1
- package/core/audits/third-party-facades.js +2 -2
- package/core/audits/third-party-summary.js +2 -2
- package/core/audits/user-timings.d.ts +1 -1
- package/core/audits/user-timings.js +2 -2
- package/core/audits/uses-rel-preconnect.js +3 -3
- package/core/audits/uses-rel-preload.js +3 -3
- package/core/audits/valid-source-maps.js +2 -2
- package/core/audits/work-during-interaction.js +3 -3
- package/core/computed/critical-request-chains.d.ts +1 -1
- package/core/computed/document-urls.d.ts +4 -1
- package/core/computed/entity-classification.d.ts +1 -1
- package/core/computed/image-records.d.ts +1 -1
- package/core/computed/js-bundles.d.ts +1 -1
- package/core/computed/lcp-image-record.d.ts +1 -1
- package/core/computed/load-simulator.d.ts +1 -1
- package/core/computed/main-resource.d.ts +1 -1
- package/core/computed/main-thread-tasks.d.ts +1 -1
- package/core/computed/metrics/cumulative-layout-shift.d.ts +10 -1
- package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/first-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/interactive.d.ts +1 -1
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-interactive.d.ts +1 -1
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +1 -1
- package/core/computed/metrics/lantern-speed-index.d.ts +1 -1
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +1 -1
- package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/largest-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lcp-breakdown.d.ts +5 -1
- package/core/computed/metrics/max-potential-fid.d.ts +1 -1
- package/core/computed/metrics/responsiveness.d.ts +1 -1
- package/core/computed/metrics/speed-index.d.ts +1 -1
- package/core/computed/metrics/time-to-first-byte.d.ts +1 -1
- package/core/computed/metrics/timing-summary.d.ts +4 -1
- package/core/computed/metrics/total-blocking-time.d.ts +1 -1
- package/core/computed/module-duplication.d.ts +5 -1
- package/core/computed/navigation-insights.d.ts +1 -1
- package/core/computed/network-analysis.d.ts +1 -1
- package/core/computed/network-records.d.ts +1 -1
- package/core/computed/page-dependency-graph.d.ts +1 -1
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/computed/processed-trace.d.ts +1 -1
- package/core/computed/resource-summary.d.ts +1 -1
- package/core/computed/screenshots.d.ts +4 -1
- package/core/computed/speedline.d.ts +1 -1
- package/core/computed/tbt-impact-tasks.d.ts +1 -1
- package/core/computed/trace-engine-result.d.ts +1 -1
- package/core/computed/unused-css.d.ts +1 -1
- package/core/computed/unused-javascript-summary.d.ts +1 -1
- package/core/computed/user-timings.d.ts +1 -1
- package/core/computed/viewport-meta.d.ts +1 -1
- package/core/config/default-config.js +11 -6
- package/core/config/experimental-config.js +3 -2
- package/core/gather/driver/network-monitor.d.ts +1 -1
- package/core/gather/driver/network.d.ts +1 -1
- package/core/gather/driver.d.ts +1 -1
- package/core/gather/gatherers/devtools-log.d.ts +1 -1
- package/core/gather/gatherers/dobetterweb/optimized-images.js +3 -10
- package/core/gather/gatherers/trace-elements.d.ts +3 -4
- package/core/gather/gatherers/trace-elements.js +6 -8
- package/core/gather/gatherers/trace.js +0 -3
- package/core/gather/navigation-runner.d.ts +1 -1
- package/core/gather/snapshot-runner.d.ts +1 -1
- package/core/gather/timespan-runner.d.ts +1 -1
- package/core/index.d.ts +6 -6
- package/core/lib/asset-saver.d.ts +1 -1
- package/core/lib/asset-saver.js +1 -1
- package/core/lib/bf-cache-strings.js +2 -0
- package/core/lib/deprecations-strings.d.ts +71 -76
- package/core/lib/deprecations-strings.js +22 -25
- package/core/lib/i18n/README.md +1 -1
- package/core/lib/i18n/i18n.d.ts +1 -1
- package/core/lib/i18n/i18n.js +4 -4
- package/core/lib/legacy-javascript/legacy-javascript.js +4 -11
- package/core/lib/legacy-javascript/package.json +14 -0
- package/core/lib/page-functions.d.ts +1 -1
- package/core/lib/stack-packs.js +1 -1
- package/core/lib/tracehouse/cpu-profile-model.d.ts +1 -1
- package/core/lib/tracehouse/main-thread-tasks.d.ts +3 -3
- package/core/lib/tracehouse/main-thread-tasks.js +8 -0
- package/core/lib/tracehouse/trace-processor.d.ts +1 -1
- package/core/lib/traces/metric-trace-events.d.ts +2 -2
- package/core/runner.js +2 -1
- package/core/scoring.d.ts +539 -3
- package/core/user-flow.d.ts +6 -6
- package/dist/report/bundle.esm.js +98 -20
- package/dist/report/flow.js +101 -23
- package/dist/report/standalone.js +98 -20
- package/flow-report/src/i18n/i18n.d.ts +6 -2
- package/package.json +17 -16
- package/readme.md +1 -1
- package/report/README.md +1 -1
- package/report/assets/styles.css +85 -10
- package/report/assets/templates.html +3 -1
- package/report/clients/standalone.js +6 -4
- package/report/renderer/category-renderer.d.ts +2 -2
- package/report/renderer/components.js +3 -9
- package/report/renderer/crc-details-renderer.d.ts +13 -31
- package/report/renderer/crc-details-renderer.js +49 -47
- package/report/renderer/details-renderer.d.ts +1 -1
- package/report/renderer/details-renderer.js +6 -0
- package/report/renderer/dom.js +7 -0
- package/report/renderer/features-util.d.ts +1 -1
- package/report/renderer/performance-category-renderer.d.ts +28 -2
- package/report/renderer/performance-category-renderer.js +120 -3
- package/report/renderer/report-utils.d.ts +3 -1
- package/report/renderer/report-utils.js +11 -4
- package/report/renderer/topbar-features.js +1 -9
- package/shared/localization/format.d.ts +1 -1
- package/shared/localization/locales/ar-XB.json +66 -6
- package/shared/localization/locales/ar.json +66 -6
- package/shared/localization/locales/bg.json +66 -6
- package/shared/localization/locales/ca.json +66 -6
- package/shared/localization/locales/cs.json +66 -6
- package/shared/localization/locales/da.json +66 -6
- package/shared/localization/locales/de.json +66 -6
- package/shared/localization/locales/el.json +66 -6
- package/shared/localization/locales/en-GB.json +66 -6
- package/shared/localization/locales/en-US.json +87 -36
- package/shared/localization/locales/en-XA.json +0 -6
- package/shared/localization/locales/en-XL.json +87 -36
- package/shared/localization/locales/es-419.json +66 -6
- package/shared/localization/locales/es.json +67 -7
- package/shared/localization/locales/fi.json +66 -6
- package/shared/localization/locales/fil.json +66 -6
- package/shared/localization/locales/fr.json +66 -6
- package/shared/localization/locales/he.json +66 -6
- package/shared/localization/locales/hi.json +66 -6
- package/shared/localization/locales/hr.json +66 -6
- package/shared/localization/locales/hu.json +66 -6
- package/shared/localization/locales/id.json +66 -6
- package/shared/localization/locales/it.json +67 -7
- package/shared/localization/locales/ja.json +66 -6
- package/shared/localization/locales/ko.json +66 -6
- package/shared/localization/locales/lt.json +66 -6
- package/shared/localization/locales/lv.json +66 -6
- package/shared/localization/locales/nl.json +66 -6
- package/shared/localization/locales/no.json +66 -6
- package/shared/localization/locales/pl.json +66 -6
- package/shared/localization/locales/pt-PT.json +66 -6
- package/shared/localization/locales/pt.json +67 -7
- package/shared/localization/locales/ro.json +66 -6
- package/shared/localization/locales/ru.json +66 -6
- package/shared/localization/locales/sk.json +66 -6
- package/shared/localization/locales/sl.json +66 -6
- package/shared/localization/locales/sr-Latn.json +66 -6
- package/shared/localization/locales/sr.json +66 -6
- package/shared/localization/locales/sv.json +66 -6
- package/shared/localization/locales/ta.json +69 -9
- package/shared/localization/locales/te.json +66 -6
- package/shared/localization/locales/th.json +66 -6
- package/shared/localization/locales/tr.json +66 -6
- package/shared/localization/locales/uk.json +66 -6
- package/shared/localization/locales/vi.json +66 -6
- package/shared/localization/locales/zh-HK.json +67 -7
- package/shared/localization/locales/zh-TW.json +67 -7
- package/shared/localization/locales/zh.json +66 -6
- package/tsconfig-base.json +1 -1
- package/tsconfig.json +1 -0
- package/types/artifacts.d.ts +0 -2
- package/types/internal/node.d.ts +0 -16
- package/types/lhr/audit-details.d.ts +33 -1
- package/types/lhr/treemap.d.ts +5 -1
|
@@ -81,7 +81,6 @@ declare function useI18n(): {
|
|
|
81
81
|
dropdownViewer: string;
|
|
82
82
|
dropdownSaveGist: string;
|
|
83
83
|
dropdownDarkTheme: string;
|
|
84
|
-
dropdownInsightsToggle: string;
|
|
85
84
|
dropdownViewUnthrottledTrace: string;
|
|
86
85
|
runtimeSettingsDevice: string;
|
|
87
86
|
runtimeSettingsNetworkThrottling: string;
|
|
@@ -110,6 +109,9 @@ declare function useI18n(): {
|
|
|
110
109
|
firstPartyChipLabel: string;
|
|
111
110
|
openInANewTabTooltip: string;
|
|
112
111
|
unattributable: string;
|
|
112
|
+
insightsNotice: string;
|
|
113
|
+
tryInsights: string;
|
|
114
|
+
goBackToAudits: string;
|
|
113
115
|
};
|
|
114
116
|
};
|
|
115
117
|
declare function useLocalizedStrings(): {
|
|
@@ -186,7 +188,6 @@ declare function useLocalizedStrings(): {
|
|
|
186
188
|
dropdownViewer: string;
|
|
187
189
|
dropdownSaveGist: string;
|
|
188
190
|
dropdownDarkTheme: string;
|
|
189
|
-
dropdownInsightsToggle: string;
|
|
190
191
|
dropdownViewUnthrottledTrace: string;
|
|
191
192
|
runtimeSettingsDevice: string;
|
|
192
193
|
runtimeSettingsNetworkThrottling: string;
|
|
@@ -215,6 +216,9 @@ declare function useLocalizedStrings(): {
|
|
|
215
216
|
firstPartyChipLabel: string;
|
|
216
217
|
openInANewTabTooltip: string;
|
|
217
218
|
unattributable: string;
|
|
219
|
+
insightsNotice: string;
|
|
220
|
+
tryInsights: string;
|
|
221
|
+
goBackToAudits: string;
|
|
218
222
|
};
|
|
219
223
|
declare function useStringFormatter(): (str: string, values?: Record<string, string | number>) => string;
|
|
220
224
|
declare const I18nProvider: FunctionComponent;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lighthouse",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "12.
|
|
4
|
+
"version": "12.6.0-dev.20250428",
|
|
5
5
|
"description": "Automated auditing, performance metrics, and best practices for the web.",
|
|
6
6
|
"main": "./core/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -10,20 +10,21 @@
|
|
|
10
10
|
"smokehouse": "./cli/test/smokehouse/frontends/smokehouse-bin.js"
|
|
11
11
|
},
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": ">=18.
|
|
13
|
+
"node": ">=18.20"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"prepack": "yarn build-report --standalone --flow --esm && yarn build-types",
|
|
17
17
|
"postpack": "yarn clean-types",
|
|
18
18
|
"build-all": "npm-run-posix-or-windows build-all:task",
|
|
19
|
-
"build-all:task": "yarn build-report && yarn build-cdt-strings && yarn build-devtools && concurrently 'yarn build-extension' 'yarn build-lr' 'yarn build-viewer' 'yarn build-treemap' 'yarn build-smokehouse-bundle' && yarn build-pack",
|
|
20
|
-
"build-all:task:windows": "yarn build-report && yarn build-cdt-strings && yarn build-extension && yarn build-devtools && yarn build-lr && yarn build-viewer && yarn build-treemap && yarn build-smokehouse-bundle",
|
|
19
|
+
"build-all:task": "yarn build-report && yarn build-cdt-strings && yarn build-devtools && concurrently 'yarn build-extension' 'yarn build-lr' 'yarn build-viewer' 'yarn build-treemap' 'yarn build-smokehouse-bundle' 'yarn build-legacy-javascript' && yarn build-pack",
|
|
20
|
+
"build-all:task:windows": "yarn build-report && yarn build-cdt-strings && yarn build-extension && yarn build-devtools && yarn build-lr && yarn build-viewer && yarn build-treemap && yarn build-smokehouse-bundle && yarn build-legacy-javascript",
|
|
21
21
|
"build-cdt-lib": "node ./build/build-cdt-lib.js",
|
|
22
22
|
"build-cdt-strings": "node ./build/build-cdt-strings.js",
|
|
23
23
|
"build-extension": "yarn build-extension-chrome && yarn build-extension-firefox",
|
|
24
24
|
"build-extension-chrome": "node ./build/build-extension.js chrome",
|
|
25
25
|
"build-extension-firefox": "node ./build/build-extension.js firefox",
|
|
26
26
|
"build-devtools": "yarn reset-link && node ./build/build-bundle.js clients/devtools/devtools-entry.js dist/lighthouse-dt-bundle.js && node ./build/build-dt-report-resources.js",
|
|
27
|
+
"build-legacy-javascript": "node ./build/build-legacy-javascript.js",
|
|
27
28
|
"build-smokehouse-bundle": "node ./build/build-smokehouse-bundle.js",
|
|
28
29
|
"build-lr": "yarn reset-link && node --max-old-space-size=4096 ./build/build-lightrider-bundles.js",
|
|
29
30
|
"build-pack": "bash build/build-pack.sh",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"@types/eslint": "^8.2.1",
|
|
117
118
|
"@types/estree": "^0.0.50",
|
|
118
119
|
"@types/gh-pages": "^2.0.0",
|
|
120
|
+
"@types/gtag.js": "0.0.20",
|
|
119
121
|
"@types/google.analytics": "0.0.39",
|
|
120
122
|
"@types/jpeg-js": "^0.3.7",
|
|
121
123
|
"@types/jsdom": "^16.2.13",
|
|
@@ -126,7 +128,6 @@
|
|
|
126
128
|
"@types/resize-observer-browser": "^0.1.1",
|
|
127
129
|
"@types/resolve": "^1.20.2",
|
|
128
130
|
"@types/semver": "^5.5.0",
|
|
129
|
-
"@types/tabulator-tables": "^4.9.1",
|
|
130
131
|
"@types/ws": "^7.0.0",
|
|
131
132
|
"@types/yargs": "^17.0.8",
|
|
132
133
|
"@types/yargs-parser": "^20.2.1",
|
|
@@ -138,7 +139,7 @@
|
|
|
138
139
|
"builtin-modules": "^3.3.0",
|
|
139
140
|
"c8": "^7.11.3",
|
|
140
141
|
"chalk": "^2.4.1",
|
|
141
|
-
"chrome-devtools-frontend": "1.0.
|
|
142
|
+
"chrome-devtools-frontend": "1.0.1445635",
|
|
142
143
|
"colors": "^1.4.0",
|
|
143
144
|
"concurrently": "^6.4.0",
|
|
144
145
|
"conventional-changelog-cli": "^2.1.1",
|
|
@@ -171,27 +172,26 @@
|
|
|
171
172
|
"pako": "^2.0.3",
|
|
172
173
|
"preact": "^10.7.2",
|
|
173
174
|
"pretty-json-stringify": "^0.0.2",
|
|
174
|
-
"puppeteer": "^24.
|
|
175
|
+
"puppeteer": "^24.6.1",
|
|
175
176
|
"resolve": "^1.22.1",
|
|
176
177
|
"rollup": "^2.52.7",
|
|
177
178
|
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
178
179
|
"source-map-support": "^0.5.21",
|
|
179
|
-
"tabulator-tables": "^4.9.3",
|
|
180
180
|
"terser": "^5.18.2",
|
|
181
181
|
"testdouble": "^3.18.0",
|
|
182
182
|
"typed-query-selector": "^2.11.2",
|
|
183
|
-
"typescript": "5.
|
|
183
|
+
"typescript": "5.8.2",
|
|
184
184
|
"wait-for-expect": "^3.0.2",
|
|
185
185
|
"webtreemap-cdt": "^3.2.1"
|
|
186
186
|
},
|
|
187
187
|
"dependencies": {
|
|
188
|
-
"@paulirish/trace_engine": "0.0.
|
|
188
|
+
"@paulirish/trace_engine": "0.0.52",
|
|
189
189
|
"@sentry/node": "^7.0.0",
|
|
190
190
|
"axe-core": "^4.10.3",
|
|
191
191
|
"chrome-launcher": "^1.1.2",
|
|
192
192
|
"configstore": "^5.0.1",
|
|
193
193
|
"csp_evaluator": "1.1.5",
|
|
194
|
-
"devtools-protocol": "0.0.
|
|
194
|
+
"devtools-protocol": "0.0.1445099",
|
|
195
195
|
"enquirer": "^2.3.6",
|
|
196
196
|
"http-link-header": "^1.1.1",
|
|
197
197
|
"intl-messageformat": "^10.5.3",
|
|
@@ -204,19 +204,19 @@
|
|
|
204
204
|
"metaviewport-parser": "0.3.0",
|
|
205
205
|
"open": "^8.4.0",
|
|
206
206
|
"parse-cache-control": "1.0.1",
|
|
207
|
-
"puppeteer-core": "^24.
|
|
207
|
+
"puppeteer-core": "^24.6.1",
|
|
208
208
|
"robots-parser": "^3.0.1",
|
|
209
209
|
"semver": "^5.3.0",
|
|
210
210
|
"speedline-core": "^1.4.3",
|
|
211
|
-
"third-party-web": "^0.26.
|
|
211
|
+
"third-party-web": "^0.26.6",
|
|
212
212
|
"tldts-icann": "^6.1.16",
|
|
213
213
|
"ws": "^7.0.0",
|
|
214
214
|
"yargs": "^17.3.1",
|
|
215
215
|
"yargs-parser": "^21.0.0"
|
|
216
216
|
},
|
|
217
217
|
"resolutions": {
|
|
218
|
-
"puppeteer/**/devtools-protocol": "0.0.
|
|
219
|
-
"puppeteer-core/**/devtools-protocol": "0.0.
|
|
218
|
+
"puppeteer/**/devtools-protocol": "0.0.1445099",
|
|
219
|
+
"puppeteer-core/**/devtools-protocol": "0.0.1445099"
|
|
220
220
|
},
|
|
221
221
|
"repository": "GoogleChrome/lighthouse",
|
|
222
222
|
"keywords": [
|
|
@@ -229,5 +229,6 @@
|
|
|
229
229
|
"bugs": {
|
|
230
230
|
"url": "https://github.com/GoogleChrome/lighthouse/issues"
|
|
231
231
|
},
|
|
232
|
-
"homepage": "https://github.com/GoogleChrome/lighthouse#readme"
|
|
232
|
+
"homepage": "https://github.com/GoogleChrome/lighthouse#readme",
|
|
233
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
233
234
|
}
|
package/readme.md
CHANGED
|
@@ -53,7 +53,7 @@ The Chrome extension was available prior to Lighthouse being available in Chrome
|
|
|
53
53
|
The Node CLI provides the most flexibility in how Lighthouse runs can be configured and reported. Users who want more advanced usage, or want to run Lighthouse in an automated fashion should use the Node CLI.
|
|
54
54
|
|
|
55
55
|
> **Note**
|
|
56
|
-
> Lighthouse requires Node 18
|
|
56
|
+
> Lighthouse requires Node 18.20 or later.
|
|
57
57
|
|
|
58
58
|
**Installation**:
|
|
59
59
|
|
package/report/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Example standalone HTML report, delivered by the CLI: [`dbwtest-3.0.3.html`](htt
|
|
|
11
11
|
1. [`report/generator/report-generator.js`](https://github.com/GoogleChrome/lighthouse/blob/main/report/generator/report-generator.js) is the entry point for generating the HTML from Node. It compiles together the HTML string with everything required within it.
|
|
12
12
|
- It runs natively in Node.js but can run in the browser after a compile step is applied during our bundling pipeline. That compile step uses `inline-fs`, which takes any `fs.readFileSync()` calls and replaces them with the stringified file content.
|
|
13
13
|
1. [`report/renderer`](https://github.com/GoogleChrome/lighthouse/tree/main/report/renderer) are all client-side JS files. They transform an LHR object into a report DOM tree. They are all executed within the browser.
|
|
14
|
-
1. [`report/assets/standalone-template.html`](https://github.com/GoogleChrome/lighthouse/blob/main/
|
|
14
|
+
1. [`report/assets/standalone-template.html`](https://github.com/GoogleChrome/lighthouse/blob/main/report/assets/standalone-template.html) is where the client-side build of the DOM report is typically kicked off ([with these four lines](https://github.com/GoogleChrome/lighthouse/blob/eda3a3e2e271249f261655f9504fd542d6acf0f8/lighthouse-core/report/html/report-template.html#L29-L33)) However, see _Current Uses.._ below for more possibilities.
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
### Data Hydration
|
package/report/assets/styles.css
CHANGED
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
--plugin-icon-size: 65%;
|
|
106
106
|
--report-background-color: #fff;
|
|
107
107
|
--report-border-color-secondary: #ebebeb;
|
|
108
|
-
--report-font-family-monospace: 'Roboto Mono', 'Menlo', 'dejavu sans mono', 'Consolas', 'Lucida Console'
|
|
109
|
-
--report-font-family: Roboto, Helvetica, Arial, sans-serif;
|
|
108
|
+
--report-font-family-monospace: monospace, 'Roboto Mono', 'Menlo', 'dejavu sans mono', 'Consolas', 'Lucida Console';
|
|
109
|
+
--report-font-family: system-ui, Roboto, Helvetica, Arial, sans-serif;
|
|
110
110
|
--report-font-size: 14px;
|
|
111
111
|
--report-font-size-secondary: 12px;
|
|
112
112
|
--report-icon-size: var(--score-icon-background-size);
|
|
@@ -155,7 +155,10 @@
|
|
|
155
155
|
--fail-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><title>warn</title><path fill="%23C7221F" d="M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z"/></svg>');
|
|
156
156
|
--error-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 15"><title>error</title><path d="M0 15H 3V 12H 0V" fill="%23FF4E42"/><path d="M0 9H 3V 0H 0V" fill="%23FF4E42"/></svg>');
|
|
157
157
|
|
|
158
|
-
--swap-locale-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="
|
|
158
|
+
--swap-locale-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="%23000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"/></svg>');
|
|
159
|
+
|
|
160
|
+
--insights-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="%23000000"><path d="M18 13V11H22V13H18ZM19.2 20L16 17.6L17.2 16L20.4 18.4L19.2 20ZM17.2 8L16 6.4L19.2 4L20.4 5.6L17.2 8ZM5 19V15H4C3.45 15 2.975 14.8083 2.575 14.425C2.19167 14.025 2 13.55 2 13V11C2 10.45 2.19167 9.98333 2.575 9.6C2.975 9.2 3.45 9 4 9H8L13 6V18L8 15H7V19H5ZM11 14.45V9.55L8.55 11H4V13H8.55L11 14.45ZM14 15.35V8.65C14.45 9.05 14.8083 9.54167 15.075 10.125C15.3583 10.6917 15.5 11.3167 15.5 12C15.5 12.6833 15.3583 13.3167 15.075 13.9C14.8083 14.4667 14.45 14.95 14 15.35Z"/></svg>');
|
|
161
|
+
--insights-icon-url-dark: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="%239e9e9e"><path d="M18 13V11H22V13H18ZM19.2 20L16 17.6L17.2 16L20.4 18.4L19.2 20ZM17.2 8L16 6.4L19.2 4L20.4 5.6L17.2 8ZM5 19V15H4C3.45 15 2.975 14.8083 2.575 14.425C2.19167 14.025 2 13.55 2 13V11C2 10.45 2.19167 9.98333 2.575 9.6C2.975 9.2 3.45 9 4 9H8L13 6V18L8 15H7V19H5ZM11 14.45V9.55L8.55 11H4V13H8.55L11 14.45ZM14 15.35V8.65C14.45 9.05 14.8083 9.54167 15.075 10.125C15.3583 10.6917 15.5 11.3167 15.5 12C15.5 12.6833 15.3583 13.3167 15.075 13.9C14.8083 14.4667 14.45 14.95 14 15.35Z"/></svg>');
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
@media not print {
|
|
@@ -278,8 +281,6 @@
|
|
|
278
281
|
--header-padding: 16px 0 16px 0;
|
|
279
282
|
--screenshot-overlay-background: transparent;
|
|
280
283
|
--plugin-icon-size: 75%;
|
|
281
|
-
--report-font-family-monospace: 'Menlo', 'dejavu sans mono', 'Consolas', 'Lucida Console', monospace;
|
|
282
|
-
--report-font-family: '.SFNSDisplay-Regular', 'Helvetica Neue', 'Lucida Grande', sans-serif;
|
|
283
284
|
--report-font-size: 12px;
|
|
284
285
|
--report-line-height: 20px;
|
|
285
286
|
--score-icon-margin-left: 2px;
|
|
@@ -392,8 +393,8 @@
|
|
|
392
393
|
|
|
393
394
|
With that sorted, the next challenge is appropriate column sizing and text wrapping inside our
|
|
394
395
|
.lh-details tables. Even more fun.
|
|
395
|
-
* We don't want table headers ("
|
|
396
|
-
|
|
396
|
+
* We don't want table headers ("Est Savings (ms)") to wrap or their column values, but
|
|
397
|
+
we'd be happy for the URL column to wrap if the URLs are particularly long.
|
|
397
398
|
* We want the narrow columns to remain narrow, providing the most column width for URL
|
|
398
399
|
* We don't want the table to extend past 100% width.
|
|
399
400
|
* Long URLs in the URL column can wrap. Util.getURLDisplayName maxes them out at 64 characters,
|
|
@@ -426,8 +427,6 @@
|
|
|
426
427
|
margin-top: var(--default-padding);
|
|
427
428
|
margin-bottom: var(--default-padding);
|
|
428
429
|
margin-left: var(--audit-description-padding-left);
|
|
429
|
-
/* whatever the .lh-details side margins are */
|
|
430
|
-
width: 100%;
|
|
431
430
|
}
|
|
432
431
|
|
|
433
432
|
.lh-audit__stackpack {
|
|
@@ -487,6 +486,7 @@
|
|
|
487
486
|
.lh-report-icon--treemap::before {
|
|
488
487
|
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="black"><path d="M3 5v14h19V5H3zm2 2h15v4H5V7zm0 10v-4h4v4H5zm6 0v-4h9v4h-9z"/></svg>');
|
|
489
488
|
}
|
|
489
|
+
|
|
490
490
|
.lh-report-icon--date::before {
|
|
491
491
|
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 11h2v2H7v-2zm14-5v14a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h1V2h2v2h8V2h2v2h1a2 2 0 012 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"/></svg>');
|
|
492
492
|
}
|
|
@@ -563,6 +563,10 @@
|
|
|
563
563
|
}
|
|
564
564
|
|
|
565
565
|
/* Node */
|
|
566
|
+
.lh-node {
|
|
567
|
+
display: flow-root;
|
|
568
|
+
}
|
|
569
|
+
|
|
566
570
|
.lh-node__snippet {
|
|
567
571
|
font-family: var(--report-font-family-monospace);
|
|
568
572
|
color: var(--snippet-color);
|
|
@@ -988,6 +992,50 @@
|
|
|
988
992
|
max-width: 120px;
|
|
989
993
|
}
|
|
990
994
|
|
|
995
|
+
/* Toggle Insights banner */
|
|
996
|
+
.lh-perf-insights-toggle {
|
|
997
|
+
margin: calc(var(--default-padding) * 2) 0 var(--default-padding);
|
|
998
|
+
display: flex;
|
|
999
|
+
gap: var(--default-padding);
|
|
1000
|
+
align-items: center;
|
|
1001
|
+
background-color: rgba(30, 164, 70, 0.08);
|
|
1002
|
+
|
|
1003
|
+
padding: var(--toplevel-warning-padding);
|
|
1004
|
+
border-radius: 8px;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
.lh-perf-insights-toggle button {
|
|
1008
|
+
cursor: pointer;
|
|
1009
|
+
margin: 0;
|
|
1010
|
+
flex: 1;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.lh-perf-toggle-text {
|
|
1014
|
+
align-items: center;
|
|
1015
|
+
flex: 5;
|
|
1016
|
+
}
|
|
1017
|
+
.lh-dark .lh-perf-toggle-text {
|
|
1018
|
+
color: rgba(30, 164, 70, 1);
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.lh-perf-toggle-text a {
|
|
1022
|
+
color: var(--link-color);
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.lh-perf-insights-icon {
|
|
1026
|
+
margin: 4px;
|
|
1027
|
+
background-repeat: no-repeat;
|
|
1028
|
+
background-image: var(--insights-icon-url);
|
|
1029
|
+
width: var(--report-icon-size);
|
|
1030
|
+
height: var(--report-icon-size);
|
|
1031
|
+
display: inline-block;
|
|
1032
|
+
vertical-align: middle;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.lh-dark .lh-perf-insights-icon {
|
|
1036
|
+
background-image: var(--insights-icon-url-dark);
|
|
1037
|
+
}
|
|
1038
|
+
|
|
991
1039
|
/* Audit */
|
|
992
1040
|
|
|
993
1041
|
.lh-audit {
|
|
@@ -1077,8 +1125,12 @@
|
|
|
1077
1125
|
}
|
|
1078
1126
|
|
|
1079
1127
|
/* Report */
|
|
1128
|
+
.lh-list {
|
|
1129
|
+
margin-right: calc(var(--default-padding) * 2);
|
|
1130
|
+
}
|
|
1080
1131
|
.lh-list > :not(:last-child) {
|
|
1081
1132
|
margin-bottom: calc(var(--default-padding) * 2);
|
|
1133
|
+
border-bottom: 1px solid #A8C7FA;
|
|
1082
1134
|
}
|
|
1083
1135
|
|
|
1084
1136
|
.lh-header-container {
|
|
@@ -1611,7 +1663,10 @@
|
|
|
1611
1663
|
}
|
|
1612
1664
|
|
|
1613
1665
|
.lh-row--group ~ [data-entity]:not(.lh-row--group) ~ .lh-sub-item-row td:first-child {
|
|
1614
|
-
|
|
1666
|
+
margin-left: 20px;
|
|
1667
|
+
padding-left: 10px;
|
|
1668
|
+
border-left: 1px solid #A8C7FA;
|
|
1669
|
+
display: block;
|
|
1615
1670
|
}
|
|
1616
1671
|
|
|
1617
1672
|
.lh-row--even {
|
|
@@ -1681,6 +1736,26 @@
|
|
|
1681
1736
|
width: 12%;
|
|
1682
1737
|
}
|
|
1683
1738
|
|
|
1739
|
+
/** Tweak styling for tables in insight audits. */
|
|
1740
|
+
.lh-audit[id$="-insight"] .lh-table {
|
|
1741
|
+
border: none;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
.lh-audit[id$="-insight"] .lh-table thead th {
|
|
1745
|
+
font-weight: bold;
|
|
1746
|
+
color: unset;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.lh-audit[id$="-insight"] .lh-table th,
|
|
1750
|
+
.lh-audit[id$="-insight"] .lh-table td {
|
|
1751
|
+
padding: calc(var(--default-padding) / 2);
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
.lh-audit[id$="-insight"] .lh-table .lh-row--even,
|
|
1755
|
+
.lh-audit[id$="-insight"] .lh-table tr:not(.lh-row--group):hover {
|
|
1756
|
+
background-color: unset;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1684
1759
|
.lh-text__url-host {
|
|
1685
1760
|
display: inline;
|
|
1686
1761
|
}
|
|
@@ -367,7 +367,6 @@ SPDX-License-Identifier: Apache-2.0
|
|
|
367
367
|
<!-- Only enabled if Options.onViewTrace is set and we are on simulated throttling. -->
|
|
368
368
|
<a role="menuitem" tabindex="-1" href="#" class="lh-report-icon lh-report-icon--open lh-hidden" data-i18n="dropdownViewUnthrottledTrace" data-action="view-unthrottled-trace"></a>
|
|
369
369
|
<a role="menuitem" tabindex="-1" href="#" class="lh-report-icon lh-report-icon--dark" data-i18n="dropdownDarkTheme" data-action="toggle-dark"></a>
|
|
370
|
-
<a role="menuitem" tabindex="-1" href="#" class="lh-report-icon lh-report-icon--experiment" data-i18n="dropdownInsightsToggle" data-action="toggle-insights"></a>
|
|
371
370
|
</div>
|
|
372
371
|
</div>
|
|
373
372
|
</div>
|
|
@@ -564,6 +563,9 @@ SPDX-License-Identifier: Apache-2.0
|
|
|
564
563
|
line-height: 26px;
|
|
565
564
|
white-space: nowrap;
|
|
566
565
|
}
|
|
566
|
+
.lh-crc .lh-crc-node__longest {
|
|
567
|
+
color: var(--color-average-secondary);
|
|
568
|
+
}
|
|
567
569
|
.lh-crc .lh-crc-node__tree-value {
|
|
568
570
|
margin-left: 10px;
|
|
569
571
|
}
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
* The renderer code is bundled and injected into the report HTML along with the JSON report.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
/* global ga */
|
|
14
|
-
|
|
15
13
|
import {renderReport} from '../renderer/api.js';
|
|
16
14
|
import {Logger} from '../renderer/logger.js';
|
|
17
15
|
|
|
@@ -29,8 +27,12 @@ function __initLighthouseReport__() {
|
|
|
29
27
|
document.body.append(reportRootEl);
|
|
30
28
|
|
|
31
29
|
document.addEventListener('lh-analytics', /** @param {Event} e */ e => {
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const ce = /** @type {CustomEvent<{name: string, data?: {}}>} */(e);
|
|
31
|
+
|
|
32
|
+
if ('gtag' in window) {
|
|
33
|
+
// @ts-expect-error
|
|
34
|
+
window.gtag('event', ce.detail.name, ce.detail.data ?? {});
|
|
35
|
+
}
|
|
34
36
|
});
|
|
35
37
|
|
|
36
38
|
document.addEventListener('lh-log', /** @param {Event} e */ e => {
|
|
@@ -64,7 +64,7 @@ export class CategoryRenderer {
|
|
|
64
64
|
* @return {Array<Element>}
|
|
65
65
|
*/
|
|
66
66
|
_renderGroupedAudits(auditRefs: Array<LH.ReportResult.AuditRef>, groupDefinitions: {
|
|
67
|
-
[x: string]:
|
|
67
|
+
[x: string]: import("../../types/lhr/lhr.js").default.ReportGroup;
|
|
68
68
|
}): Array<Element>;
|
|
69
69
|
/**
|
|
70
70
|
* Take a set of audits, group them if they have groups, then render in a top-level
|
|
@@ -74,7 +74,7 @@ export class CategoryRenderer {
|
|
|
74
74
|
* @return {Element}
|
|
75
75
|
*/
|
|
76
76
|
renderUnexpandableClump(auditRefs: Array<LH.ReportResult.AuditRef>, groupDefinitions: {
|
|
77
|
-
[x: string]:
|
|
77
|
+
[x: string]: import("../../types/lhr/lhr.js").default.ReportGroup;
|
|
78
78
|
}): Element;
|
|
79
79
|
/**
|
|
80
80
|
* Take a set of audits and render in a top-level, expandable clump that starts
|