lighthouse 9.5.0-dev.20220712 → 9.5.0-dev.20220713
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/{esm-utils.mjs → esm-utils.js} +2 -2
- package/flow-report/tsconfig.json +1 -0
- package/lighthouse-cli/bin.js +5 -9
- package/lighthouse-cli/commands/list-audits.js +2 -2
- package/lighthouse-cli/commands/list-trace-categories.js +1 -2
- package/lighthouse-cli/run.js +2 -2
- package/lighthouse-cli/test/smokehouse/core-tests.js +3 -2
- package/lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js +4 -3
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js +8 -4
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/cli.js +1 -1
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/devtools.js +17 -68
- package/lighthouse-cli/test/smokehouse/smokehouse.js +10 -1
- package/lighthouse-core/audits/accessibility/accesskeys.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-allowed-attr.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-command-name.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-hidden-body.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-hidden-focus.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-input-field-name.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-meter-name.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-progressbar-name.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-required-attr.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-required-children.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-required-parent.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-roles.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-toggle-field-name.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-tooltip-name.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-treeitem-name.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-valid-attr-value.js +6 -5
- package/lighthouse-core/audits/accessibility/aria-valid-attr.js +6 -5
- package/lighthouse-core/audits/accessibility/axe-audit.js +6 -5
- package/lighthouse-core/audits/accessibility/button-name.js +6 -5
- package/lighthouse-core/audits/accessibility/bypass.js +6 -5
- package/lighthouse-core/audits/accessibility/color-contrast.js +6 -5
- package/lighthouse-core/audits/accessibility/definition-list.js +6 -5
- package/lighthouse-core/audits/accessibility/dlitem.js +6 -5
- package/lighthouse-core/audits/accessibility/document-title.js +6 -5
- package/lighthouse-core/audits/accessibility/duplicate-id-active.js +6 -5
- package/lighthouse-core/audits/accessibility/duplicate-id-aria.js +6 -5
- package/lighthouse-core/audits/accessibility/form-field-multiple-labels.js +6 -5
- package/lighthouse-core/audits/accessibility/frame-title.js +6 -5
- package/lighthouse-core/audits/accessibility/heading-order.js +6 -5
- package/lighthouse-core/audits/accessibility/html-has-lang.js +6 -5
- package/lighthouse-core/audits/accessibility/html-lang-valid.js +6 -5
- package/lighthouse-core/audits/accessibility/image-alt.js +6 -5
- package/lighthouse-core/audits/accessibility/input-image-alt.js +6 -5
- package/lighthouse-core/audits/accessibility/label.js +6 -5
- package/lighthouse-core/audits/accessibility/link-name.js +6 -5
- package/lighthouse-core/audits/accessibility/list.js +6 -5
- package/lighthouse-core/audits/accessibility/listitem.js +6 -5
- package/lighthouse-core/audits/accessibility/manual/custom-controls-labels.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/custom-controls-roles.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/focus-traps.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/focusable-controls.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/interactive-element-affordance.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/logical-tab-order.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/managed-focus.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/offscreen-content-hidden.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/use-landmarks.js +2 -2
- package/lighthouse-core/audits/accessibility/manual/visual-order-follows-dom.js +2 -2
- package/lighthouse-core/audits/accessibility/meta-refresh.js +6 -5
- package/lighthouse-core/audits/accessibility/meta-viewport.js +6 -5
- package/lighthouse-core/audits/accessibility/object-alt.js +6 -5
- package/lighthouse-core/audits/accessibility/tabindex.js +6 -5
- package/lighthouse-core/audits/accessibility/td-headers-attr.js +6 -5
- package/lighthouse-core/audits/accessibility/th-has-data-cells.js +6 -5
- package/lighthouse-core/audits/accessibility/valid-lang.js +6 -5
- package/lighthouse-core/audits/accessibility/video-caption.js +6 -5
- package/lighthouse-core/audits/apple-touch-icon.js +5 -5
- package/lighthouse-core/audits/audit.js +4 -4
- package/lighthouse-core/audits/autocomplete.js +6 -6
- package/lighthouse-core/audits/bootup-time.js +9 -9
- package/lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js +12 -12
- package/lighthouse-core/audits/byte-efficiency/duplicated-javascript.js +9 -8
- package/lighthouse-core/audits/byte-efficiency/efficient-animated-content.js +7 -7
- package/lighthouse-core/audits/byte-efficiency/legacy-javascript.js +18 -10
- package/lighthouse-core/audits/byte-efficiency/modern-image-formats.js +7 -7
- package/lighthouse-core/audits/byte-efficiency/offscreen-images.js +11 -11
- package/lighthouse-core/audits/byte-efficiency/render-blocking-resources.js +15 -15
- package/lighthouse-core/audits/byte-efficiency/total-byte-weight.js +7 -7
- package/lighthouse-core/audits/byte-efficiency/unminified-css.js +8 -8
- package/lighthouse-core/audits/byte-efficiency/unminified-javascript.js +8 -8
- package/lighthouse-core/audits/byte-efficiency/unused-css-rules.js +7 -7
- package/lighthouse-core/audits/byte-efficiency/unused-javascript.js +9 -9
- package/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js +10 -10
- package/lighthouse-core/audits/byte-efficiency/uses-optimized-images.js +7 -7
- package/lighthouse-core/audits/byte-efficiency/uses-responsive-images-snapshot.js +8 -8
- package/lighthouse-core/audits/byte-efficiency/uses-responsive-images.js +9 -10
- package/lighthouse-core/audits/byte-efficiency/uses-text-compression.js +7 -7
- package/lighthouse-core/audits/content-width.js +5 -5
- package/lighthouse-core/audits/critical-request-chains.js +6 -6
- package/lighthouse-core/audits/csp-xss.js +7 -10
- package/lighthouse-core/audits/deprecations.js +7 -6
- package/lighthouse-core/audits/diagnostics.js +6 -6
- package/lighthouse-core/audits/dobetterweb/charset.js +6 -9
- package/lighthouse-core/audits/dobetterweb/doctype.js +5 -5
- package/lighthouse-core/audits/dobetterweb/dom-size.js +5 -5
- package/lighthouse-core/audits/dobetterweb/geolocation-on-start.js +5 -5
- package/lighthouse-core/audits/dobetterweb/inspector-issues.js +6 -5
- package/lighthouse-core/audits/dobetterweb/js-libraries.js +5 -5
- package/lighthouse-core/audits/dobetterweb/no-document-write.js +5 -5
- package/lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js +12 -8
- package/lighthouse-core/audits/dobetterweb/notification-on-start.js +5 -5
- package/lighthouse-core/audits/dobetterweb/password-inputs-can-be-pasted-into.js +5 -5
- package/lighthouse-core/audits/dobetterweb/uses-http2.js +15 -14
- package/lighthouse-core/audits/dobetterweb/uses-passive-event-listeners.js +5 -5
- package/lighthouse-core/audits/errors-in-console.js +8 -7
- package/lighthouse-core/audits/final-screenshot.js +5 -5
- package/lighthouse-core/audits/font-display.js +8 -8
- package/lighthouse-core/audits/full-page-screenshot.js +2 -2
- package/lighthouse-core/audits/image-aspect-ratio.js +6 -6
- package/lighthouse-core/audits/image-size-responsive.js +6 -6
- package/lighthouse-core/audits/installable-manifest.js +6 -6
- package/lighthouse-core/audits/is-on-https.js +8 -8
- package/lighthouse-core/audits/largest-contentful-paint-element.js +5 -5
- package/lighthouse-core/audits/layout-shift-elements.js +5 -5
- package/lighthouse-core/audits/lcp-lazy-loaded.js +5 -5
- package/lighthouse-core/audits/long-tasks.js +10 -10
- package/lighthouse-core/audits/main-thread-tasks.js +3 -3
- package/lighthouse-core/audits/mainthread-work-breakdown.js +7 -7
- package/lighthouse-core/audits/manual/manual-audit.js +2 -2
- package/lighthouse-core/audits/manual/pwa-cross-browser.js +5 -5
- package/lighthouse-core/audits/manual/pwa-each-page-has-url.js +5 -5
- package/lighthouse-core/audits/manual/pwa-page-transitions.js +5 -5
- package/lighthouse-core/audits/maskable-icon.js +6 -6
- package/lighthouse-core/audits/metrics/cumulative-layout-shift.js +6 -6
- package/lighthouse-core/audits/metrics/experimental-interaction-to-next-paint.js +6 -6
- package/lighthouse-core/audits/metrics/first-contentful-paint-3g.js +6 -4
- package/lighthouse-core/audits/metrics/first-contentful-paint.js +6 -6
- package/lighthouse-core/audits/metrics/first-meaningful-paint.js +6 -6
- package/lighthouse-core/audits/metrics/interactive.js +6 -6
- package/lighthouse-core/audits/metrics/largest-contentful-paint.js +6 -6
- package/lighthouse-core/audits/metrics/max-potential-fid.js +6 -6
- package/lighthouse-core/audits/metrics/speed-index.js +6 -6
- package/lighthouse-core/audits/metrics/total-blocking-time.js +6 -6
- package/lighthouse-core/audits/metrics.js +3 -3
- package/lighthouse-core/audits/multi-check-audit.js +2 -2
- package/lighthouse-core/audits/network-requests.js +5 -5
- package/lighthouse-core/audits/network-rtt.js +7 -7
- package/lighthouse-core/audits/network-server-latency.js +7 -7
- package/lighthouse-core/audits/no-unload-listeners.js +6 -6
- package/lighthouse-core/audits/non-composited-animations.js +6 -5
- package/lighthouse-core/audits/oopif-iframe-test-audit.js +1 -1
- package/lighthouse-core/audits/performance-budget.js +8 -8
- package/lighthouse-core/audits/predictive-perf.js +9 -10
- package/lighthouse-core/audits/preload-fonts.js +8 -7
- package/lighthouse-core/audits/preload-lcp-image.js +11 -11
- package/lighthouse-core/audits/redirects.js +11 -11
- package/lighthouse-core/audits/resource-summary.js +6 -6
- package/lighthouse-core/audits/screenshot-thumbnails.js +5 -5
- package/lighthouse-core/audits/script-elements-test-audit.js +1 -1
- package/lighthouse-core/audits/script-treemap-data.js +7 -6
- package/lighthouse-core/audits/seo/canonical.js +7 -7
- package/lighthouse-core/audits/seo/crawlable-anchors.js +5 -5
- package/lighthouse-core/audits/seo/font-size.js +8 -6
- package/lighthouse-core/audits/seo/hreflang.js +7 -6
- package/lighthouse-core/audits/seo/http-status-code.js +7 -6
- package/lighthouse-core/audits/seo/is-crawlable.js +11 -9
- package/lighthouse-core/audits/seo/link-text.js +7 -6
- package/lighthouse-core/audits/seo/manual/structured-data.js +5 -5
- package/lighthouse-core/audits/seo/meta-description.js +5 -5
- package/lighthouse-core/audits/seo/plugins.js +6 -6
- package/lighthouse-core/audits/seo/robots-txt.js +7 -6
- package/lighthouse-core/audits/seo/tap-targets.js +12 -9
- package/lighthouse-core/audits/server-response-time.js +6 -6
- package/lighthouse-core/audits/service-worker.js +6 -6
- package/lighthouse-core/audits/splash-screen.js +6 -6
- package/lighthouse-core/audits/themed-omnibox.js +7 -7
- package/lighthouse-core/audits/third-party-facades.js +14 -13
- package/lighthouse-core/audits/third-party-summary.js +9 -9
- package/lighthouse-core/audits/timing-budget.js +8 -8
- package/lighthouse-core/audits/unsized-images.js +6 -6
- package/lighthouse-core/audits/user-timings.js +6 -6
- package/lighthouse-core/audits/uses-rel-preconnect.js +15 -15
- package/lighthouse-core/audits/uses-rel-preload.js +13 -13
- package/lighthouse-core/audits/valid-source-maps.js +6 -6
- package/lighthouse-core/audits/viewport.js +6 -6
- package/lighthouse-core/audits/violation-audit.js +3 -3
- package/lighthouse-core/audits/work-during-interaction.js +15 -15
- package/lighthouse-core/computed/computed-artifact.js +3 -3
- package/lighthouse-core/computed/critical-request-chains.js +5 -5
- package/lighthouse-core/computed/image-records.js +3 -3
- package/lighthouse-core/computed/js-bundles.js +4 -4
- package/lighthouse-core/computed/load-simulator.js +8 -5
- package/lighthouse-core/computed/main-resource.js +4 -4
- package/lighthouse-core/computed/main-thread-tasks.js +4 -4
- package/lighthouse-core/computed/manifest-values.js +3 -3
- package/lighthouse-core/computed/metrics/cumulative-layout-shift.js +4 -4
- package/lighthouse-core/computed/metrics/first-contentful-paint-all-frames.js +3 -3
- package/lighthouse-core/computed/metrics/first-contentful-paint.js +4 -4
- package/lighthouse-core/computed/metrics/first-meaningful-paint.js +5 -5
- package/lighthouse-core/computed/metrics/interactive.js +8 -9
- package/lighthouse-core/computed/metrics/lantern-first-contentful-paint.js +7 -7
- package/lighthouse-core/computed/metrics/lantern-first-meaningful-paint.js +5 -5
- package/lighthouse-core/computed/metrics/lantern-interactive.js +7 -7
- package/lighthouse-core/computed/metrics/lantern-largest-contentful-paint.js +5 -5
- package/lighthouse-core/computed/metrics/lantern-max-potential-fid.js +6 -6
- package/lighthouse-core/computed/metrics/lantern-metric.js +10 -10
- package/lighthouse-core/computed/metrics/lantern-speed-index.js +8 -8
- package/lighthouse-core/computed/metrics/lantern-total-blocking-time.js +8 -8
- package/lighthouse-core/computed/metrics/largest-contentful-paint-all-frames.js +5 -4
- package/lighthouse-core/computed/metrics/largest-contentful-paint.js +6 -5
- package/lighthouse-core/computed/metrics/max-potential-fid.js +6 -6
- package/lighthouse-core/computed/metrics/metric.js +6 -6
- package/lighthouse-core/computed/metrics/navigation-metric.js +2 -2
- package/lighthouse-core/computed/metrics/responsiveness.js +3 -3
- package/lighthouse-core/computed/metrics/speed-index.js +5 -5
- package/lighthouse-core/computed/metrics/tbt-utils.js +1 -1
- package/lighthouse-core/computed/metrics/timing-summary.js +15 -15
- package/lighthouse-core/computed/metrics/total-blocking-time.js +7 -7
- package/lighthouse-core/computed/module-duplication.js +3 -3
- package/lighthouse-core/computed/network-analysis.js +4 -4
- package/lighthouse-core/computed/network-records.js +3 -3
- package/lighthouse-core/computed/page-dependency-graph.js +11 -11
- package/lighthouse-core/computed/processed-navigation.js +3 -3
- package/lighthouse-core/computed/processed-trace.js +3 -3
- package/lighthouse-core/computed/resource-summary.js +7 -7
- package/lighthouse-core/computed/screenshots.js +2 -2
- package/lighthouse-core/computed/speedline.js +5 -5
- package/lighthouse-core/computed/trace-of-tab.js +6 -5
- package/lighthouse-core/computed/unused-css.js +4 -4
- package/lighthouse-core/computed/unused-javascript-summary.js +2 -2
- package/lighthouse-core/computed/user-timings.js +3 -3
- package/lighthouse-core/computed/viewport-meta.js +3 -4
- package/lighthouse-core/config/budget.js +1 -1
- package/lighthouse-core/config/config-helpers.js +47 -19
- package/lighthouse-core/config/config-plugin.js +2 -2
- package/lighthouse-core/config/config.js +16 -14
- package/lighthouse-core/config/constants.js +1 -1
- package/lighthouse-core/config/default-config.js +11 -10
- package/lighthouse-core/config/desktop-config.js +2 -2
- package/lighthouse-core/config/experimental-config.js +1 -1
- package/lighthouse-core/config/full-config.js +1 -1
- package/lighthouse-core/config/lr-desktop-config.js +2 -2
- package/lighthouse-core/config/lr-mobile-config.js +1 -1
- package/lighthouse-core/config/metrics-to-audits.js +1 -1
- package/lighthouse-core/config/perf-config.js +1 -1
- package/lighthouse-core/fraggle-rock/api.js +8 -8
- package/lighthouse-core/fraggle-rock/config/config.js +27 -17
- package/lighthouse-core/fraggle-rock/config/default-config.js +5 -5
- package/lighthouse-core/fraggle-rock/config/filters.js +3 -4
- package/lighthouse-core/fraggle-rock/config/validation.js +4 -4
- package/lighthouse-core/fraggle-rock/gather/base-artifacts.js +6 -8
- package/lighthouse-core/fraggle-rock/gather/base-gatherer.js +2 -1
- package/lighthouse-core/fraggle-rock/gather/driver.js +5 -5
- package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +23 -27
- package/lighthouse-core/fraggle-rock/gather/runner-helpers.js +3 -3
- package/lighthouse-core/fraggle-rock/gather/session.js +3 -3
- package/lighthouse-core/fraggle-rock/gather/snapshot-runner.js +7 -11
- package/lighthouse-core/fraggle-rock/gather/timespan-runner.js +8 -12
- package/lighthouse-core/fraggle-rock/user-flow.js +8 -8
- package/lighthouse-core/gather/connections/connection.js +4 -4
- package/lighthouse-core/gather/connections/cri.js +6 -6
- package/lighthouse-core/gather/connections/raw.js +2 -2
- package/lighthouse-core/gather/driver/dom.js +1 -1
- package/lighthouse-core/gather/driver/environment.js +6 -6
- package/lighthouse-core/gather/driver/execution-context.js +2 -2
- package/lighthouse-core/gather/driver/navigation.js +8 -8
- package/lighthouse-core/gather/driver/network-monitor.js +7 -6
- package/lighthouse-core/gather/driver/network.js +2 -2
- package/lighthouse-core/gather/driver/prepare.js +5 -5
- package/lighthouse-core/gather/driver/service-workers.js +1 -1
- package/lighthouse-core/gather/driver/storage.js +4 -4
- package/lighthouse-core/gather/driver/target-manager.js +9 -4
- package/lighthouse-core/gather/driver/wait-for-condition.js +6 -5
- package/lighthouse-core/gather/driver.js +11 -16
- package/lighthouse-core/gather/fetcher.js +1 -1
- package/lighthouse-core/gather/gather-runner.js +22 -22
- package/lighthouse-core/gather/gatherers/accessibility.js +6 -5
- package/lighthouse-core/gather/gatherers/anchor-elements.js +6 -5
- package/lighthouse-core/gather/gatherers/cache-contents.js +2 -2
- package/lighthouse-core/gather/gatherers/console-messages.js +2 -2
- package/lighthouse-core/gather/gatherers/css-usage.js +6 -5
- package/lighthouse-core/gather/gatherers/devtools-log-compat.js +4 -3
- package/lighthouse-core/gather/gatherers/devtools-log.js +3 -3
- package/lighthouse-core/gather/gatherers/dobetterweb/doctype.js +2 -2
- package/lighthouse-core/gather/gatherers/dobetterweb/domstats.js +3 -3
- package/lighthouse-core/gather/gatherers/dobetterweb/optimized-images.js +8 -8
- package/lighthouse-core/gather/gatherers/dobetterweb/password-inputs-with-prevented-paste.js +4 -3
- package/lighthouse-core/gather/gatherers/dobetterweb/response-compression.js +10 -10
- package/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +4 -4
- package/lighthouse-core/gather/gatherers/full-page-screenshot.js +7 -6
- package/lighthouse-core/gather/gatherers/gatherer.js +1 -1
- package/lighthouse-core/gather/gatherers/global-listeners.js +2 -2
- package/lighthouse-core/gather/gatherers/iframe-elements.js +4 -3
- package/lighthouse-core/gather/gatherers/image-elements.js +5 -5
- package/lighthouse-core/gather/gatherers/inputs.js +5 -4
- package/lighthouse-core/gather/gatherers/inspector-issues.js +4 -4
- package/lighthouse-core/gather/gatherers/installability-errors.js +3 -3
- package/lighthouse-core/gather/gatherers/js-usage.js +2 -2
- package/lighthouse-core/gather/gatherers/link-elements.js +7 -7
- package/lighthouse-core/gather/gatherers/main-document-content.js +5 -5
- package/lighthouse-core/gather/gatherers/meta-elements.js +3 -3
- package/lighthouse-core/gather/gatherers/network-user-agent.js +3 -3
- package/lighthouse-core/gather/gatherers/script-elements.js +6 -6
- package/lighthouse-core/gather/gatherers/scripts.js +2 -2
- package/lighthouse-core/gather/gatherers/seo/embedded-content.js +4 -3
- package/lighthouse-core/gather/gatherers/seo/font-size.js +8 -5
- package/lighthouse-core/gather/gatherers/seo/robots-txt.js +2 -2
- package/lighthouse-core/gather/gatherers/seo/tap-targets.js +5 -4
- package/lighthouse-core/gather/gatherers/service-worker.js +3 -3
- package/lighthouse-core/gather/gatherers/source-maps.js +3 -3
- package/lighthouse-core/gather/gatherers/stacks.js +12 -4
- package/lighthouse-core/gather/gatherers/trace-compat.js +4 -3
- package/lighthouse-core/gather/gatherers/trace-elements.js +13 -12
- package/lighthouse-core/gather/gatherers/trace.js +4 -3
- package/lighthouse-core/gather/gatherers/viewport-dimensions.js +2 -2
- package/lighthouse-core/gather/gatherers/web-app-manifest.js +5 -5
- package/lighthouse-core/index.cjs +21 -0
- package/lighthouse-core/index.js +25 -23
- package/lighthouse-core/lib/arbitrary-equality-map.js +2 -2
- package/lighthouse-core/lib/asset-saver.js +15 -12
- package/lighthouse-core/lib/axe.js +9 -4
- package/lighthouse-core/lib/cdt/package.json +4 -0
- package/lighthouse-core/lib/csp-evaluator.js +11 -13
- package/lighthouse-core/lib/dependency-graph/base-node.js +2 -2
- package/lighthouse-core/lib/dependency-graph/cpu-node.js +2 -2
- package/lighthouse-core/lib/dependency-graph/network-node.js +3 -3
- package/lighthouse-core/lib/dependency-graph/simulator/connection-pool.js +4 -4
- package/lighthouse-core/lib/dependency-graph/simulator/dns-cache.js +1 -1
- package/lighthouse-core/lib/dependency-graph/simulator/network-analyzer.js +11 -10
- package/lighthouse-core/lib/dependency-graph/simulator/simulator-timing-map.js +5 -5
- package/lighthouse-core/lib/dependency-graph/simulator/simulator.js +12 -10
- package/lighthouse-core/lib/dependency-graph/simulator/tcp-connection.js +1 -1
- package/lighthouse-core/lib/emulation.js +2 -2
- package/lighthouse-core/lib/i18n/README.md +1 -1
- package/lighthouse-core/lib/i18n/i18n.js +13 -13
- package/lighthouse-core/lib/icons.js +2 -2
- package/lighthouse-core/lib/lantern-trace-saver.js +1 -1
- package/lighthouse-core/lib/lh-env.js +7 -5
- package/lighthouse-core/lib/lh-error.js +4 -4
- package/lighthouse-core/lib/lh-trace-processor.js +3 -3
- package/lighthouse-core/lib/manifest-parser.js +4 -4
- package/lighthouse-core/lib/median-run.js +1 -1
- package/lighthouse-core/lib/minification-estimator.js +1 -1
- package/lighthouse-core/lib/minify-devtoolslog.js +1 -1
- package/lighthouse-core/lib/minify-trace.js +3 -3
- package/lighthouse-core/lib/navigation-error.js +6 -6
- package/lighthouse-core/lib/network-recorder.js +4 -4
- package/lighthouse-core/lib/network-request.js +2 -3
- package/lighthouse-core/lib/page-functions.js +2 -1
- package/lighthouse-core/lib/proto-preprocessor.js +7 -6
- package/lighthouse-core/lib/rect-helpers.js +1 -1
- package/lighthouse-core/lib/script-helpers.js +4 -1
- package/lighthouse-core/lib/sentry.js +4 -4
- package/lighthouse-core/lib/stack-packs.js +4 -4
- package/lighthouse-core/lib/statistics.js +1 -1
- package/lighthouse-core/lib/tappable-rects.js +2 -2
- package/lighthouse-core/lib/third-party-web.js +2 -2
- package/lighthouse-core/lib/timing-trace-saver.js +1 -1
- package/lighthouse-core/lib/tracehouse/cpu-profile-model.js +8 -8
- package/lighthouse-core/lib/tracehouse/main-thread-tasks.js +2 -2
- package/lighthouse-core/lib/tracehouse/task-groups.js +1 -1
- package/lighthouse-core/lib/tracehouse/task-summary.js +2 -2
- package/lighthouse-core/lib/tracehouse/trace-processor.js +2 -3
- package/lighthouse-core/lib/traces/pwmetrics-events.js +4 -3
- package/lighthouse-core/lib/url-shim.js +6 -4
- package/lighthouse-core/package.json +4 -0
- package/lighthouse-core/runner.js +40 -34
- package/lighthouse-core/scoring.js +2 -2
- package/lighthouse-core/{util-commonjs.js → util.cjs} +0 -0
- package/package.json +4 -2
- package/report/test/generator/report-generator-test.js +4 -3
- package/report/test/renderer/report-renderer-axe-test.js +2 -2
- package/root.js +10 -2
- package/shared/package.json +4 -0
- package/shared/test/localization/format-test.js +23 -13
- package/shared/test/localization/swap-locale-test.js +1 -0
- package/third-party/axe/valid-langs.js +1 -1
- package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +3 -3
- package/third-party/chromium-synchronization/installability-errors-test.js +3 -3
- package/third-party/download-content-shell/download-content-shell.js +6 -5
- package/third-party/download-content-shell/utils.js +8 -8
- package/tsconfig.json +3 -1
- package/types/artifacts.d.ts +9 -11
- package/types/audit.d.ts +2 -2
- package/types/config.d.ts +1 -1
- package/types/cssstyle/index.d.ts +1 -1
- package/types/gatherer.d.ts +7 -7
- package/types/global-lh.d.ts +2 -2
- package/types/smokehouse.d.ts +2 -0
|
@@ -20,13 +20,14 @@
|
|
|
20
20
|
|
|
21
21
|
/** @typedef {{product: ThirdPartyProduct, entity: ThirdPartyEntity}} FacadableProduct */
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
import {Audit} from './audit.js';
|
|
24
|
+
|
|
25
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
26
|
+
import thirdPartyWeb from '../lib/third-party-web.js';
|
|
27
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
28
|
+
import MainResource from '../computed/main-resource.js';
|
|
29
|
+
import MainThreadTasks from '../computed/main-thread-tasks.js';
|
|
30
|
+
import ThirdPartySummary from './third-party-summary.js';
|
|
30
31
|
|
|
31
32
|
const UIStrings = {
|
|
32
33
|
/** Title of a diagnostic audit that provides details about the third-party code on a web page that can be lazy loaded with a facade alternative. This descriptive title is shown to users when no resources have facade alternatives available. A facade is a lightweight component which looks like the desired resource. Lazy loading means resources are deferred until they are needed. Third-party code refers to resources that are not within the control of the site owner. */
|
|
@@ -65,7 +66,7 @@ const UIStrings = {
|
|
|
65
66
|
categorySocial: '{productName} (Social)',
|
|
66
67
|
};
|
|
67
68
|
|
|
68
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
69
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
69
70
|
|
|
70
71
|
/** @type {Record<string, string>} */
|
|
71
72
|
const CATEGORY_UI_MAP = {
|
|
@@ -93,7 +94,7 @@ class ThirdPartyFacades extends Audit {
|
|
|
93
94
|
/**
|
|
94
95
|
* Sort items by transfer size and combine small items into a single row.
|
|
95
96
|
* Items will be mutated in place to a maximum of 6 rows.
|
|
96
|
-
* @param {
|
|
97
|
+
* @param {import('./third-party-summary.js').URLSummary[]} items
|
|
97
98
|
*/
|
|
98
99
|
static condenseItems(items) {
|
|
99
100
|
items.sort((a, b) => b.transferSize - a.transferSize);
|
|
@@ -120,7 +121,7 @@ class ThirdPartyFacades extends Audit {
|
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
/**
|
|
123
|
-
* @param {Map<string,
|
|
124
|
+
* @param {Map<string, import('./third-party-summary.js').Summary>} byURL
|
|
124
125
|
* @param {ThirdPartyEntity | undefined} mainEntity
|
|
125
126
|
* @return {FacadableProduct[]}
|
|
126
127
|
*/
|
|
@@ -180,7 +181,7 @@ class ThirdPartyFacades extends Audit {
|
|
|
180
181
|
|
|
181
182
|
const items = Array.from(urls).map((url) => {
|
|
182
183
|
const urlStats = summaries.byURL.get(url);
|
|
183
|
-
return /** @type {
|
|
184
|
+
return /** @type {import('./third-party-summary.js').URLSummary} */ ({url, ...urlStats});
|
|
184
185
|
});
|
|
185
186
|
this.condenseItems(items);
|
|
186
187
|
results.push({
|
|
@@ -217,5 +218,5 @@ class ThirdPartyFacades extends Audit {
|
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
|
|
220
|
-
|
|
221
|
-
|
|
221
|
+
export default ThirdPartyFacades;
|
|
222
|
+
export {UIStrings};
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
10
|
+
import thirdPartyWeb from '../lib/third-party-web.js';
|
|
11
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
12
|
+
import MainThreadTasks from '../computed/main-thread-tasks.js';
|
|
13
|
+
import {getJavaScriptURLs, getAttributableURLForTask} from '../lib/tracehouse/task-summary.js';
|
|
14
14
|
|
|
15
15
|
const UIStrings = {
|
|
16
16
|
/** Title of a diagnostic audit that provides details about the code on a web page that the user doesn't control (referred to as "third-party code"). This descriptive title is shown to users when the amount is acceptable and no user action is required. */
|
|
@@ -28,7 +28,7 @@ const UIStrings = {
|
|
|
28
28
|
`{timeInMs, number, milliseconds}\xa0ms`,
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
31
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
32
32
|
|
|
33
33
|
// A page passes when all third-party code blocks for less than 250 ms.
|
|
34
34
|
const PASS_THRESHOLD_IN_MS = 250;
|
|
@@ -255,5 +255,5 @@ class ThirdPartySummary extends Audit {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
export default ThirdPartySummary;
|
|
259
|
+
export {UIStrings};
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import TimingSummary from '../computed/metrics/timing-summary.js';
|
|
10
|
+
import MainResource from '../computed/main-resource.js';
|
|
11
|
+
import {Budget} from '../config/budget.js';
|
|
12
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
13
13
|
|
|
14
14
|
const UIStrings = {
|
|
15
15
|
/** Title of a Lighthouse audit that compares how quickly the page loads against targets set by the user. Timing budgets are a type of performance budget. */
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
columnMeasurement: 'Measurement',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
25
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
26
26
|
|
|
27
27
|
/** @typedef {{metric: LH.Budget.TimingMetric, label: LH.IcuMessage, measurement?: LH.Audit.Details.NumericValue|number, overBudget?: LH.Audit.Details.NumericValue|number}} BudgetItem */
|
|
28
28
|
|
|
@@ -171,5 +171,5 @@ class TimingBudget extends Audit {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
export default TimingBudget;
|
|
175
|
+
export {UIStrings};
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import {Audit} from './audit.js';
|
|
14
|
+
import * as i18n from './../lib/i18n/i18n.js';
|
|
15
|
+
import URL from './../lib/url-shim.js';
|
|
16
16
|
|
|
17
17
|
const UIStrings = {
|
|
18
18
|
/** Title of a Lighthouse audit that provides detail on whether all images have explicit width and height. This descriptive title is shown to users when every image has explicit width and height */
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
description: 'Set an explicit width and height on image elements to reduce layout shifts and improve CLS. [Learn more](https://web.dev/optimize-cls/#images-without-dimensions)',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
26
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
27
27
|
|
|
28
28
|
class UnsizedImages extends Audit {
|
|
29
29
|
/**
|
|
@@ -159,5 +159,5 @@ class UnsizedImages extends Audit {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
export default UnsizedImages;
|
|
163
|
+
export {UIStrings};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
10
|
+
import ComputedUserTimings from '../computed/user-timings.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Descriptive title of a diagnostic audit that provides details on any timestamps generated by the page. User Timing refers to the 'User Timing API', which enables a website to record specific times as 'marks', or spans of time as 'measures'. */
|
|
@@ -25,7 +25,7 @@ const UIStrings = {
|
|
|
25
25
|
columnType: 'Type',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
28
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
29
29
|
|
|
30
30
|
/** @typedef {{name: string, isMark: true, args: LH.TraceEvent['args'], startTime: number}} MarkEvent */
|
|
31
31
|
/** @typedef {{name: string, isMark: false, args: LH.TraceEvent['args'], startTime: number, endTime: number, duration: number}} MeasureEvent */
|
|
@@ -116,5 +116,5 @@ class UserTimings extends Audit {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
export default UserTimings;
|
|
120
|
+
export {UIStrings};
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
import {Audit} from './audit.js';
|
|
10
|
+
import {ByteEfficiencyAudit} from './byte-efficiency/byte-efficiency-audit.js';
|
|
11
|
+
import URL from '../lib/url-shim.js';
|
|
12
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
13
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
14
|
+
import MainResource from '../computed/main-resource.js';
|
|
15
|
+
import LoadSimulator from '../computed/load-simulator.js';
|
|
16
|
+
import ProcessedTrace from '../computed/processed-trace.js';
|
|
17
|
+
import ProcessedNavigation from '../computed/processed-navigation.js';
|
|
18
|
+
import PageDependencyGraph from '../computed/page-dependency-graph.js';
|
|
19
|
+
import LanternLCP from '../computed/metrics/lantern-largest-contentful-paint.js';
|
|
20
20
|
|
|
21
21
|
// Preconnect establishes a "clean" socket. Chrome's socket manager will keep an unused socket
|
|
22
22
|
// around for 10s. Meaning, the time delta between processing preconnect a request should be <10s,
|
|
@@ -52,7 +52,7 @@ const UIStrings = {
|
|
|
52
52
|
'These should be used sparingly and only to the most important origins.',
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
55
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
56
56
|
|
|
57
57
|
class UsesRelPreconnectAudit extends Audit {
|
|
58
58
|
/**
|
|
@@ -238,7 +238,7 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
238
238
|
const details = Audit.makeOpportunityDetails(headings, results, maxWasted);
|
|
239
239
|
|
|
240
240
|
return {
|
|
241
|
-
score:
|
|
241
|
+
score: ByteEfficiencyAudit.scoreForWastedMs(maxWasted),
|
|
242
242
|
numericValue: maxWasted,
|
|
243
243
|
numericUnit: 'millisecond',
|
|
244
244
|
displayValue: maxWasted ?
|
|
@@ -250,5 +250,5 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
export default UsesRelPreconnectAudit;
|
|
254
|
+
export {UIStrings};
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
import URL from '../lib/url-shim.js';
|
|
9
|
+
import {NetworkRequest} from '../lib/network-request.js';
|
|
10
|
+
import {Audit} from './audit.js';
|
|
11
|
+
import {ByteEfficiencyAudit} from './byte-efficiency/byte-efficiency-audit.js';
|
|
12
|
+
import CriticalRequestChains from '../computed/critical-request-chains.js';
|
|
13
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
14
|
+
import MainResource from '../computed/main-resource.js';
|
|
15
|
+
import PageDependencyGraph from '../computed/page-dependency-graph.js';
|
|
16
|
+
import LoadSimulator from '../computed/load-simulator.js';
|
|
17
17
|
|
|
18
18
|
const UIStrings = {
|
|
19
19
|
/** Imperative title of a Lighthouse audit that tells the user to use <link rel=preload> to initiate important network requests earlier during page load. This is displayed in a list of audit titles that Lighthouse generates. */
|
|
@@ -29,7 +29,7 @@ const UIStrings = {
|
|
|
29
29
|
'by the browser. Check that you are using the `crossorigin` attribute properly.',
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
32
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
33
33
|
|
|
34
34
|
const THRESHOLD_IN_MS = 100;
|
|
35
35
|
|
|
@@ -242,7 +242,7 @@ class UsesRelPreloadAudit extends Audit {
|
|
|
242
242
|
const details = Audit.makeOpportunityDetails(headings, results, wastedMs);
|
|
243
243
|
|
|
244
244
|
return {
|
|
245
|
-
score:
|
|
245
|
+
score: ByteEfficiencyAudit.scoreForWastedMs(wastedMs),
|
|
246
246
|
numericValue: wastedMs,
|
|
247
247
|
numericUnit: 'millisecond',
|
|
248
248
|
displayValue: wastedMs ?
|
|
@@ -263,5 +263,5 @@ class UsesRelPreloadAudit extends Audit {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
export default UsesRelPreloadAudit;
|
|
267
|
+
export {UIStrings};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import thirdPartyWeb from '../lib/third-party-web.js';
|
|
9
|
+
import {Audit} from './audit.js';
|
|
10
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is redirected to HTTPS. */
|
|
@@ -30,7 +30,7 @@ const UIStrings = {
|
|
|
30
30
|
}`,
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
33
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
34
34
|
|
|
35
35
|
const LARGE_JS_BYTE_THRESHOLD = 500 * 1024;
|
|
36
36
|
|
|
@@ -151,5 +151,5 @@ class ValidSourceMaps extends Audit {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
export default ValidSourceMaps;
|
|
155
|
+
export {UIStrings};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import ComputedViewportMeta from '../computed/viewport-meta.js';
|
|
10
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Title of a Lighthouse audit that provides detail on the viewport meta tag in a web page's html. This descriptive title is shown to users when a viewport tag is set and configured. */
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
explanationNoTag: 'No `<meta name="viewport">` tag found',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
26
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
27
27
|
|
|
28
28
|
class Viewport extends Audit {
|
|
29
29
|
/**
|
|
@@ -61,5 +61,5 @@ class Viewport extends Audit {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
export default Viewport;
|
|
65
|
+
export {UIStrings};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import JsBundles from '../computed/js-bundles.js';
|
|
10
10
|
|
|
11
11
|
class ViolationAudit extends Audit {
|
|
12
12
|
/**
|
|
@@ -47,4 +47,4 @@ class ViolationAudit extends Audit {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
export default ViolationAudit;
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import ComputedResponsivenes from '../computed/metrics/responsiveness.js';
|
|
10
|
+
import ProcessedTrace from '../computed/processed-trace.js';
|
|
11
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
12
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
13
|
+
import {MainThreadTasks} from '../lib/tracehouse/main-thread-tasks.js';
|
|
14
|
+
import {taskGroups} from '../lib/tracehouse/task-groups.js';
|
|
15
|
+
import {TraceProcessor} from '../lib/tracehouse/trace-processor.js';
|
|
16
|
+
import {getExecutionTimingsByURL} from '../lib/tracehouse/task-summary.js';
|
|
17
|
+
import ExperimentalInteractionToNextPaint from './metrics/experimental-interaction-to-next-paint.js';
|
|
18
|
+
import {LighthouseError} from '../lib/lh-error.js';
|
|
19
19
|
|
|
20
20
|
/** @typedef {import('../computed/metrics/responsiveness.js').EventTimingEvent} EventTimingEvent */
|
|
21
21
|
/** @typedef {import('../lib/tracehouse/main-thread-tasks.js').TaskNode} TaskNode */
|
|
@@ -44,7 +44,7 @@ const UIStrings = {
|
|
|
44
44
|
eventTarget: 'Event target',
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
47
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* @fileoverview This metric gives a high-percentile measure of responsiveness to input.
|
|
@@ -266,7 +266,7 @@ class WorkDuringInteraction extends Audit {
|
|
|
266
266
|
const duration = interactionEvent.args.data.duration;
|
|
267
267
|
const displayValue = str_(UIStrings.displayValue, {timeInMs: duration, interactionType});
|
|
268
268
|
return {
|
|
269
|
-
score: duration <
|
|
269
|
+
score: duration < ExperimentalInteractionToNextPaint.defaultOptions.p10 ? 1 : 0,
|
|
270
270
|
displayValue,
|
|
271
271
|
details: {
|
|
272
272
|
type: 'list',
|
|
@@ -276,5 +276,5 @@ class WorkDuringInteraction extends Audit {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
export default WorkDuringInteraction;
|
|
280
|
+
export {UIStrings};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import {ArbitraryEqualityMap} from '../lib/arbitrary-equality-map.js';
|
|
9
|
+
import log from 'lighthouse-logger';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Decorate computableArtifact with a caching `request()` method which will
|
|
@@ -59,4 +59,4 @@ function makeComputedArtifact(computableArtifact, keys) {
|
|
|
59
59
|
return Object.assign(computableArtifact, {request});
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
export {makeComputedArtifact};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import {makeComputedArtifact} from './computed-artifact.js';
|
|
9
|
+
import {NetworkRequest} from '../lib/network-request.js';
|
|
10
|
+
import MainResource from './main-resource.js';
|
|
11
|
+
import PageDependencyGraph from './page-dependency-graph.js';
|
|
12
12
|
|
|
13
13
|
class CriticalRequestChains {
|
|
14
14
|
/**
|
|
@@ -139,4 +139,4 @@ class CriticalRequestChains {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
export default makeComputedArtifact(CriticalRequestChains, ['URL', 'devtoolsLog', 'trace']);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import URL from '../lib/url-shim.js';
|
|
9
|
+
import {makeComputedArtifact} from './computed-artifact.js';
|
|
10
10
|
|
|
11
11
|
class ImageRecords {
|
|
12
12
|
/**
|
|
@@ -59,5 +59,5 @@ class ImageRecords {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
export default makeComputedArtifact(ImageRecords, ['ImageElements', 'networkRecords']);
|
|
63
63
|
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import log from 'lighthouse-logger';
|
|
9
|
+
import {makeComputedArtifact} from './computed-artifact.js';
|
|
10
|
+
import SDK from '../lib/cdt/SDK.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Calculate the number of bytes contributed by each source file
|
|
@@ -116,4 +116,4 @@ class JSBundles {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
export default makeComputedArtifact(JSBundles, ['Scripts', 'SourceMaps']);
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import {makeComputedArtifact} from './computed-artifact.js';
|
|
9
|
+
import * as constants from '../config/constants.js';
|
|
10
|
+
import {Simulator} from '../lib/dependency-graph/simulator/simulator.js';
|
|
11
|
+
import NetworkAnalysis from './network-analysis.js';
|
|
12
12
|
|
|
13
13
|
class LoadSimulator {
|
|
14
14
|
/**
|
|
@@ -89,4 +89,7 @@ class LoadSimulator {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
// TODO(esmodules): For all computed artifacts:
|
|
93
|
+
// const LoadSimulatorComputed = makeComputedArtifact(LoadSimulator, ['devtoolsLog', 'settings']);
|
|
94
|
+
// export {LoadSimulator as LoadSimulatorComputed};
|
|
95
|
+
export default makeComputedArtifact(LoadSimulator, ['devtoolsLog', 'settings']);
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {makeComputedArtifact} from './computed-artifact.js';
|
|
9
|
+
import {NetworkAnalyzer} from '../lib/dependency-graph/simulator/network-analyzer.js';
|
|
10
|
+
import NetworkRecords from './network-records.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @fileoverview This artifact identifies the main resource on the page. Current solution assumes
|
|
@@ -32,4 +32,4 @@ class MainResource {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
export default makeComputedArtifact(MainResource, ['URL', 'devtoolsLog']);
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {makeComputedArtifact} from './computed-artifact.js';
|
|
9
|
+
import {MainThreadTasks as MainThreadTasks_} from '../lib/tracehouse/main-thread-tasks.js';
|
|
10
|
+
import ProcessedTrace from './processed-trace.js';
|
|
11
11
|
|
|
12
12
|
class MainThreadTasks {
|
|
13
13
|
/**
|
|
@@ -21,4 +21,4 @@ class MainThreadTasks {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
export default makeComputedArtifact(MainThreadTasks, null);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import {makeComputedArtifact} from './computed-artifact.js';
|
|
9
|
+
import * as icons from '../lib/icons.js';
|
|
10
10
|
|
|
11
11
|
const PWA_DISPLAY_VALUES = ['minimal-ui', 'fullscreen', 'standalone'];
|
|
12
12
|
|
|
@@ -132,4 +132,4 @@ class ManifestValues {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
export default makeComputedArtifact(ManifestValues, ['InstallabilityErrors', 'WebAppManifest']);
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
9
|
+
import ProcessedTrace from '../processed-trace.js';
|
|
10
|
+
import {LighthouseError} from '../../lib/lh-error.js';
|
|
11
11
|
|
|
12
12
|
/** @typedef {{ts: number, isMainFrame: boolean, weightedScore: number}} LayoutShiftEvent */
|
|
13
13
|
|
|
@@ -126,4 +126,4 @@ class CumulativeLayoutShift {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
export default makeComputedArtifact(CumulativeLayoutShift, null);
|