lighthouse 9.5.0-dev.20220710 → 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
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {Audit} from './audit.js';
|
|
9
|
+
import ComputedResourceSummary from '../computed/resource-summary.js';
|
|
10
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Imperative title of a Lighthouse audit that tells the user to minimize the size and quantity of resources used to load the page. */
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
`other {# requests • {byteCount, number, bytes} KiB}}`,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
24
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
25
25
|
|
|
26
26
|
class ResourceSummary extends Audit {
|
|
27
27
|
/**
|
|
@@ -100,5 +100,5 @@ class ResourceSummary extends Audit {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
export default ResourceSummary;
|
|
104
|
+
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 {LighthouseError} from '../lib/lh-error.js';
|
|
10
|
+
import jpeg from 'jpeg-js';
|
|
11
|
+
import Speedline from '../computed/speedline.js';
|
|
12
12
|
|
|
13
13
|
const NUMBER_OF_THUMBNAILS = 10;
|
|
14
14
|
const THUMBNAIL_WIDTH = 120;
|
|
@@ -160,4 +160,4 @@ class ScreenshotThumbnails extends Audit {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
export default ScreenshotThumbnails;
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
* @typedef {Omit<LH.Treemap.Node, 'name'|'children'>} SourceData
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
import {Audit} from './audit.js';
|
|
19
|
+
|
|
20
|
+
import JsBundles from '../computed/js-bundles.js';
|
|
21
|
+
import UnusedJavaScriptSummary from '../computed/unused-javascript-summary.js';
|
|
22
|
+
import ModuleDuplication from '../computed/module-duplication.js';
|
|
23
|
+
import {isInline} from '../lib/script-helpers.js';
|
|
23
24
|
|
|
24
25
|
class ScriptTreemapDataAudit extends Audit {
|
|
25
26
|
/**
|
|
@@ -285,4 +286,4 @@ class ScriptTreemapDataAudit extends Audit {
|
|
|
285
286
|
}
|
|
286
287
|
}
|
|
287
288
|
|
|
288
|
-
|
|
289
|
+
export default ScriptTreemapDataAudit;
|
|
@@ -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 MainResource from '../../computed/main-resource.js';
|
|
11
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
12
12
|
|
|
13
13
|
const UIStrings = {
|
|
14
14
|
/** Title of a Lighthouse audit that provides detail on a page's rel=canonical link. This descriptive title is shown to users when the rel=canonical link is valid. "rel=canonical" is an HTML attribute and value and so should not be translated. */
|
|
@@ -43,7 +43,7 @@ const UIStrings = {
|
|
|
43
43
|
'instead of an equivalent page of content',
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
46
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* @typedef CanonicalURLData
|
|
@@ -214,5 +214,5 @@ class Canonical extends Audit {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
export default Canonical;
|
|
218
|
+
export {UIStrings};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import {Audit} from '../audit.js';
|
|
9
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
10
10
|
|
|
11
11
|
const UIStrings = {
|
|
12
12
|
/** Title of a Lighthouse audit that provides detail on whether links have potentially-crawlable href attributes. This descriptive title is shown when all links on the page are potentially-crawlable. */
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
columnFailingLink: 'Uncrawlable Link',
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
22
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
23
23
|
|
|
24
24
|
class CrawlableAnchors extends Audit {
|
|
25
25
|
/**
|
|
@@ -90,5 +90,5 @@ class CrawlableAnchors extends Audit {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
export default CrawlableAnchors;
|
|
94
|
+
export {UIStrings};
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
/** @typedef {LH.Artifacts.FontSize['analyzedFailingNodesData'][0]} FailingNodeData */
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
11
|
+
|
|
12
|
+
import {Audit} from '../audit.js';
|
|
13
|
+
import ComputedViewportMeta from '../../computed/viewport-meta.js';
|
|
14
|
+
|
|
13
15
|
const MINIMAL_PERCENTAGE_OF_LEGIBLE_TEXT = 60;
|
|
14
16
|
|
|
15
17
|
const UIStrings = {
|
|
@@ -36,7 +38,7 @@ const UIStrings = {
|
|
|
36
38
|
columnFontSize: 'Font Size',
|
|
37
39
|
};
|
|
38
40
|
|
|
39
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
41
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
40
42
|
|
|
41
43
|
/**
|
|
42
44
|
* @param {Array<FailingNodeData>} fontSizeArtifact
|
|
@@ -340,5 +342,5 @@ class FontSize extends Audit {
|
|
|
340
342
|
}
|
|
341
343
|
}
|
|
342
344
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
+
export default FontSize;
|
|
346
|
+
export {UIStrings};
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
/** @typedef {{source: Source, subItems: {type: 'subitems', items: SubItem[]}}} InvalidHreflang */
|
|
10
10
|
/** @typedef {{reason: LH.IcuMessage}} SubItem */
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
import {Audit} from '../audit.js';
|
|
13
|
+
|
|
14
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
|
+
import {isValidLang} from '../../../third-party/axe/valid-langs.js';
|
|
15
16
|
|
|
16
17
|
const NO_LANGUAGE = 'x-default';
|
|
17
18
|
|
|
@@ -30,7 +31,7 @@ const UIStrings = {
|
|
|
30
31
|
notFullyQualified: 'Relative href value',
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
34
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* @param {string} href
|
|
@@ -145,5 +146,5 @@ class Hreflang extends Audit {
|
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
export default Hreflang;
|
|
150
|
+
export {UIStrings};
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import {Audit} from '../audit.js';
|
|
9
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
10
|
+
import MainResource from '../../computed/main-resource.js';
|
|
11
|
+
|
|
9
12
|
const HTTP_UNSUCCESSFUL_CODE_LOW = 400;
|
|
10
13
|
const HTTP_UNSUCCESSFUL_CODE_HIGH = 599;
|
|
11
|
-
const i18n = require('../../lib/i18n/i18n.js');
|
|
12
|
-
const MainResource = require('../../computed/main-resource.js');
|
|
13
14
|
|
|
14
15
|
const UIStrings = {
|
|
15
16
|
/** Title of a Lighthouse audit that provides detail on the HTTP status code a page responds with. This descriptive title is shown when the page has responded with a valid HTTP status code. */
|
|
@@ -21,7 +22,7 @@ const UIStrings = {
|
|
|
21
22
|
'[Learn more](https://web.dev/http-status-code/).',
|
|
22
23
|
};
|
|
23
24
|
|
|
24
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
25
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
25
26
|
|
|
26
27
|
class HTTPStatusCode extends Audit {
|
|
27
28
|
/**
|
|
@@ -64,5 +65,5 @@ class HTTPStatusCode extends Audit {
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
export default HTTPStatusCode;
|
|
69
|
+
export {UIStrings};
|
|
@@ -5,18 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import {Audit} from '../audit.js';
|
|
9
|
+
|
|
10
|
+
import robotsParser from 'robots-parser';
|
|
11
|
+
|
|
12
|
+
import URL from '../../lib/url-shim.js';
|
|
13
|
+
import MainResource from '../../computed/main-resource.js';
|
|
14
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
|
+
|
|
13
16
|
const BLOCKLIST = new Set([
|
|
14
17
|
'noindex',
|
|
15
18
|
'none',
|
|
16
19
|
]);
|
|
17
20
|
const ROBOTS_HEADER = 'x-robots-tag';
|
|
18
21
|
const UNAVAILABLE_AFTER = 'unavailable_after';
|
|
19
|
-
const i18n = require('../../lib/i18n/i18n.js');
|
|
20
22
|
|
|
21
23
|
const UIStrings = {
|
|
22
24
|
/** Title of a Lighthouse audit that provides detail on if search-engine crawlers are blocked from indexing the page. This title is shown when the page is not blocked from indexing and can be crawled. */
|
|
@@ -28,7 +30,7 @@ const UIStrings = {
|
|
|
28
30
|
'if they don\'t have permission to crawl them. [Learn more](https://web.dev/is-crawable/).',
|
|
29
31
|
};
|
|
30
32
|
|
|
31
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
33
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
36
|
* Checks if given directive is a valid unavailable_after directive with a date in the past
|
|
@@ -151,5 +153,5 @@ class IsCrawlable extends Audit {
|
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
155
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
export default IsCrawlable;
|
|
157
|
+
export {UIStrings};
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import {Audit} from '../audit.js';
|
|
9
|
+
import URL from '../../lib/url-shim.js';
|
|
10
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
11
|
+
|
|
10
12
|
const BLOCKLIST = new Set([
|
|
11
13
|
// English
|
|
12
14
|
'click here',
|
|
@@ -74,7 +76,6 @@ const BLOCKLIST = new Set([
|
|
|
74
76
|
'mer info',
|
|
75
77
|
'mer information',
|
|
76
78
|
]);
|
|
77
|
-
const i18n = require('../../lib/i18n/i18n.js');
|
|
78
79
|
|
|
79
80
|
const UIStrings = {
|
|
80
81
|
/** Title of a Lighthouse audit that tests if each link on a page contains a sufficient description of what a user will find when they click it. Generic, non-descriptive text like "click here" doesn't give an indication of what the link leads to. This descriptive title is shown when all links on the page have sufficient textual descriptions. */
|
|
@@ -91,7 +92,7 @@ const UIStrings = {
|
|
|
91
92
|
}`,
|
|
92
93
|
};
|
|
93
94
|
|
|
94
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
95
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
95
96
|
|
|
96
97
|
class LinkText extends Audit {
|
|
97
98
|
/**
|
|
@@ -156,5 +157,5 @@ class LinkText extends Audit {
|
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
export default LinkText;
|
|
161
|
+
export {UIStrings};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import ManualAudit from '../../manual/manual-audit.js';
|
|
9
|
+
import * as i18n from '../../../lib/i18n/i18n.js';
|
|
10
10
|
|
|
11
11
|
const UIStrings = {
|
|
12
12
|
/** Description of a Lighthouse audit that provides detail on the structured data in a page. "Structured data" is a standardized data format on a page that helps a search engine categorize and understand its contents. This description is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
title: 'Structured data is valid',
|
|
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 Manual SEO audit to check if structured data on page is valid.
|
|
@@ -34,5 +34,5 @@ class StructuredData extends ManualAudit {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
export default StructuredData;
|
|
38
|
+
export {UIStrings};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import {Audit} from '../audit.js';
|
|
9
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
10
10
|
|
|
11
11
|
const UIStrings = {
|
|
12
12
|
/** Title of a Lighthouse audit that provides detail on the web page's document meta description. This descriptive title is shown when the document has a meta description. "meta" should be left untranslated because it refers to an HTML element. */
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
explanation: 'Description text is empty.',
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
24
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
25
25
|
|
|
26
26
|
class Description extends Audit {
|
|
27
27
|
/**
|
|
@@ -63,5 +63,5 @@ class Description extends Audit {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
export default Description;
|
|
67
|
+
export {UIStrings};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import {Audit} from '../audit.js';
|
|
9
|
+
import URL from '../../lib/url-shim.js';
|
|
10
10
|
|
|
11
11
|
const JAVA_APPLET_TYPE = 'application/x-java-applet';
|
|
12
12
|
const JAVA_BEAN_TYPE = 'application/x-java-bean';
|
|
@@ -31,7 +31,7 @@ const SOURCE_PARAMS = new Set([
|
|
|
31
31
|
'source',
|
|
32
32
|
'src',
|
|
33
33
|
]);
|
|
34
|
-
|
|
34
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
35
35
|
|
|
36
36
|
const UIStrings = {
|
|
37
37
|
/** Title of a Lighthouse audit that provides detail on the browser plugins used by the page. This descriptive title is shown when there is no plugin content on the page that would restrict search indexing. */
|
|
@@ -44,7 +44,7 @@ const UIStrings = {
|
|
|
44
44
|
'[Learn more](https://web.dev/plugins/).',
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
47
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Verifies if given MIME type matches any known plugin MIME type
|
|
@@ -148,5 +148,5 @@ class Plugins extends Audit {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
export default Plugins;
|
|
152
|
+
export {UIStrings};
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
* https://github.com/GoogleChrome/lighthouse/issues/4356#issuecomment-375489925
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
import {Audit} from '../audit.js';
|
|
16
|
+
|
|
17
|
+
import URL from '../../lib/url-shim.js';
|
|
17
18
|
|
|
18
19
|
const HTTP_CLIENT_ERROR_CODE_LOW = 400;
|
|
19
20
|
const HTTP_SERVER_ERROR_CODE_LOW = 500;
|
|
@@ -31,7 +32,7 @@ const DIRECTIVE_SAFELIST = new Set([
|
|
|
31
32
|
'request-rate', 'visit-time', 'noindex', // not officially supported, but used in the wild
|
|
32
33
|
]);
|
|
33
34
|
const SITEMAP_VALID_PROTOCOLS = new Set(['https:', 'http:', 'ftp:']);
|
|
34
|
-
|
|
35
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
35
36
|
|
|
36
37
|
const UIStrings = {
|
|
37
38
|
/** Title of a Lighthouse audit that provides detail on the site's robots.txt file. Note: "robots.txt" is a canonical filename and should not be translated. This descriptive title is shown when the robots.txt file is present and configured correctly. */
|
|
@@ -55,7 +56,7 @@ const UIStrings = {
|
|
|
55
56
|
explanation: 'Lighthouse was unable to download a robots.txt file',
|
|
56
57
|
};
|
|
57
58
|
|
|
58
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
59
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
62
|
* @param {string} directiveName
|
|
@@ -252,5 +253,5 @@ class RobotsTxt extends Audit {
|
|
|
252
253
|
}
|
|
253
254
|
}
|
|
254
255
|
|
|
255
|
-
|
|
256
|
-
|
|
256
|
+
export default RobotsTxt;
|
|
257
|
+
export {UIStrings};
|
|
@@ -9,18 +9,21 @@
|
|
|
9
9
|
* @fileoverview Checks that links, buttons, etc. are sufficiently large and that there's
|
|
10
10
|
* no other tap target that's too close so that the user might accidentally tap on.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
import {Audit} from '../audit.js';
|
|
13
|
+
|
|
14
|
+
import ComputedViewportMeta from '../../computed/viewport-meta.js';
|
|
15
|
+
|
|
16
|
+
import {
|
|
15
17
|
rectsTouchOrOverlap,
|
|
16
18
|
getRectOverlapArea,
|
|
17
19
|
getRectAtCenter,
|
|
18
20
|
allRectsContainedWithinEachOther,
|
|
19
21
|
getLargestRect,
|
|
20
22
|
getBoundingRectWithPadding,
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
} from '../../lib/rect-helpers.js';
|
|
24
|
+
|
|
25
|
+
import {getTappableRectsFromClientRects} from '../../lib/tappable-rects.js';
|
|
26
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
24
27
|
|
|
25
28
|
const UIStrings = {
|
|
26
29
|
/** Title of a Lighthouse audit that provides detail on whether tap targets (like buttons and links) on a page are big enough so they can easily be tapped on a mobile device. This descriptive title is shown when tap targets are easy to tap on. */
|
|
@@ -40,7 +43,7 @@ const UIStrings = {
|
|
|
40
43
|
displayValue: '{decimalProportion, number, percent} appropriately sized tap targets',
|
|
41
44
|
};
|
|
42
45
|
|
|
43
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
46
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
44
47
|
|
|
45
48
|
const FINGER_SIZE_PX = 48;
|
|
46
49
|
// Ratio of the finger area tapping on an unintended element
|
|
@@ -317,8 +320,8 @@ class TapTargets extends Audit {
|
|
|
317
320
|
|
|
318
321
|
TapTargets.FINGER_SIZE_PX = FINGER_SIZE_PX;
|
|
319
322
|
|
|
320
|
-
|
|
321
|
-
|
|
323
|
+
export default TapTargets;
|
|
324
|
+
export {UIStrings};
|
|
322
325
|
|
|
323
326
|
|
|
324
327
|
/** @typedef {{
|
|
@@ -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 MainResource from '../computed/main-resource.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/** Title of a diagnostic audit that provides detail on how long it took from starting a request to when the server started responding. This descriptive title is shown to users when the amount is acceptable and no user action is required. */
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
displayValue: `Root document took {timeInMs, number, milliseconds}\xa0ms`,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
23
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
24
24
|
|
|
25
25
|
// Due to the way that DevTools throttling works we cannot see if server response took less than ~570ms.
|
|
26
26
|
// We set our failure threshold to 600ms to avoid those false positives but we want devs to shoot for 100ms.
|
|
@@ -87,5 +87,5 @@ class ServerResponseTime extends Audit {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
export default ServerResponseTime;
|
|
91
|
+
export {UIStrings};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import URL from '../lib/url-shim.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 a page's service worker. This descriptive title is shown to users when a service worker is registered and valid. */
|
|
@@ -39,7 +39,7 @@ const UIStrings = {
|
|
|
39
39
|
'the `start_url` ({startUrl}) is not in the service worker\'s scope ({scopeUrl})',
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
42
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
43
43
|
|
|
44
44
|
class ServiceWorker extends Audit {
|
|
45
45
|
/**
|
|
@@ -180,5 +180,5 @@ class ServiceWorker extends Audit {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
export default ServiceWorker;
|
|
184
|
+
export {UIStrings};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import MultiCheckAudit from './multi-check-audit.js';
|
|
9
|
+
import ManifestValues from '../computed/manifest-values.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 splash screens. This descriptive title is shown to users when the site has a custom splash screen. */
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
'more](https://web.dev/splash-screen/).',
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
23
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* @fileoverview
|
|
@@ -95,5 +95,5 @@ class SplashScreen extends MultiCheckAudit {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
export default SplashScreen;
|
|
99
|
+
export {UIStrings};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import MultiCheckAudit from './multi-check-audit.js';
|
|
9
|
+
import ManifestValues from '../computed/manifest-values.js';
|
|
10
|
+
import cssParsers from 'cssstyle/lib/parsers.js';
|
|
11
|
+
import * as i18n from '../lib/i18n/i18n.js';
|
|
12
12
|
|
|
13
13
|
const UIStrings = {
|
|
14
14
|
/** Title of a Lighthouse audit that provides detail on the theme color the web page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has been set. */
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
'[Learn more](https://web.dev/themed-omnibox/).',
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
23
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* @fileoverview
|
|
@@ -106,5 +106,5 @@ class ThemedOmnibox extends MultiCheckAudit {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
export default ThemedOmnibox;
|
|
110
|
+
export {UIStrings};
|