lighthouse 9.5.0-dev.20220711 → 9.5.0-dev.20220714
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
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {Audit} from '../audit.js';
|
|
9
|
+
import ComputedFcp from '../../computed/metrics/first-contentful-paint.js';
|
|
10
|
+
import * as constants from '../../config/constants.js';
|
|
11
|
+
|
|
12
|
+
const regular3G = constants.throttling.mobileRegular3G;
|
|
11
13
|
|
|
12
14
|
class FirstContentfulPaint3G extends Audit {
|
|
13
15
|
/**
|
|
@@ -64,4 +66,4 @@ class FirstContentfulPaint3G extends Audit {
|
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
export default FirstContentfulPaint3G;
|
|
@@ -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 ComputedFcp from '../../computed/metrics/first-contentful-paint.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Description of the First Contentful Paint (FCP) metric, which marks the time at which the first text or image is painted by the browser. This is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
`painted. [Learn more](https://web.dev/first-contentful-paint/).`,
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
18
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
19
19
|
|
|
20
20
|
class FirstContentfulPaint extends Audit {
|
|
21
21
|
/**
|
|
@@ -82,5 +82,5 @@ class FirstContentfulPaint extends Audit {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
export default FirstContentfulPaint;
|
|
86
|
+
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 ComputedFmp from '../../computed/metrics/first-meaningful-paint.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Description of the First Meaningful Paint (FMP) metric, which marks the time at which a majority of the content has been painted by the browser. This is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
'visible. [Learn more](https://web.dev/first-meaningful-paint/).',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
18
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
19
19
|
|
|
20
20
|
class FirstMeaningfulPaint extends Audit {
|
|
21
21
|
/**
|
|
@@ -86,5 +86,5 @@ class FirstMeaningfulPaint extends Audit {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
export default FirstMeaningfulPaint;
|
|
90
|
+
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 Interactive from '../../computed/metrics/interactive.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Description of the Time to Interactive (TTI) metric, which evaluates when a page has completed its primary network activity and main thread work. This is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
'interactive. [Learn more](https://web.dev/interactive/).',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
18
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @fileoverview This audit identifies the time the page is "consistently interactive".
|
|
@@ -90,5 +90,5 @@ class InteractiveMetric extends Audit {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
export default InteractiveMetric;
|
|
94
|
+
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 ComputedLcp from '../../computed/metrics/largest-contentful-paint.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Description of the Largest Contentful Paint (LCP) metric, which marks the time at which the largest text or image is painted by the browser. This is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
`painted. [Learn more](https://web.dev/lighthouse-largest-contentful-paint/)`,
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
18
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
19
19
|
|
|
20
20
|
class LargestContentfulPaint extends Audit {
|
|
21
21
|
/**
|
|
@@ -91,5 +91,5 @@ class LargestContentfulPaint extends Audit {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
export default LargestContentfulPaint;
|
|
95
|
+
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 ComputedFid from '../../computed/metrics/max-potential-fid.js';
|
|
10
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Description of the Maximum Potential First Input Delay metric that marks the maximum estimated time between the page receiving input (a user clicking, tapping, or typing) and the page responding. This description is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
'duration of the longest task. [Learn more](https://web.dev/lighthouse-max-potential-fid/).',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
18
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @fileoverview This metric is the duration of the longest task after FCP. It is meant to capture
|
|
@@ -73,5 +73,5 @@ class MaxPotentialFID extends Audit {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
export default MaxPotentialFID;
|
|
77
|
+
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 ComputedSi from '../../computed/metrics/speed-index.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Description of the Speed Index metric, which summarizes how quickly the page looked visually complete. This is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
'[Learn more](https://web.dev/speed-index/).',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
18
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
19
19
|
|
|
20
20
|
class SpeedIndex extends Audit {
|
|
21
21
|
/**
|
|
@@ -85,5 +85,5 @@ class SpeedIndex extends Audit {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
export default SpeedIndex;
|
|
89
|
+
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 ComputedTBT from '../../computed/metrics/total-blocking-time.js';
|
|
10
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Description of the Total Blocking Time (TBT) metric, which calculates the total duration of blocking time for a web page. Blocking times are time periods when the page would be blocked (prevented) from responding to user input (clicks, taps, and keypresses will feel slow to respond). This is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits.*/
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
'when task length exceeded 50ms, expressed in milliseconds. [Learn more](https://web.dev/lighthouse-total-blocking-time/).',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
18
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
19
19
|
|
|
20
20
|
class TotalBlockingTime extends Audit {
|
|
21
21
|
/**
|
|
@@ -114,5 +114,5 @@ class TotalBlockingTime extends Audit {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
export default TotalBlockingTime;
|
|
118
|
+
export {UIStrings};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import ComputedTimingSummary from '../computed/metrics/timing-summary.js';
|
|
10
10
|
|
|
11
11
|
/** @type {Set<keyof LH.Artifacts.TimingSummary>} */
|
|
12
12
|
const DECIMAL_METRIC_KEYS = new Set([
|
|
@@ -71,4 +71,4 @@ class Metrics extends Audit {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
export default Metrics;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @fileoverview Base class for boolean audits that can have multiple reasons for failure
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
import {Audit} from './audit.js';
|
|
13
13
|
|
|
14
14
|
class MultiCheckAudit extends Audit {
|
|
15
15
|
/**
|
|
@@ -80,4 +80,4 @@ class MultiCheckAudit extends Audit {
|
|
|
80
80
|
/* eslint-enable no-unused-vars */
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
export default MultiCheckAudit;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import URL from '../lib/url-shim.js';
|
|
10
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
11
|
+
import MainResource from '../computed/main-resource.js';
|
|
12
12
|
|
|
13
13
|
class NetworkRequests extends Audit {
|
|
14
14
|
/**
|
|
@@ -117,4 +117,4 @@ class NetworkRequests extends Audit {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
export default NetworkRequests;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
10
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
11
|
+
import NetworkAnalysisComputed from '../computed/network-analysis.js';
|
|
12
12
|
|
|
13
13
|
const UIStrings = {
|
|
14
14
|
/** Descriptive title of a Lighthouse audit that tells the user the round trip times to each origin the page connected to. This is displayed in a list of audit titles that Lighthouse generates. */
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
'improve performance. [Learn more](https://hpbn.co/primer-on-latency-and-bandwidth/).',
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
22
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
23
23
|
|
|
24
24
|
class NetworkRTT extends Audit {
|
|
25
25
|
/**
|
|
@@ -86,5 +86,5 @@ class NetworkRTT extends Audit {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
export default NetworkRTT;
|
|
90
|
+
export {UIStrings};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
10
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
11
|
+
import NetworkAnalysisComputed from '../computed/network-analysis.js';
|
|
12
12
|
|
|
13
13
|
const UIStrings = {
|
|
14
14
|
/** Descriptive title of a Lighthouse audit that tells the user the server latencies observed from each origin the page connected to. This is displayed in a list of audit titles that Lighthouse generates. */
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
'or has poor backend performance. [Learn more](https://hpbn.co/primer-on-web-performance/#analyzing-the-resource-waterfall).',
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
22
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
23
23
|
|
|
24
24
|
class NetworkServerLatency extends Audit {
|
|
25
25
|
/**
|
|
@@ -85,5 +85,5 @@ class NetworkServerLatency extends Audit {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
export default NetworkServerLatency;
|
|
89
|
+
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 JsBundles from '../computed/js-bundles.js';
|
|
10
|
+
import * as i18n from './../lib/i18n/i18n.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Descriptive title of a Lighthouse audit that checks if a web page has 'unload' event listeners and finds none. */
|
|
@@ -18,7 +18,7 @@ const UIStrings = {
|
|
|
18
18
|
description: 'The `unload` event does not fire reliably and listening for it can prevent browser optimizations like the Back-Forward Cache. Use `pagehide` or `visibilitychange` events instead. [Learn more](https://web.dev/bfcache/#never-use-the-unload-event)',
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
21
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
22
22
|
|
|
23
23
|
class NoUnloadListeners extends Audit {
|
|
24
24
|
/**
|
|
@@ -83,5 +83,5 @@ class NoUnloadListeners extends Audit {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
export default NoUnloadListeners;
|
|
87
|
+
export {UIStrings};
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* https://docs.google.com/document/d/1XKcJP2CKmNKfOcDsVvliAQ-e1H9C1nf2H-pzTdyafAA/edit?usp=sharing
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
import {Audit} from './audit.js';
|
|
15
|
+
|
|
16
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
16
17
|
|
|
17
18
|
const UIStrings = {
|
|
18
19
|
/** Title of a diagnostic LH audit that provides details on animations that are not composited. */
|
|
@@ -45,7 +46,7 @@ const UIStrings = {
|
|
|
45
46
|
unsupportedTimingParameters: 'Effect has unsupported timing parameters',
|
|
46
47
|
};
|
|
47
48
|
|
|
48
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
49
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* Each failure reason is represented by a bit flag. The bit shift operator '<<' is used to define which bit corresponds to each failure reason.
|
|
@@ -202,5 +203,5 @@ class NonCompositedAnimations extends Audit {
|
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
205
|
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
export default NonCompositedAnimations;
|
|
207
|
+
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 ResourceSummary from '../computed/resource-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 the size and quantity of page resources against targets set by the user. These targets are thought of as "performance budgets" because these metrics impact page performance (i.e. how quickly a page loads). */
|
|
@@ -24,7 +24,7 @@ const UIStrings = {
|
|
|
24
24
|
}`,
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
27
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
28
28
|
|
|
29
29
|
/** @typedef {import('../computed/resource-summary.js').ResourceEntry} ResourceEntry */
|
|
30
30
|
/** @typedef {{resourceType: LH.Budget.ResourceType, label: LH.IcuMessage, requestCount: number, transferSize: number, sizeOverBudget: number | undefined, countOverBudget: LH.IcuMessage | undefined}} BudgetItem */
|
|
@@ -150,5 +150,5 @@ class ResourceBudget extends Audit {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
export default ResourceBudget;
|
|
154
|
+
export {UIStrings};
|
|
@@ -5,21 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const LanternLcp = require('../computed/metrics/lantern-largest-contentful-paint.js');
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
10
|
+
import LanternFcp from '../computed/metrics/lantern-first-contentful-paint.js';
|
|
11
|
+
import LanternFmp from '../computed/metrics/lantern-first-meaningful-paint.js';
|
|
12
|
+
import LanternInteractive from '../computed/metrics/lantern-interactive.js';
|
|
13
|
+
import LanternSpeedIndex from '../computed/metrics/lantern-speed-index.js';
|
|
14
|
+
import LanternLcp from '../computed/metrics/lantern-largest-contentful-paint.js';
|
|
16
15
|
|
|
17
16
|
// Parameters (in ms) for log-normal CDF scoring. To see the curve:
|
|
18
17
|
// https://www.desmos.com/calculator/bksgkihhj8
|
|
19
18
|
const SCORING_P10 = 3651;
|
|
20
19
|
const SCORING_MEDIAN = 10000;
|
|
21
20
|
|
|
22
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
21
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, {});
|
|
23
22
|
|
|
24
23
|
class PredictivePerf extends Audit {
|
|
25
24
|
/**
|
|
@@ -99,4 +98,4 @@ class PredictivePerf extends Audit {
|
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
export default PredictivePerf;
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
* Audit that checks whether fonts that use `font-display: optional` were preloaded.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import {Audit} from './audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from './../lib/i18n/i18n.js';
|
|
16
|
+
import FontDisplay from './../audits/font-display.js';
|
|
16
17
|
const PASSING_FONT_DISPLAY_REGEX = /^(optional)$/;
|
|
17
|
-
|
|
18
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
18
19
|
|
|
19
20
|
const UIStrings = {
|
|
20
21
|
/** Title of a Lighthouse audit that provides detail on whether fonts that used `font-display: optional` were preloaded. This descriptive title is shown to users when all fonts that used `font-display: optional` were preloaded. */
|
|
@@ -25,7 +26,7 @@ const UIStrings = {
|
|
|
25
26
|
description: 'Preload `optional` fonts so first-time visitors may use them. [Learn more](https://web.dev/preload-optional-fonts/)',
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
29
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
29
30
|
|
|
30
31
|
class PreloadFontsAudit extends Audit {
|
|
31
32
|
/**
|
|
@@ -103,5 +104,5 @@ class PreloadFontsAudit extends Audit {
|
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
export default PreloadFontsAudit;
|
|
108
|
+
export {UIStrings};
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
10
|
+
import {NetworkRequest} from '../lib/network-request.js';
|
|
11
|
+
import MainResource from '../computed/main-resource.js';
|
|
12
|
+
import LanternLCP from '../computed/metrics/lantern-largest-contentful-paint.js';
|
|
13
|
+
import LoadSimulator from '../computed/load-simulator.js';
|
|
14
|
+
import {ByteEfficiencyAudit} from './byte-efficiency/byte-efficiency-audit.js';
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
17
17
|
/** Title of a lighthouse audit that tells a user to preload an image in order to improve their LCP time. */
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
'image in order to improve LCP. [Learn more](https://web.dev/optimize-lcp/#preload-important-resources).',
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
24
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* @typedef {Array<{url: string, initiatorType: string}>} InitiatorPath
|
|
@@ -255,7 +255,7 @@ class PreloadLCPImageAudit extends Audit {
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
return {
|
|
258
|
-
score:
|
|
258
|
+
score: ByteEfficiencyAudit.scoreForWastedMs(wastedMs),
|
|
259
259
|
numericValue: wastedMs,
|
|
260
260
|
numericUnit: 'millisecond',
|
|
261
261
|
displayValue: wastedMs ? str_(i18n.UIStrings.displayValueMsSavings, {wastedMs}) : '',
|
|
@@ -264,5 +264,5 @@ class PreloadLCPImageAudit extends Audit {
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
export default PreloadLCPImageAudit;
|
|
268
|
+
export {UIStrings};
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import {ByteEfficiencyAudit} from './byte-efficiency/byte-efficiency-audit.js';
|
|
10
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
11
|
+
import ProcessedTrace from '../computed/processed-trace.js';
|
|
12
|
+
import NetworkRecords from '../computed/network-records.js';
|
|
13
|
+
import MainResource from '../computed/main-resource.js';
|
|
14
|
+
import LanternInteractive from '../computed/metrics/lantern-interactive.js';
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
17
17
|
/** Imperative title of a Lighthouse audit that tells the user to eliminate the redirects taken through multiple URLs to load the page. This is shown in a list of audits that Lighthouse generates. */
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
description: 'Redirects introduce additional delays before the page can be loaded. [Learn more](https://web.dev/redirects/).',
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
23
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
24
24
|
|
|
25
25
|
class Redirects extends Audit {
|
|
26
26
|
/**
|
|
@@ -148,7 +148,7 @@ class Redirects extends Audit {
|
|
|
148
148
|
// We award a passing grade if you only have 1 redirect
|
|
149
149
|
// TODO(phulce): reconsider if cases like the example in https://github.com/GoogleChrome/lighthouse/issues/8984
|
|
150
150
|
// should fail this audit.
|
|
151
|
-
score: documentRequests.length <= 2 ? 1 :
|
|
151
|
+
score: documentRequests.length <= 2 ? 1 : ByteEfficiencyAudit.scoreForWastedMs(totalWastedMs),
|
|
152
152
|
numericValue: totalWastedMs,
|
|
153
153
|
numericUnit: 'millisecond',
|
|
154
154
|
displayValue: totalWastedMs ?
|
|
@@ -159,5 +159,5 @@ class Redirects extends Audit {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
export default Redirects;
|
|
163
|
+
export {UIStrings};
|