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,22 +5,24 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import path from 'path';
|
|
9
|
+
import log from 'lighthouse-logger';
|
|
10
|
+
import {Runner} from '../../runner.js';
|
|
11
|
+
import defaultConfig from './default-config.js';
|
|
12
|
+
import {defaultNavigationConfig, nonSimulatedPassConfigOverrides} from '../../config/constants.js'; // eslint-disable-line max-len
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
15
|
isFRGathererDefn,
|
|
16
16
|
throwInvalidDependencyOrder,
|
|
17
17
|
isValidArtifactDependency,
|
|
18
18
|
throwInvalidArtifactDependency,
|
|
19
19
|
assertArtifactTopologicalOrder,
|
|
20
20
|
assertValidConfig,
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
} from './validation.js';
|
|
22
|
+
|
|
23
|
+
import {filterConfigByGatherMode, filterConfigByExplicitFilters} from './filters.js';
|
|
24
|
+
|
|
25
|
+
import {
|
|
24
26
|
deepCloneConfigJson,
|
|
25
27
|
resolveSettings,
|
|
26
28
|
resolveAuditsToDefns,
|
|
@@ -28,8 +30,12 @@ const {
|
|
|
28
30
|
mergePlugins,
|
|
29
31
|
mergeConfigFragment,
|
|
30
32
|
mergeConfigFragmentArrayByKey,
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
+
} from '../../config/config-helpers.js';
|
|
34
|
+
|
|
35
|
+
import {getModuleDirectory} from '../../../esm-utils.js';
|
|
36
|
+
import * as format from '../../../shared/localization/format.js';
|
|
37
|
+
|
|
38
|
+
const defaultConfigPath = path.join(getModuleDirectory(import.meta), './default-config.js');
|
|
33
39
|
|
|
34
40
|
/** @typedef {LH.Config.FRContext & {gatherMode: LH.Gatherer.GatherMode}} ConfigContext */
|
|
35
41
|
|
|
@@ -134,7 +140,8 @@ async function resolveArtifactsToDefns(artifacts, configDir) {
|
|
|
134
140
|
const artifactDefnsBySymbol = new Map();
|
|
135
141
|
|
|
136
142
|
const coreGathererList = Runner.getGathererList();
|
|
137
|
-
const
|
|
143
|
+
const artifactDefns = [];
|
|
144
|
+
for (const artifactJson of artifacts) {
|
|
138
145
|
/** @type {LH.Config.GathererJson} */
|
|
139
146
|
// @ts-expect-error - remove when legacy runner path is removed.
|
|
140
147
|
const gathererJson = artifactJson.gatherer;
|
|
@@ -155,9 +162,8 @@ async function resolveArtifactsToDefns(artifacts, configDir) {
|
|
|
155
162
|
|
|
156
163
|
const symbol = artifact.gatherer.instance.meta.symbol;
|
|
157
164
|
if (symbol) artifactDefnsBySymbol.set(symbol, artifact);
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
const artifactDefns = await Promise.all(artifactDefnsPromises);
|
|
165
|
+
artifactDefns.push(artifact);
|
|
166
|
+
}
|
|
161
167
|
|
|
162
168
|
log.timeEnd(status);
|
|
163
169
|
return artifactDefns;
|
|
@@ -323,4 +329,8 @@ function getConfigDisplayString(config) {
|
|
|
323
329
|
return JSON.stringify(jsonConfig, null, 2);
|
|
324
330
|
}
|
|
325
331
|
|
|
326
|
-
|
|
332
|
+
export {
|
|
333
|
+
resolveWorkingCopy,
|
|
334
|
+
initializeConfig,
|
|
335
|
+
getConfigDisplayString,
|
|
336
|
+
};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import legacyDefaultConfig from '../../config/default-config.js';
|
|
9
|
+
import {deepClone} from '../../config/config-helpers.js';
|
|
10
|
+
import {metricsToAudits} from '../../config/metrics-to-audits.js';
|
|
11
11
|
|
|
12
12
|
/** @type {LH.Config.AuditJson[]} */
|
|
13
13
|
const frAudits = [
|
|
@@ -21,7 +21,7 @@ const frCategoryAuditRefExtensions = {
|
|
|
21
21
|
'performance': [
|
|
22
22
|
{id: 'uses-responsive-images-snapshot', weight: 0},
|
|
23
23
|
{id: 'experimental-interaction-to-next-paint', weight: 0, group: 'metrics', acronym: 'INP',
|
|
24
|
-
relevantAudits:
|
|
24
|
+
relevantAudits: metricsToAudits.inpRelevantAudits},
|
|
25
25
|
{id: 'work-during-interaction', weight: 0},
|
|
26
26
|
],
|
|
27
27
|
};
|
|
@@ -205,4 +205,4 @@ const defaultConfig = {
|
|
|
205
205
|
groups: legacyDefaultConfig.groups,
|
|
206
206
|
};
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
export default defaultConfig;
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const Audit = require('../../audits/audit.js');
|
|
8
|
+
import log from 'lighthouse-logger';
|
|
9
|
+
import {Audit} from '../../audits/audit.js';
|
|
11
10
|
|
|
12
11
|
/** @type {Record<keyof LH.FRBaseArtifacts, string>} */
|
|
13
12
|
const baseArtifactKeySource = {
|
|
@@ -324,7 +323,7 @@ function filterConfigByExplicitFilters(config, filters) {
|
|
|
324
323
|
};
|
|
325
324
|
}
|
|
326
325
|
|
|
327
|
-
|
|
326
|
+
export {
|
|
328
327
|
filterConfigByGatherMode,
|
|
329
328
|
filterConfigByExplicitFilters,
|
|
330
329
|
filterArtifactsByGatherMode,
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {Audit} from '../../audits/audit.js';
|
|
9
|
+
import BaseFRGatherer from '../gather/base-gatherer.js';
|
|
10
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @param {LH.Config.GathererDefn | LH.Config.AnyFRGathererDefn} gathererDefn
|
|
@@ -297,7 +297,7 @@ function throwInvalidArtifactDependency(artifactId, dependencyKey) {
|
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
|
|
300
|
+
export {
|
|
301
301
|
isFRGathererDefn,
|
|
302
302
|
isValidArtifactDependency,
|
|
303
303
|
assertValidPluginName,
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
getBrowserVersion,
|
|
12
|
-
|
|
13
|
-
getEnvironmentWarnings,
|
|
14
|
-
} = require('../../gather/driver/environment.js');
|
|
8
|
+
import log from 'lighthouse-logger';
|
|
9
|
+
import isDeepEqual from 'lodash/isEqual.js';
|
|
10
|
+
import {
|
|
11
|
+
getBrowserVersion, getBenchmarkIndex, getEnvironmentWarnings,
|
|
12
|
+
} from '../../gather/driver/environment.js';
|
|
15
13
|
|
|
16
14
|
/**
|
|
17
15
|
* @param {LH.Config.FRConfig} config
|
|
@@ -96,7 +94,7 @@ function finalizeArtifacts(baseArtifacts, gathererArtifacts) {
|
|
|
96
94
|
return artifacts;
|
|
97
95
|
}
|
|
98
96
|
|
|
99
|
-
|
|
97
|
+
export {
|
|
100
98
|
getBaseArtifacts,
|
|
101
99
|
finalizeArtifacts,
|
|
102
100
|
};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import log from 'lighthouse-logger';
|
|
9
|
+
import {ExecutionContext} from '../../gather/driver/execution-context.js';
|
|
10
|
+
import {TargetManager} from '../../gather/driver/target-manager.js';
|
|
11
|
+
import {Fetcher} from '../../gather/fetcher.js';
|
|
12
12
|
|
|
13
13
|
/** @return {*} */
|
|
14
14
|
const throwNotConnectedFn = () => {
|
|
@@ -89,4 +89,4 @@ class Driver {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
export {Driver};
|
|
@@ -5,29 +5,25 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const {getPageLoadError} = require('../../lib/navigation-error.js');
|
|
28
|
-
const Trace = require('../../gather/gatherers/trace.js');
|
|
29
|
-
const DevtoolsLog = require('../../gather/gatherers/devtools-log.js');
|
|
30
|
-
const NetworkRecords = require('../../computed/network-records.js');
|
|
8
|
+
import puppeteer from 'puppeteer-core';
|
|
9
|
+
import log from 'lighthouse-logger';
|
|
10
|
+
import {Driver} from './driver.js';
|
|
11
|
+
import {Runner} from '../../runner.js';
|
|
12
|
+
import {getEmptyArtifactState, collectPhaseArtifacts, awaitArtifacts} from './runner-helpers.js';
|
|
13
|
+
import * as prepare from '../../gather/driver/prepare.js';
|
|
14
|
+
import {gotoURL} from '../../gather/driver/navigation.js';
|
|
15
|
+
import * as storage from '../../gather/driver/storage.js';
|
|
16
|
+
import * as emulation from '../../lib/emulation.js';
|
|
17
|
+
import {defaultNavigationConfig} from '../../config/constants.js';
|
|
18
|
+
import {initializeConfig} from '../config/config.js';
|
|
19
|
+
import {getBaseArtifacts, finalizeArtifacts} from './base-artifacts.js';
|
|
20
|
+
import format from '../../../shared/localization/format.js';
|
|
21
|
+
import {LighthouseError} from '../../lib/lh-error.js';
|
|
22
|
+
import URL from '../../lib/url-shim.js';
|
|
23
|
+
import {getPageLoadError} from '../../lib/navigation-error.js';
|
|
24
|
+
import Trace from '../../gather/gatherers/trace.js';
|
|
25
|
+
import DevtoolsLog from '../../gather/gatherers/devtools-log.js';
|
|
26
|
+
import NetworkRecords from '../../computed/network-records.js';
|
|
31
27
|
|
|
32
28
|
/** @typedef {{skipAboutBlank?: boolean}} InternalOptions */
|
|
33
29
|
|
|
@@ -148,11 +144,11 @@ async function _collectDebugData(navigationContext, phaseState) {
|
|
|
148
144
|
const getArtifactState = phaseState.artifactState.getArtifact;
|
|
149
145
|
|
|
150
146
|
const devtoolsLogArtifactId = devtoolsLogArtifactDefn?.id;
|
|
151
|
-
const devtoolsLog = devtoolsLogArtifactId && await getArtifactState[devtoolsLogArtifactId];
|
|
152
|
-
const records = devtoolsLog && await NetworkRecords.request(devtoolsLog, navigationContext);
|
|
147
|
+
const devtoolsLog = devtoolsLogArtifactId && (await getArtifactState[devtoolsLogArtifactId]);
|
|
148
|
+
const records = devtoolsLog && (await NetworkRecords.request(devtoolsLog, navigationContext));
|
|
153
149
|
|
|
154
150
|
const traceArtifactId = traceArtifactDefn?.id;
|
|
155
|
-
const trace = traceArtifactId && await getArtifactState[traceArtifactId];
|
|
151
|
+
const trace = traceArtifactId && (await getArtifactState[traceArtifactId]);
|
|
156
152
|
|
|
157
153
|
return {devtoolsLog, records, trace};
|
|
158
154
|
}
|
|
@@ -356,7 +352,7 @@ async function navigationGather(requestor, options) {
|
|
|
356
352
|
return {artifacts, runnerOptions};
|
|
357
353
|
}
|
|
358
354
|
|
|
359
|
-
|
|
355
|
+
export {
|
|
360
356
|
navigationGather,
|
|
361
357
|
_setup,
|
|
362
358
|
_setupNavigation,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @typedef CollectPhaseArtifactOptions
|
|
10
|
-
* @property {import('./driver.js')} driver
|
|
10
|
+
* @property {import('./driver.js').Driver} driver
|
|
11
11
|
* @property {Array<LH.Config.AnyArtifactDefn>} artifactDefinitions
|
|
12
12
|
* @property {ArtifactState} artifactState
|
|
13
13
|
* @property {LH.FRBaseArtifacts} baseArtifacts
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
/** @typedef {LH.Gatherer.FRTransitionalContext<LH.Gatherer.DependencyKey>['dependencies']} Dependencies */
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
import log from 'lighthouse-logger';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
@@ -149,7 +149,7 @@ async function awaitArtifacts(artifactState) {
|
|
|
149
149
|
return artifacts;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
export {
|
|
153
153
|
getEmptyArtifactState,
|
|
154
154
|
awaitArtifacts,
|
|
155
155
|
collectPhaseArtifacts,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import EventEmitter from 'events';
|
|
9
|
+
import {LighthouseError} from '../../lib/lh-error.js';
|
|
10
10
|
|
|
11
11
|
// Controls how long to wait for a response after sending a DevTools protocol command.
|
|
12
12
|
const DEFAULT_PROTOCOL_TIMEOUT = 30000;
|
|
@@ -111,4 +111,4 @@ class ProtocolSession extends CrdpEventEmitter {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
export {ProtocolSession};
|
|
@@ -5,16 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
awaitArtifacts,
|
|
15
|
-
} = require('./runner-helpers.js');
|
|
16
|
-
const {initializeConfig} = require('../config/config.js');
|
|
17
|
-
const {getBaseArtifacts, finalizeArtifacts} = require('./base-artifacts.js');
|
|
8
|
+
import log from 'lighthouse-logger';
|
|
9
|
+
import {Driver} from './driver.js';
|
|
10
|
+
import {Runner} from '../../runner.js';
|
|
11
|
+
import {getEmptyArtifactState, collectPhaseArtifacts, awaitArtifacts} from './runner-helpers.js';
|
|
12
|
+
import {initializeConfig} from '../config/config.js';
|
|
13
|
+
import {getBaseArtifacts, finalizeArtifacts} from './base-artifacts.js';
|
|
18
14
|
|
|
19
15
|
/**
|
|
20
16
|
* @param {{page: LH.Puppeteer.Page, config?: LH.Config.Json, configContext?: LH.Config.FRContext}} options
|
|
@@ -65,6 +61,6 @@ async function snapshotGather(options) {
|
|
|
65
61
|
return {artifacts, runnerOptions};
|
|
66
62
|
}
|
|
67
63
|
|
|
68
|
-
|
|
64
|
+
export {
|
|
69
65
|
snapshotGather,
|
|
70
66
|
};
|
|
@@ -5,17 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = require('./runner-helpers.js');
|
|
16
|
-
const {prepareTargetForTimespanMode} = require('../../gather/driver/prepare.js');
|
|
17
|
-
const {initializeConfig} = require('../config/config.js');
|
|
18
|
-
const {getBaseArtifacts, finalizeArtifacts} = require('./base-artifacts.js');
|
|
8
|
+
import log from 'lighthouse-logger';
|
|
9
|
+
import {Driver} from './driver.js';
|
|
10
|
+
import {Runner} from '../../runner.js';
|
|
11
|
+
import {getEmptyArtifactState, collectPhaseArtifacts, awaitArtifacts} from './runner-helpers.js';
|
|
12
|
+
import {prepareTargetForTimespanMode} from '../../gather/driver/prepare.js';
|
|
13
|
+
import {initializeConfig} from '../config/config.js';
|
|
14
|
+
import {getBaseArtifacts, finalizeArtifacts} from './base-artifacts.js';
|
|
19
15
|
|
|
20
16
|
/**
|
|
21
17
|
* @param {{page: LH.Puppeteer.Page, config?: LH.Config.Json, configContext?: LH.Config.FRContext}} options
|
|
@@ -78,6 +74,6 @@ async function startTimespanGather(options) {
|
|
|
78
74
|
};
|
|
79
75
|
}
|
|
80
76
|
|
|
81
|
-
|
|
77
|
+
export {
|
|
82
78
|
startTimespanGather,
|
|
83
79
|
};
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import ReportGenerator from '../../report/generator/report-generator.js';
|
|
9
|
+
import {snapshotGather} from './gather/snapshot-runner.js';
|
|
10
|
+
import {startTimespanGather} from './gather/timespan-runner.js';
|
|
11
|
+
import {navigationGather} from './gather/navigation-runner.js';
|
|
12
|
+
import {Runner} from '../runner.js';
|
|
13
|
+
import {initializeConfig} from './config/config.js';
|
|
14
14
|
|
|
15
15
|
/** @typedef {Parameters<snapshotGather>[0]} FrOptions */
|
|
16
16
|
/** @typedef {Omit<FrOptions, 'page'> & {name?: string}} UserFlowOptions */
|
|
@@ -220,7 +220,7 @@ class UserFlow {
|
|
|
220
220
|
*/
|
|
221
221
|
async generateReport() {
|
|
222
222
|
const flowResult = await this.createFlowResult();
|
|
223
|
-
return generateFlowReportHtml(flowResult);
|
|
223
|
+
return ReportGenerator.generateFlowReportHtml(flowResult);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
/**
|
|
@@ -273,7 +273,7 @@ async function auditGatherSteps(gatherSteps, options) {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
export {
|
|
277
277
|
UserFlow,
|
|
278
278
|
auditGatherSteps,
|
|
279
279
|
};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {EventEmitter} from 'events';
|
|
9
|
+
import log from 'lighthouse-logger';
|
|
10
|
+
import {LighthouseError} from '../../lib/lh-error.js';
|
|
11
11
|
|
|
12
12
|
// TODO(bckenny): CommandCallback properties should be tied by command type after
|
|
13
13
|
// https://github.com/Microsoft/TypeScript/pull/22348. See driver.js TODO.
|
|
@@ -176,4 +176,4 @@ class Connection {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
export {Connection};
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import {Connection} from './connection.js';
|
|
9
|
+
import WebSocket from 'ws';
|
|
10
|
+
import http from 'http';
|
|
11
|
+
import log from 'lighthouse-logger';
|
|
12
|
+
import {LighthouseError} from '../../lib/lh-error.js';
|
|
13
13
|
|
|
14
14
|
const DEFAULT_HOSTNAME = '127.0.0.1';
|
|
15
15
|
const CONNECT_TIMEOUT = 10000;
|
|
@@ -158,4 +158,4 @@ class CriConnection extends Connection {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
export {CriConnection};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import {Connection} from './connection.js';
|
|
9
9
|
|
|
10
10
|
/* eslint-disable no-unused-vars */
|
|
11
11
|
|
|
@@ -55,4 +55,4 @@ class RawConnection extends Connection {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
export {RawConnection};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import log from 'lighthouse-logger';
|
|
9
|
+
import * as constants from '../../config/constants.js';
|
|
10
|
+
import {pageFunctions} from '../../lib/page-functions.js';
|
|
11
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
12
12
|
|
|
13
13
|
const UIStrings = {
|
|
14
14
|
/**
|
|
@@ -27,7 +27,7 @@ const UIStrings = {
|
|
|
27
27
|
*/
|
|
28
28
|
const SLOW_CPU_BENCHMARK_INDEX_THRESHOLD = 1000;
|
|
29
29
|
|
|
30
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
30
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* @param {LH.Gatherer.FRProtocolSession} session
|
|
@@ -96,7 +96,7 @@ function getEnvironmentWarnings(context) {
|
|
|
96
96
|
].filter(/** @return {s is LH.IcuMessage} */ s => !!s);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
export {
|
|
100
100
|
UIStrings,
|
|
101
101
|
getBrowserVersion,
|
|
102
102
|
getBenchmarkIndex,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
/* global window */
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
import {pageFunctions} from '../../lib/page-functions.js';
|
|
11
11
|
|
|
12
12
|
class ExecutionContext {
|
|
13
13
|
/** @param {LH.Gatherer.FRProtocolSession} session */
|
|
@@ -249,4 +249,4 @@ class ExecutionContext {
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
export {ExecutionContext};
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import log from 'lighthouse-logger';
|
|
9
|
+
import {NetworkMonitor} from './network-monitor.js';
|
|
10
|
+
import {waitForFullyLoaded, waitForFrameNavigated, waitForUserToContinue} from './wait-for-condition.js'; // eslint-disable-line max-len
|
|
11
|
+
import * as constants from '../../config/constants.js';
|
|
12
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
13
|
+
import URL from '../../lib/url-shim.js';
|
|
14
14
|
|
|
15
15
|
const UIStrings = {
|
|
16
16
|
/**
|
|
@@ -28,7 +28,7 @@ const UIStrings = {
|
|
|
28
28
|
'Results may be incomplete.',
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
31
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
// Controls how long to wait after FCP before continuing
|
|
@@ -179,4 +179,4 @@ function getNavigationWarnings(navigation) {
|
|
|
179
179
|
return warnings;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
export {gotoURL, getNavigationWarnings, UIStrings};
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
* status inspection state.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
import log from 'lighthouse-logger';
|
|
14
|
+
|
|
15
|
+
import {EventEmitter} from 'events';
|
|
16
|
+
import {NetworkRecorder} from '../../lib/network-recorder.js';
|
|
17
|
+
import {NetworkRequest} from '../../lib/network-request.js';
|
|
18
|
+
import URL from '../../lib/url-shim.js';
|
|
18
19
|
|
|
19
20
|
/** @typedef {import('../../lib/network-recorder.js').NetworkRecorderEventMap} NetworkRecorderEventMap */
|
|
20
21
|
/** @typedef {'network-2-idle'|'network-critical-idle'|'networkidle'|'networkbusy'|'network-critical-busy'|'network-2-busy'} NetworkMonitorEvent_ */
|
|
@@ -256,4 +257,4 @@ class NetworkMonitor extends NetworkMonitorEventEmitter {
|
|
|
256
257
|
}
|
|
257
258
|
}
|
|
258
259
|
|
|
259
|
-
|
|
260
|
+
export {NetworkMonitor};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import {NetworkRequest} from '../../lib/network-request.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Return the body of the response with the given ID. Rejects if getting the
|
|
@@ -25,4 +25,4 @@ async function fetchResponseBodyFromCache(session, requestId, timeout = 1000) {
|
|
|
25
25
|
return result.body;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
export {fetchResponseBodyFromCache};
|