lighthouse 9.0.0-dev.20211121 → 9.1.0

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 (101) hide show
  1. package/changelog.md +70 -0
  2. package/dist/report/bundle.esm.js +17 -3
  3. package/dist/report/flow.js +34 -23
  4. package/dist/report/standalone.js +3 -3
  5. package/flow-report/api.ts +18 -0
  6. package/flow-report/assets/standalone-flow-template.html +0 -1
  7. package/flow-report/{standalone-flow.tsx → clients/standalone.ts} +4 -5
  8. package/flow-report/src/app.tsx +20 -12
  9. package/flow-report/src/sidebar/flow.tsx +1 -3
  10. package/flow-report/src/sidebar/sidebar.tsx +1 -3
  11. package/flow-report/src/topbar.tsx +22 -13
  12. package/flow-report/src/util.ts +7 -0
  13. package/flow-report/src/wrappers/report.tsx +1 -0
  14. package/flow-report/src/wrappers/styles.tsx +16 -0
  15. package/flow-report/test/topbar-test.tsx +22 -6
  16. package/flow-report/types/flow-report.d.ts +4 -0
  17. package/lighthouse-cli/cli-flags.js +4 -4
  18. package/lighthouse-core/audits/audit.js +39 -7
  19. package/lighthouse-core/audits/byte-efficiency/legacy-javascript.js +1 -26
  20. package/lighthouse-core/audits/deprecations.js +10 -14
  21. package/lighthouse-core/audits/dobetterweb/geolocation-on-start.js +5 -4
  22. package/lighthouse-core/audits/dobetterweb/js-libraries.js +1 -1
  23. package/lighthouse-core/audits/dobetterweb/no-document-write.js +6 -4
  24. package/lighthouse-core/audits/dobetterweb/notification-on-start.js +6 -4
  25. package/lighthouse-core/audits/dobetterweb/uses-passive-event-listeners.js +6 -4
  26. package/lighthouse-core/audits/errors-in-console.js +7 -4
  27. package/lighthouse-core/audits/no-unload-listeners.js +9 -10
  28. package/lighthouse-core/audits/seo/canonical.js +0 -14
  29. package/lighthouse-core/audits/seo/font-size.js +4 -2
  30. package/lighthouse-core/audits/seo/is-crawlable.js +2 -2
  31. package/lighthouse-core/audits/third-party-summary.js +2 -2
  32. package/lighthouse-core/audits/valid-source-maps.js +1 -1
  33. package/lighthouse-core/audits/violation-audit.js +10 -3
  34. package/lighthouse-core/computed/js-bundles.js +1 -3
  35. package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +3 -3
  36. package/lighthouse-core/gather/driver/execution-context.js +1 -1
  37. package/lighthouse-core/gather/gatherers/full-page-screenshot.js +7 -7
  38. package/lighthouse-core/gather/gatherers/stacks.js +0 -3
  39. package/lighthouse-core/lib/stack-packs.js +12 -8
  40. package/lighthouse-core/runner.js +7 -7
  41. package/package.json +4 -6
  42. package/report/generator/file-namer.js +12 -1
  43. package/report/generator/flow-report-assets.js +2 -1
  44. package/report/generator/report-assets.js +2 -5
  45. package/report/generator/report-generator.js +0 -1
  46. package/report/renderer/api.js +15 -1
  47. package/report/renderer/report-renderer.js +4 -1
  48. package/report/renderer/report-ui-features.js +1 -1
  49. package/report/renderer/swap-locale-feature.js +0 -5
  50. package/report/test/clients/bundle-test.js +2 -2
  51. package/report/test/renderer/report-ui-features-test.js +0 -1
  52. package/report/types/report-renderer.d.ts +2 -0
  53. package/shared/localization/locales/ar-XB.json +0 -3
  54. package/shared/localization/locales/ar.json +0 -3
  55. package/shared/localization/locales/bg.json +17 -20
  56. package/shared/localization/locales/ca.json +0 -3
  57. package/shared/localization/locales/cs.json +0 -3
  58. package/shared/localization/locales/da.json +16 -19
  59. package/shared/localization/locales/de.json +0 -3
  60. package/shared/localization/locales/el.json +0 -3
  61. package/shared/localization/locales/en-GB.json +19 -22
  62. package/shared/localization/locales/en-US.json +30 -3
  63. package/shared/localization/locales/en-XA.json +0 -3
  64. package/shared/localization/locales/en-XL.json +30 -3
  65. package/shared/localization/locales/es-419.json +17 -20
  66. package/shared/localization/locales/es.json +0 -3
  67. package/shared/localization/locales/fi.json +16 -19
  68. package/shared/localization/locales/fil.json +33 -36
  69. package/shared/localization/locales/fr.json +16 -19
  70. package/shared/localization/locales/he.json +16 -19
  71. package/shared/localization/locales/hi.json +0 -3
  72. package/shared/localization/locales/hr.json +16 -19
  73. package/shared/localization/locales/hu.json +16 -19
  74. package/shared/localization/locales/id.json +16 -19
  75. package/shared/localization/locales/it.json +37 -40
  76. package/shared/localization/locales/ja.json +16 -19
  77. package/shared/localization/locales/ko.json +16 -19
  78. package/shared/localization/locales/lt.json +17 -20
  79. package/shared/localization/locales/lv.json +0 -3
  80. package/shared/localization/locales/nl.json +16 -19
  81. package/shared/localization/locales/no.json +17 -20
  82. package/shared/localization/locales/pl.json +16 -19
  83. package/shared/localization/locales/pt-PT.json +37 -40
  84. package/shared/localization/locales/pt.json +16 -19
  85. package/shared/localization/locales/ro.json +0 -3
  86. package/shared/localization/locales/ru.json +16 -19
  87. package/shared/localization/locales/sk.json +0 -3
  88. package/shared/localization/locales/sl.json +0 -3
  89. package/shared/localization/locales/sr-Latn.json +16 -19
  90. package/shared/localization/locales/sr.json +16 -19
  91. package/shared/localization/locales/sv.json +17 -20
  92. package/shared/localization/locales/ta.json +0 -3
  93. package/shared/localization/locales/te.json +0 -3
  94. package/shared/localization/locales/th.json +0 -3
  95. package/shared/localization/locales/tr.json +0 -3
  96. package/shared/localization/locales/uk.json +17 -20
  97. package/shared/localization/locales/vi.json +0 -3
  98. package/shared/localization/locales/zh-HK.json +0 -3
  99. package/shared/localization/locales/zh-TW.json +0 -3
  100. package/shared/localization/locales/zh.json +0 -3
  101. package/types/externs.d.ts +5 -24
