lighthouse 9.5.0-dev.20220712 → 9.5.0-dev.20220715
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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
// TODO(esmodules): rename to .js when root is type: module
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import {createRequire} from 'module';
|
|
10
10
|
import url from 'url';
|
|
11
11
|
import path from 'path';
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ import path from 'path';
|
|
|
15
15
|
* @param {string} packageName
|
|
16
16
|
*/
|
|
17
17
|
function resolveModulePath(packageName) {
|
|
18
|
-
const require =
|
|
18
|
+
const require = createRequire(import.meta.url);
|
|
19
19
|
return require.resolve(packageName);
|
|
20
20
|
}
|
|
21
21
|
|
package/lighthouse-cli/bin.js
CHANGED
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
import fs from 'fs';
|
|
21
21
|
import path from 'path';
|
|
22
22
|
import url from 'url';
|
|
23
|
-
import module from 'module';
|
|
24
23
|
|
|
25
24
|
import log from 'lighthouse-logger';
|
|
26
25
|
|
|
@@ -28,17 +27,14 @@ import * as commands from './commands/commands.js';
|
|
|
28
27
|
import * as Printer from './printer.js';
|
|
29
28
|
import {getFlags} from './cli-flags.js';
|
|
30
29
|
import {runLighthouse} from './run.js';
|
|
31
|
-
import
|
|
30
|
+
import {generateConfig, generateLegacyConfig} from '../lighthouse-core/index.js';
|
|
32
31
|
import {askPermission} from './sentry-prompt.js';
|
|
33
32
|
import {LH_ROOT} from '../root.js';
|
|
33
|
+
import {Sentry} from '../lighthouse-core/lib/sentry.js';
|
|
34
34
|
import {getConfigDisplayString} from '../lighthouse-core/fraggle-rock/config/config.js';
|
|
35
35
|
|
|
36
36
|
const pkg = JSON.parse(fs.readFileSync(LH_ROOT + '/package.json', 'utf-8'));
|
|
37
37
|
|
|
38
|
-
// TODO(esmodules): use regular import when this file is esm.
|
|
39
|
-
const require = module.createRequire(import.meta.url);
|
|
40
|
-
const Sentry = require('../lighthouse-core/lib/sentry.js');
|
|
41
|
-
|
|
42
38
|
/**
|
|
43
39
|
* @return {boolean}
|
|
44
40
|
*/
|
|
@@ -122,10 +118,10 @@ async function begin() {
|
|
|
122
118
|
|
|
123
119
|
if (cliFlags.printConfig) {
|
|
124
120
|
if (cliFlags.legacyNavigation) {
|
|
125
|
-
const config = await
|
|
121
|
+
const config = await generateLegacyConfig(configJson, cliFlags);
|
|
126
122
|
process.stdout.write(config.getPrintString());
|
|
127
123
|
} else {
|
|
128
|
-
const config = await
|
|
124
|
+
const config = await generateConfig(configJson, cliFlags);
|
|
129
125
|
process.stdout.write(getConfigDisplayString(config));
|
|
130
126
|
}
|
|
131
127
|
return;
|
|
@@ -138,7 +134,7 @@ async function begin() {
|
|
|
138
134
|
cliFlags.enableErrorReporting = await askPermission();
|
|
139
135
|
}
|
|
140
136
|
if (cliFlags.enableErrorReporting) {
|
|
141
|
-
Sentry.init({
|
|
137
|
+
await Sentry.init({
|
|
142
138
|
url: urlUnderTest,
|
|
143
139
|
flags: cliFlags,
|
|
144
140
|
environmentData: {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import {getAuditList} from '../../lighthouse-core/index.js';
|
|
8
8
|
|
|
9
9
|
function listAudits() {
|
|
10
|
-
const audits =
|
|
10
|
+
const audits = getAuditList().map((i) => i.replace(/\.js$/, ''));
|
|
11
11
|
process.stdout.write(JSON.stringify({audits}, null, 2));
|
|
12
12
|
process.exit(0);
|
|
13
13
|
}
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import {traceCategories} from '../../lighthouse-core/index.js';
|
|
8
8
|
|
|
9
9
|
function listTraceCategories() {
|
|
10
|
-
const traceCategories = lighthouse.traceCategories;
|
|
11
10
|
process.stdout.write(JSON.stringify({traceCategories}));
|
|
12
11
|
process.exit(0);
|
|
13
12
|
}
|
package/lighthouse-cli/run.js
CHANGED
|
@@ -15,7 +15,7 @@ import log from 'lighthouse-logger';
|
|
|
15
15
|
import open from 'open';
|
|
16
16
|
|
|
17
17
|
import * as Printer from './printer.js';
|
|
18
|
-
import lighthouse from '../lighthouse-core/index.js';
|
|
18
|
+
import lighthouse, {legacyNavigation} from '../lighthouse-core/index.js';
|
|
19
19
|
import {getLhrFilenamePrefix} from '../report/generator/file-namer.js';
|
|
20
20
|
import * as assetSaver from '../lighthouse-core/lib/asset-saver.js';
|
|
21
21
|
import URL from '../lighthouse-core/lib/url-shim.js';
|
|
@@ -233,7 +233,7 @@ async function runLighthouse(url, flags, config) {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
const runnerResult = flags.legacyNavigation ?
|
|
236
|
-
await
|
|
236
|
+
await legacyNavigation(url, flags, config) :
|
|
237
237
|
await lighthouse(url, flags, config);
|
|
238
238
|
|
|
239
239
|
// If in gatherMode only, there will be no runnerResult.
|
|
@@ -42,7 +42,7 @@ import perfFonts from './test-definitions/perf-fonts.js';
|
|
|
42
42
|
import perfFrameMetrics from './test-definitions/perf-frame-metrics.js';
|
|
43
43
|
import perfPreload from './test-definitions/perf-preload.js';
|
|
44
44
|
import perfTraceElements from './test-definitions/perf-trace-elements.js';
|
|
45
|
-
import pubads from './test-definitions/pubads.js';
|
|
45
|
+
// import pubads from './test-definitions/pubads.js';
|
|
46
46
|
import pwaAirhorner from './test-definitions/pwa-airhorner.js';
|
|
47
47
|
import pwaCaltrain from './test-definitions/pwa-caltrain.js';
|
|
48
48
|
import pwaChromestatus from './test-definitions/pwa-chromestatus.js';
|
|
@@ -103,7 +103,8 @@ const smokeTests = [
|
|
|
103
103
|
perfFrameMetrics,
|
|
104
104
|
perfPreload,
|
|
105
105
|
perfTraceElements,
|
|
106
|
-
pubads
|
|
106
|
+
// TODO(esmodules): enable when pubads is bundled again
|
|
107
|
+
// pubads,
|
|
107
108
|
pwaAirhorner,
|
|
108
109
|
pwaChromestatus,
|
|
109
110
|
pwaSvgomg,
|
|
@@ -184,7 +184,7 @@ async function begin() {
|
|
|
184
184
|
if (argv.runner === 'bundle') {
|
|
185
185
|
console.log('\n✨ Be sure to have recently run this: yarn build-all');
|
|
186
186
|
}
|
|
187
|
-
const {runLighthouse} = await import(runnerPath);
|
|
187
|
+
const {runLighthouse, setup} = await import(runnerPath);
|
|
188
188
|
runLighthouse.runnerName = argv.runner;
|
|
189
189
|
|
|
190
190
|
// Find test definition file and filter by requestedTestIds.
|
|
@@ -206,8 +206,8 @@ async function begin() {
|
|
|
206
206
|
// If running the core tests, spin up the test server.
|
|
207
207
|
if (testDefnPath === coreTestDefnsPath) {
|
|
208
208
|
({server, serverForOffline} = await import('../../fixtures/static-server.js'));
|
|
209
|
-
server.listen(10200, 'localhost');
|
|
210
|
-
serverForOffline.listen(10503, 'localhost');
|
|
209
|
+
await server.listen(10200, 'localhost');
|
|
210
|
+
await serverForOffline.listen(10503, 'localhost');
|
|
211
211
|
takeNetworkRequestUrls = server.takeRequestUrls.bind(server);
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -219,6 +219,7 @@ async function begin() {
|
|
|
219
219
|
useLegacyNavigation: argv.legacyNavigation,
|
|
220
220
|
lighthouseRunner: runLighthouse,
|
|
221
221
|
takeNetworkRequestUrls,
|
|
222
|
+
setup,
|
|
222
223
|
};
|
|
223
224
|
|
|
224
225
|
smokehouseResult = (await runSmokehouse(prunedTestDefns, options));
|
|
@@ -19,7 +19,7 @@ import {once} from 'events';
|
|
|
19
19
|
import puppeteer from 'puppeteer-core';
|
|
20
20
|
import ChromeLauncher from 'chrome-launcher';
|
|
21
21
|
|
|
22
|
-
import
|
|
22
|
+
import {CriConnection} from '../../../../lighthouse-core/gather/connections/cri.js';
|
|
23
23
|
import {LH_ROOT} from '../../../../root.js';
|
|
24
24
|
import {loadArtifacts, saveArtifacts} from '../../../../lighthouse-core/lib/asset-saver.js';
|
|
25
25
|
|
|
@@ -68,10 +68,14 @@ async function runBundledLighthouse(url, configJson, testRunnerOptions) {
|
|
|
68
68
|
global.require = originalRequire;
|
|
69
69
|
global.Buffer = originalBuffer;
|
|
70
70
|
|
|
71
|
-
/** @type {import('../../../../lighthouse-core/index.js')} */
|
|
71
|
+
/** @type {import('../../../../lighthouse-core/index.js')['default']} */
|
|
72
72
|
// @ts-expect-error - not worth giving test global an actual type.
|
|
73
73
|
const lighthouse = global.runBundledLighthouse;
|
|
74
74
|
|
|
75
|
+
/** @type {import('../../../../lighthouse-core/index.js')['legacyNavigation']} */
|
|
76
|
+
// @ts-expect-error - not worth giving test global an actual type.
|
|
77
|
+
const legacyNavigation = global.runBundledLighthouseLegacyNavigation;
|
|
78
|
+
|
|
75
79
|
// Launch and connect to Chrome.
|
|
76
80
|
const launchedChrome = await ChromeLauncher.launch();
|
|
77
81
|
const port = launchedChrome.port;
|
|
@@ -81,9 +85,9 @@ async function runBundledLighthouse(url, configJson, testRunnerOptions) {
|
|
|
81
85
|
const logLevel = testRunnerOptions.isDebug ? 'info' : undefined;
|
|
82
86
|
let runnerResult;
|
|
83
87
|
if (testRunnerOptions.useLegacyNavigation) {
|
|
84
|
-
const connection = new
|
|
88
|
+
const connection = new CriConnection(port);
|
|
85
89
|
runnerResult =
|
|
86
|
-
await
|
|
90
|
+
await legacyNavigation(url, {port, logLevel}, configJson, connection);
|
|
87
91
|
} else {
|
|
88
92
|
// Puppeteer is not included in the bundle, we must create the page here.
|
|
89
93
|
const browser = await puppeteer.connect({browserURL: `http://localhost:${port}`});
|
|
@@ -17,7 +17,7 @@ import {execFile} from 'child_process';
|
|
|
17
17
|
|
|
18
18
|
import log from 'lighthouse-logger';
|
|
19
19
|
|
|
20
|
-
import assetSaver from '../../../../lighthouse-core/lib/asset-saver.js';
|
|
20
|
+
import * as assetSaver from '../../../../lighthouse-core/lib/asset-saver.js';
|
|
21
21
|
import {LocalConsole} from '../lib/local-console.js';
|
|
22
22
|
import {ChildProcessError} from '../lib/child-process-error.js';
|
|
23
23
|
import {LH_ROOT} from '../../../../root.js';
|
|
@@ -10,60 +10,29 @@
|
|
|
10
10
|
|
|
11
11
|
import fs from 'fs';
|
|
12
12
|
import os from 'os';
|
|
13
|
-
import {
|
|
13
|
+
import {execFileSync} from 'child_process';
|
|
14
14
|
|
|
15
15
|
import {LH_ROOT} from '../../../../root.js';
|
|
16
|
+
import {testUrlFromDevtools} from '../../../../lighthouse-core/scripts/pptr-run-devtools.js';
|
|
16
17
|
|
|
17
18
|
const devtoolsDir =
|
|
18
19
|
process.env.DEVTOOLS_PATH || `${LH_ROOT}/.tmp/chromium-web-tests/devtools/devtools-frontend`;
|
|
19
20
|
|
|
20
|
-
/**
|
|
21
|
-
* @param {string[]} logs
|
|
22
|
-
* @param {string} command
|
|
23
|
-
* @param {string[]} args
|
|
24
|
-
* @return {Promise<boolean>} true if command exited successfully.
|
|
25
|
-
*/
|
|
26
|
-
function spawnAndLog(logs, command, args) {
|
|
27
|
-
return new Promise((resolve) => {
|
|
28
|
-
const spawnHandle = spawn(command, args);
|
|
29
|
-
spawnHandle.on('close', code => {
|
|
30
|
-
if (code) {
|
|
31
|
-
logs.push(`[FAILURE] Command exited with code: ${code}\n`);
|
|
32
|
-
} else {
|
|
33
|
-
logs.push('[SUCCESS] Command exited with code: 0\n');
|
|
34
|
-
}
|
|
35
|
-
resolve(code === 0);
|
|
36
|
-
});
|
|
37
|
-
spawnHandle.on('error', (error) => {
|
|
38
|
-
logs.push(`ERROR: ${error.toString()}`);
|
|
39
|
-
});
|
|
40
|
-
spawnHandle.stdout.setEncoding('utf8');
|
|
41
|
-
spawnHandle.stdout.on('data', data => {
|
|
42
|
-
process.stdout.write(data);
|
|
43
|
-
logs.push(`STDOUT: ${data}`);
|
|
44
|
-
});
|
|
45
|
-
spawnHandle.stderr.setEncoding('utf8');
|
|
46
|
-
spawnHandle.stderr.on('data', data => {
|
|
47
|
-
process.stderr.write(data);
|
|
48
|
-
logs.push(`STDERR: ${data}`);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** @type {Promise<boolean>} */
|
|
54
|
-
let buildDevtoolsPromise;
|
|
55
21
|
/**
|
|
56
22
|
* Download/pull latest DevTools, build Lighthouse for DevTools, roll to DevTools, and build DevTools.
|
|
57
|
-
* @param {string[]} logs
|
|
58
23
|
*/
|
|
59
|
-
async function
|
|
60
|
-
if (process.env.CI) return
|
|
24
|
+
async function setup() {
|
|
25
|
+
if (process.env.CI) return;
|
|
61
26
|
|
|
62
27
|
process.env.DEVTOOLS_PATH = devtoolsDir;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
28
|
+
execFileSync('bash',
|
|
29
|
+
['lighthouse-core/test/devtools-tests/download-devtools.sh'],
|
|
30
|
+
{stdio: 'inherit'}
|
|
31
|
+
);
|
|
32
|
+
execFileSync('bash',
|
|
33
|
+
['lighthouse-core/test/devtools-tests/roll-devtools.sh'],
|
|
34
|
+
{stdio: 'inherit'}
|
|
35
|
+
);
|
|
67
36
|
}
|
|
68
37
|
|
|
69
38
|
/**
|
|
@@ -77,37 +46,16 @@ async function buildDevtools(logs) {
|
|
|
77
46
|
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, log: string}>}
|
|
78
47
|
*/
|
|
79
48
|
async function runLighthouse(url, configJson, testRunnerOptions = {}) {
|
|
80
|
-
/** @type {string[]} */
|
|
81
|
-
const logs = [];
|
|
82
|
-
|
|
83
|
-
if (!buildDevtoolsPromise) buildDevtoolsPromise = buildDevtools(logs);
|
|
84
|
-
if (!await buildDevtoolsPromise) {
|
|
85
|
-
const log = logs.join('') + '\n';
|
|
86
|
-
throw new Error(`failed to build devtools:\n${log}`);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const outputDir = fs.mkdtempSync(os.tmpdir() + '/lh-smoke-cdt-runner-');
|
|
90
49
|
const chromeFlags = [
|
|
91
50
|
`--custom-devtools-frontend=file://${devtoolsDir}/out/Default/gen/front_end`,
|
|
92
51
|
];
|
|
93
|
-
const
|
|
94
|
-
'run-devtools',
|
|
95
|
-
url,
|
|
96
|
-
`--chrome-flags=${chromeFlags.join(' ')}`,
|
|
97
|
-
'--output-dir', outputDir,
|
|
98
|
-
];
|
|
99
|
-
if (configJson) {
|
|
100
|
-
args.push('--config', JSON.stringify(configJson));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
await spawnAndLog(logs, 'yarn', args);
|
|
104
|
-
const lhr = JSON.parse(fs.readFileSync(`${outputDir}/lhr-0.json`, 'utf-8'));
|
|
105
|
-
const artifacts = JSON.parse(fs.readFileSync(`${outputDir}/artifacts-0.json`, 'utf-8'));
|
|
52
|
+
const {lhr, artifacts, logs} = await testUrlFromDevtools(url, configJson, chromeFlags);
|
|
106
53
|
|
|
107
54
|
if (testRunnerOptions.isDebug) {
|
|
55
|
+
const outputDir = fs.mkdtempSync(os.tmpdir() + '/lh-smoke-cdt-runner-');
|
|
56
|
+
fs.writeFileSync(`${outputDir}/lhr.json`, JSON.stringify(lhr));
|
|
57
|
+
fs.writeFileSync(`${outputDir}/artifacts.json`, JSON.stringify(artifacts));
|
|
108
58
|
console.log(`${url} results saved at ${outputDir}`);
|
|
109
|
-
} else {
|
|
110
|
-
fs.rmSync(outputDir, {recursive: true, force: true});
|
|
111
59
|
}
|
|
112
60
|
|
|
113
61
|
const log = logs.join('') + '\n';
|
|
@@ -116,4 +64,5 @@ async function runLighthouse(url, configJson, testRunnerOptions = {}) {
|
|
|
116
64
|
|
|
117
65
|
export {
|
|
118
66
|
runLighthouse,
|
|
67
|
+
setup,
|
|
119
68
|
};
|
|
@@ -58,10 +58,19 @@ async function runSmokehouse(smokeTestDefns, smokehouseOptions) {
|
|
|
58
58
|
retries = DEFAULT_RETRIES,
|
|
59
59
|
lighthouseRunner = Object.assign(cliLighthouseRunner, {runnerName: 'cli'}),
|
|
60
60
|
takeNetworkRequestUrls,
|
|
61
|
+
setup,
|
|
61
62
|
} = smokehouseOptions;
|
|
62
63
|
assertPositiveInteger('jobs', jobs);
|
|
63
64
|
assertNonNegativeInteger('retries', retries);
|
|
64
65
|
|
|
66
|
+
try {
|
|
67
|
+
await setup?.();
|
|
68
|
+
} catch (err) {
|
|
69
|
+
console.error(log.redify('\nERROR DURING SETUP:'));
|
|
70
|
+
console.error(log.redify(err.stack || err));
|
|
71
|
+
return {success: false, testResults: []};
|
|
72
|
+
}
|
|
73
|
+
|
|
65
74
|
// Run each testDefn in parallel based on the concurrencyLimit.
|
|
66
75
|
const concurrentMapper = new ConcurrentMapper();
|
|
67
76
|
|
|
@@ -251,7 +260,7 @@ function logChildProcessError(localConsole, err) {
|
|
|
251
260
|
localConsole.adoptStdStrings(err);
|
|
252
261
|
}
|
|
253
262
|
|
|
254
|
-
localConsole.log(log.redify(
|
|
263
|
+
localConsole.log(log.redify(err.stack || err.message));
|
|
255
264
|
}
|
|
256
265
|
|
|
257
266
|
/**
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accesibility audit that evaluates if the accesskey HTML attribute values are unique across all elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -24,7 +25,7 @@ const UIStrings = {
|
|
|
24
25
|
'[Learn more](https://dequeuniversity.com/rules/axe/4.4/accesskeys).',
|
|
25
26
|
};
|
|
26
27
|
|
|
27
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
28
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
28
29
|
|
|
29
30
|
class Accesskeys extends AxeAudit {
|
|
30
31
|
/**
|
|
@@ -41,5 +42,5 @@ class Accesskeys extends AxeAudit {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
export default Accesskeys;
|
|
46
|
+
export {UIStrings};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accesibility audit that evaluates if the ARIA HTML attributes are misaligned with the aria-role HTML attribute specificed on the element, such mismatches are invalid. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -24,7 +25,7 @@ const UIStrings = {
|
|
|
24
25
|
'more](https://dequeuniversity.com/rules/axe/4.4/aria-allowed-attr).',
|
|
25
26
|
};
|
|
26
27
|
|
|
27
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
28
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
28
29
|
|
|
29
30
|
class ARIAAllowedAttr extends AxeAudit {
|
|
30
31
|
/**
|
|
@@ -41,5 +42,5 @@ class ARIAAllowedAttr extends AxeAudit {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
export default ARIAAllowedAttr;
|
|
46
|
+
export {UIStrings};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accessibility audit that evaluates if important HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -22,7 +23,7 @@ const UIStrings = {
|
|
|
22
23
|
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://dequeuniversity.com/rules/axe/4.4/aria-command-name).',
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
26
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
26
27
|
|
|
27
28
|
class AriaCommandName extends AxeAudit {
|
|
28
29
|
/**
|
|
@@ -39,5 +40,5 @@ class AriaCommandName extends AxeAudit {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
export default AriaCommandName;
|
|
44
|
+
export {UIStrings};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accesibility audit that checks if the html <body> element does not have an aria-hidden attribute set on it. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -22,7 +23,7 @@ const UIStrings = {
|
|
|
22
23
|
description: 'Assistive technologies, like screen readers, work inconsistently when `aria-hidden="true"` is set on the document `<body>`. [Learn more](https://dequeuniversity.com/rules/axe/4.4/aria-hidden-body).',
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
26
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
26
27
|
|
|
27
28
|
class AriaHiddenBody extends AxeAudit {
|
|
28
29
|
/**
|
|
@@ -39,5 +40,5 @@ class AriaHiddenBody extends AxeAudit {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
export default AriaHiddenBody;
|
|
44
|
+
export {UIStrings};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accesibility audit that checks if all elements that have an aria-hidden attribute do not contain focusable descendent elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -22,7 +23,7 @@ const UIStrings = {
|
|
|
22
23
|
description: 'Focusable descendents within an `[aria-hidden="true"]` element prevent those interactive elements from being available to users of assistive technologies like screen readers. [Learn more](https://dequeuniversity.com/rules/axe/4.4/aria-hidden-focus).',
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
26
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
26
27
|
|
|
27
28
|
class AriaHiddenFocus extends AxeAudit {
|
|
28
29
|
/**
|
|
@@ -39,5 +40,5 @@ class AriaHiddenFocus extends AxeAudit {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
export default AriaHiddenFocus;
|
|
44
|
+
export {UIStrings};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accesibility audit that checks that all ARIA input fields have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -22,7 +23,7 @@ const UIStrings = {
|
|
|
22
23
|
description: 'When an input field doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://dequeuniversity.com/rules/axe/4.4/aria-input-field-name).',
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
26
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
26
27
|
|
|
27
28
|
class AriaInputFieldName extends AxeAudit {
|
|
28
29
|
/**
|
|
@@ -39,5 +40,5 @@ class AriaInputFieldName extends AxeAudit {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
export default AriaInputFieldName;
|
|
44
|
+
export {UIStrings};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accessibility audit that evaluates if meter HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -22,7 +23,7 @@ const UIStrings = {
|
|
|
22
23
|
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://dequeuniversity.com/rules/axe/4.4/aria-meter-name).',
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
26
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
26
27
|
|
|
27
28
|
class AriaMeterName extends AxeAudit {
|
|
28
29
|
/**
|
|
@@ -39,5 +40,5 @@ class AriaMeterName extends AxeAudit {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
export default AriaMeterName;
|
|
44
|
+
export {UIStrings};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accessibility audit that evaluates if progressbar HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -22,7 +23,7 @@ const UIStrings = {
|
|
|
22
23
|
description: 'When a `progressbar` element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://dequeuniversity.com/rules/axe/4.4/aria-progressbar-name).',
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
26
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
26
27
|
|
|
27
28
|
class AriaProgressbarName extends AxeAudit {
|
|
28
29
|
/**
|
|
@@ -39,5 +40,5 @@ class AriaProgressbarName extends AxeAudit {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
export default AriaProgressbarName;
|
|
44
|
+
export {UIStrings};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* See base class in axe-audit.js for audit() implementation.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import AxeAudit from './axe-audit.js';
|
|
14
|
+
|
|
15
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
15
16
|
|
|
16
17
|
const UIStrings = {
|
|
17
18
|
/** Title of an accesibility audit that evaluates if all elements with the aria-role attribute have the other corresponding ARIA attributes set as well. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
@@ -23,7 +24,7 @@ const UIStrings = {
|
|
|
23
24
|
'of the element to screen readers. [Learn more](https://dequeuniversity.com/rules/axe/4.4/aria-required-attr).',
|
|
24
25
|
};
|
|
25
26
|
|
|
26
|
-
const str_ = i18n.createMessageInstanceIdFn(
|
|
27
|
+
const str_ = i18n.createMessageInstanceIdFn(import.meta.url, UIStrings);
|
|
27
28
|
|
|
28
29
|
class ARIARequiredAttr extends AxeAudit {
|
|
29
30
|
/**
|
|
@@ -40,5 +41,5 @@ class ARIARequiredAttr extends AxeAudit {
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
export default ARIARequiredAttr;
|
|
45
|
+
export {UIStrings};
|