lighthouse 9.5.0-dev.20220628 → 9.5.0-dev.20220701

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.
Files changed (84) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/dist/report/bundle.esm.js +7 -6
  3. package/dist/report/flow.js +24 -24
  4. package/dist/report/standalone.js +19 -19
  5. package/{eslint-local-rules.js → eslint-local-rules.cjs} +0 -0
  6. package/flow-report/test/common-test.tsx +5 -4
  7. package/flow-report/test/flow-report-pptr-test.ts +4 -7
  8. package/flow-report/test/run-flow-report-tests.sh +20 -0
  9. package/flow-report/test/setup/env-setup.ts +44 -24
  10. package/flow-report/test/sidebar/sidebar-test.tsx +0 -1
  11. package/flow-report/test/topbar-test.tsx +5 -5
  12. package/flow-report/test/util-test.tsx +3 -3
  13. package/flow-report/tsconfig.json +4 -1
  14. package/lighthouse-cli/cli-flags.js +313 -305
  15. package/lighthouse-cli/run.js +1 -1
  16. package/lighthouse-cli/test/smokehouse/report-assert-test.js +1 -1
  17. package/lighthouse-core/audits/byte-efficiency/uses-responsive-images.js +30 -5
  18. package/lighthouse-core/audits/final-screenshot.js +2 -2
  19. package/lighthouse-core/audits/screenshot-thumbnails.js +6 -6
  20. package/lighthouse-core/audits/work-during-interaction.js +3 -3
  21. package/lighthouse-core/computed/metrics/cumulative-layout-shift.js +3 -3
  22. package/lighthouse-core/computed/metrics/first-meaningful-paint.js +2 -2
  23. package/lighthouse-core/computed/metrics/interactive.js +5 -5
  24. package/lighthouse-core/computed/metrics/lantern-first-meaningful-paint.js +3 -3
  25. package/lighthouse-core/computed/metrics/lantern-largest-contentful-paint.js +3 -3
  26. package/lighthouse-core/computed/metrics/largest-contentful-paint-all-frames.js +2 -2
  27. package/lighthouse-core/computed/metrics/largest-contentful-paint.js +2 -2
  28. package/lighthouse-core/computed/speedline.js +4 -4
  29. package/lighthouse-core/config/config-plugin.js +26 -0
  30. package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +1 -0
  31. package/lighthouse-core/fraggle-rock/gather/session.js +3 -2
  32. package/lighthouse-core/gather/connections/connection.js +2 -2
  33. package/lighthouse-core/gather/driver/wait-for-condition.js +3 -3
  34. package/lighthouse-core/gather/driver.js +3 -2
  35. package/lighthouse-core/gather/gather-runner.js +2 -1
  36. package/lighthouse-core/gather/gatherers/main-document-content.js +0 -2
  37. package/lighthouse-core/lib/asset-saver.js +6 -6
  38. package/lighthouse-core/lib/lh-env.js +1 -1
  39. package/lighthouse-core/lib/lh-error.js +5 -5
  40. package/lighthouse-core/lib/lh-trace-processor.js +6 -6
  41. package/lighthouse-core/lib/navigation-error.js +34 -14
  42. package/lighthouse-core/lib/sentry.js +3 -3
  43. package/lighthouse-core/lib/url-shim.js +2 -2
  44. package/lighthouse-core/runner.js +6 -4
  45. package/lighthouse-core/util-commonjs.js +7 -6
  46. package/package.json +24 -19
  47. package/report/renderer/util.js +7 -6
  48. package/report/test/clients/bundle-test.js +4 -4
  49. package/report/test/generator/report-generator-test.js +3 -1
  50. package/report/test/renderer/category-renderer-test.js +3 -3
  51. package/report/test/renderer/components-test.js +36 -34
  52. package/report/test/renderer/crc-details-renderer-test.js +2 -2
  53. package/report/test/renderer/details-renderer-test.js +2 -2
  54. package/report/test/renderer/dom-test.js +4 -4
  55. package/report/test/renderer/element-screenshot-renderer-test.js +3 -2
  56. package/report/test/renderer/performance-category-renderer-test.js +4 -4
  57. package/report/test/renderer/pwa-category-renderer-test.js +3 -3
  58. package/report/test/renderer/report-renderer-axe-test.js +6 -8
  59. package/report/test/renderer/report-renderer-test.js +5 -5
  60. package/report/test/renderer/report-ui-features-test.js +8 -8
  61. package/report/test/renderer/snippet-renderer-test.js +2 -2
  62. package/report/test/renderer/text-encoding-test.js +2 -2
  63. package/report/test/renderer/util-test.js +1 -1
  64. package/root.js +0 -18
  65. package/shared/localization/format.js +1 -1
  66. package/shared/localization/locales/en-US.json +3 -0
  67. package/shared/localization/locales/en-XL.json +3 -0
  68. package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +1 -1
  69. package/third-party/chromium-synchronization/installability-errors-test.js +1 -3
  70. package/third-party/devtools-tests/README.md +2 -2
  71. package/third-party/devtools-tests/e2e/lighthouse/BUILD.gn +17 -0
  72. package/third-party/devtools-tests/e2e/resources/lighthouse/BUILD.gn +9 -0
  73. package/tsconfig.json +1 -1
  74. package/types/global-lh.d.ts +2 -2
  75. package/types/test.d.ts +53 -0
  76. package/flow-report/.eslintrc.cjs +0 -51
  77. package/flow-report/jest.config.js +0 -24
  78. package/flow-report/test/setup/global-setup.ts +0 -11
  79. package/jest.config.js +0 -30
  80. package/lighthouse-cli/.eslintrc.cjs +0 -28
  81. package/report/.eslintrc.cjs +0 -37
  82. package/report/test/.eslintrc.cjs +0 -11
  83. package/shared/test/localization/.eslintrc.cjs +0 -11
  84. package/types/jest.d.ts +0 -25
package/CONTRIBUTING.md CHANGED
@@ -8,7 +8,7 @@ We tag issues that are good candidates for those new to the code with [`good fir
8
8
 
9
9
  ## Follow the coding style
10
10
 
11
- The `.eslintrc.js` file defines all. We use [JSDoc](http://usejsdoc.org/) with [TypeScript `checkJs`](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc). Annotations are encouraged for all contributions.
11
+ The `.eslintrc.cjs` file defines all. We use [JSDoc](http://usejsdoc.org/) with [TypeScript `checkJs`](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc). Annotations are encouraged for all contributions.
12
12
 
13
13
  ## Learn about the architecture
14
14
 
@@ -568,15 +568,16 @@ class Util {
568
568
  */
569
569
  Util.reportJson = null;
570
570
 
571
+ let svgSuffix = 0;
571
572
  /**
572
573
  * An always-increasing counter for making unique SVG ID suffixes.
573
574
  */
574
- Util.getUniqueSuffix = (() => {
575
- let svgSuffix = 0;
576
- return function() {
577
- return svgSuffix++;
578
- };
579
- })();
575
+ Util.getUniqueSuffix = () => {
576
+ return svgSuffix++;
577
+ };
578
+ Util.resetUniqueSuffix = () => {
579
+ svgSuffix = 0;
580
+ };
580
581
 
581
582
  /**
582
583
  * Report-renderer-specific strings.