package/changelog.md CHANGED
@@ -1,3 +1,73 @@
1
+ <a name="9.1.0"></a>
2
+ # 9.1.0 (2021-11-24)
3
+ [Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v9.0.0...v9.1.0)
4
+
5
+ We expect this release to ship in the DevTools of [Chrome 98](https://chromiumdash.appspot.com/schedule), and to PageSpeed Insights within 2 weeks.
6
+
7
+ ## New Contributors
8
+
9
+ Thanks to our new contributors 👽🐷🐰🐯🐻!
10
+
11
+ - @whitep4nth3r
12
+ - Adam Read @adamread
13
+
14
+ ## Notable Changes
15
+
16
+ * If using Next.js, you will now see advice specific to it in some audits ([#13424](https://github.com/GoogleChrome/lighthouse/pull/13424))
17
+
18
+ ## Core
19
+
20
+ * canonical: remove cross-origin check ([#13412](https://github.com/GoogleChrome/lighthouse/pull/13412))
21
+ * add original location to most usages of source-location ([#13393](https://github.com/GoogleChrome/lighthouse/pull/13393))
22
+ * mindfully order properties in the lhr ([#13418](https://github.com/GoogleChrome/lighthouse/pull/13418))
23
+ * ensure log-normal score is always in correct range ([#13392](https://github.com/GoogleChrome/lighthouse/pull/13392))
24
+ * installable-manifest: pipeline-restarted check ([#13365](https://github.com/GoogleChrome/lighthouse/pull/13365))
25
+
26
+ ## Report
27
+
28
+ * remove margin when saving html in standalone report ([#13409](https://github.com/GoogleChrome/lighthouse/pull/13409))
29
+ * consistent red display text ([#13391](https://github.com/GoogleChrome/lighthouse/pull/13391))
30
+ * treemap: correct percentages when 0 bytes JS ([#13382](https://github.com/GoogleChrome/lighthouse/pull/13382))
31
+
32
+ ## ⛏️👷 Fraggle Rock
33
+
34
+ Support for auditing user flows ([#11313](https://github.com/GoogleChrome/lighthouse/issues/11313))
35
+
36
+ * rebaseline sample ([#13358](https://github.com/GoogleChrome/lighthouse/pull/13358))
37
+ * report api ([#13374](https://github.com/GoogleChrome/lighthouse/pull/13374))
38
+
39
+ ## Deps
40
+
41
+ * remove browserify ([#13417](https://github.com/GoogleChrome/lighthouse/pull/13417))
42
+ * update to typescript 4.5 ([#13399](https://github.com/GoogleChrome/lighthouse/pull/13399))
43
+ * snyk: update snyk snapshot ([#13388](https://github.com/GoogleChrome/lighthouse/pull/13388))
44
+
45
+ ## Clients
46
+
47
+ * devtools: remove report.css ([#13377](https://github.com/GoogleChrome/lighthouse/pull/13377))
48
+ * viewer: add support for flow reports ([#13260](https://github.com/GoogleChrome/lighthouse/pull/13260))
49
+
50
+ ## I18n
51
+
52
+ * import ([#13427](https://github.com/GoogleChrome/lighthouse/pull/13427))
53
+
54
+ ## Docs
55
+
56
+ * example to save flow as json ([#13415](https://github.com/GoogleChrome/lighthouse/pull/13415))
57
+ * throttling: clarify throttle npm name ([#13371](https://github.com/GoogleChrome/lighthouse/pull/13371))
58
+
59
+ ## Tests
60
+
61
+ * fix undefined HTMLInputElement in bundle-test ([#13421](https://github.com/GoogleChrome/lighthouse/pull/13421))
62
+ * make inline-fs-test not reliant on cwd ([#13420](https://github.com/GoogleChrome/lighthouse/pull/13420))
63
+ * increase timeout for axe test ([#13386](https://github.com/GoogleChrome/lighthouse/pull/13386))
64
+
65
+ ## Misc
66
+
67
+ * build: replace browserify with rollup ([#13416](https://github.com/GoogleChrome/lighthouse/pull/13416), [#13406](https://github.com/GoogleChrome/lighthouse/pull/13406), [#13407](https://github.com/GoogleChrome/lighthouse/pull/13407), [#13408](https://github.com/GoogleChrome/lighthouse/pull/13408))
68
+ * build: prevent over optimization of computeBenchmarkIndex ([#13366](https://github.com/GoogleChrome/lighthouse/pull/13366))
69
+ * treemap: remove postMessage. refactor options input ([#13356](https://github.com/GoogleChrome/lighthouse/pull/13356))
70
+
1
71
  <a name="9.0.0"></a>
2
72
  # 9.0.0 (2021-11-15)
3
73
  [Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v8.6.0...v9.0.0)
@@ -4542,6 +4542,7 @@ class PwaCategoryRenderer extends CategoryRenderer {
4542
4542
  * (this is handled by terser)
4543
4543
  */
4544
4544
 
4545
+
4545
4546
  class ReportRenderer {
4546
4547
  /**
4547
4548
  * @param {DOM} dom
@@ -4835,7 +4836,9 @@ class ReportRenderer {
4835
4836
  categoryRenderer.injectFinalScreenshot(categories, report.audits, scoreScale);
4836
4837
 
4837
4838
  const reportFragment = this._dom.createFragment();
4838
- reportFragment.append(this._dom.createComponent('styles'));
4839
+ if (!this._opts.omitGlobalStyles) {
4840
+ reportFragment.append(this._dom.createComponent('styles'));
4841
+ }
4839
4842
 
4840
4843
  if (!this._opts.omitTopbar) {
4841
4844
  reportFragment.appendChild(this._renderReportTopbar(report));
@@ -5652,7 +5655,18 @@ function getLhrFilenamePrefix(lhr) {
5652
5655
  return getFilenamePrefix(hostname, lhr.fetchTime);
5653
5656
  }
5654
5657
 
5655
- var fileNamer = {getLhrFilenamePrefix, getFilenamePrefix};
5658
+ /**
5659
+ * Generate a filenamePrefix of name_YYYY-MM-DD_HH-MM-SS.
5660
+ * @param {{name: string, steps: Array<{lhr: {fetchTime: string}}>}} flowResult
5661
+ * @return {string}
5662
+ */
5663
+ function getFlowResultFilenamePrefix(flowResult) {
5664
+ const lhr = flowResult.steps[0].lhr;
5665
+ const name = flowResult.name.replace(/\s/g, '-');
5666
+ return getFilenamePrefix(name, lhr.fetchTime);
5667
+ }
5668
+
5669
+ var fileNamer = {getLhrFilenamePrefix, getFilenamePrefix, getFlowResultFilenamePrefix};
5656
5670
 
5657
5671
  /**
5658
5672
  * @license
@@ -5795,7 +5809,7 @@ class ReportUIFeatures {
5795
5809
  if (this._topbar) {
5796
5810
  this._topbar.resetUIState();
5797
5811
  }
5798
- return `<!doctype html><body>${this._dom.rootEl.outerHTML}`;
5812
+ return `<!doctype html><body style="margin: 0">${this._dom.rootEl.outerHTML}`;
5799
5813
  }
5800
5814
 
5801
5815
  /**