lighthouse 11.1.0-dev.20231002 → 11.1.0-dev.20231004

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 (69) hide show
  1. package/cli/test/smokehouse/__snapshots__/report-assert-test.js.snap +8 -0
  2. package/core/audits/audit.js +21 -11
  3. package/core/audits/bf-cache.js +1 -0
  4. package/core/audits/bootup-time.js +4 -1
  5. package/core/audits/byte-efficiency/byte-efficiency-audit.js +1 -1
  6. package/core/audits/byte-efficiency/duplicated-javascript.js +1 -1
  7. package/core/audits/byte-efficiency/efficient-animated-content.js +1 -1
  8. package/core/audits/byte-efficiency/legacy-javascript.js +1 -1
  9. package/core/audits/byte-efficiency/modern-image-formats.js +1 -1
  10. package/core/audits/byte-efficiency/offscreen-images.js +1 -1
  11. package/core/audits/byte-efficiency/render-blocking-resources.js +2 -3
  12. package/core/audits/byte-efficiency/total-byte-weight.js +3 -1
  13. package/core/audits/byte-efficiency/unminified-css.js +1 -1
  14. package/core/audits/byte-efficiency/unminified-javascript.js +1 -1
  15. package/core/audits/byte-efficiency/unused-css-rules.js +1 -1
  16. package/core/audits/byte-efficiency/unused-javascript.js +1 -1
  17. package/core/audits/byte-efficiency/uses-long-cache-ttl.js +3 -8
  18. package/core/audits/byte-efficiency/uses-optimized-images.js +1 -1
  19. package/core/audits/byte-efficiency/uses-responsive-images-snapshot.js +1 -0
  20. package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
  21. package/core/audits/byte-efficiency/uses-text-compression.js +1 -1
  22. package/core/audits/csp-xss.js +1 -1
  23. package/core/audits/dobetterweb/dom-size.js +3 -1
  24. package/core/audits/dobetterweb/no-document-write.js +1 -0
  25. package/core/audits/dobetterweb/uses-http2.js +2 -3
  26. package/core/audits/dobetterweb/uses-passive-event-listeners.js +1 -0
  27. package/core/audits/font-display.js +1 -0
  28. package/core/audits/installable-manifest.js +2 -2
  29. package/core/audits/largest-contentful-paint-element.js +3 -2
  30. package/core/audits/layout-shift-elements.js +8 -4
  31. package/core/audits/lcp-lazy-loaded.js +1 -0
  32. package/core/audits/long-tasks.js +8 -1
  33. package/core/audits/mainthread-work-breakdown.js +3 -1
  34. package/core/audits/metrics/cumulative-layout-shift.js +4 -1
  35. package/core/audits/metrics/first-contentful-paint.js +1 -0
  36. package/core/audits/metrics/largest-contentful-paint.js +1 -0
  37. package/core/audits/metrics/speed-index.js +1 -0
  38. package/core/audits/metrics/total-blocking-time.js +1 -0
  39. package/core/audits/prioritize-lcp-image.js +2 -3
  40. package/core/audits/redirects.js +2 -3
  41. package/core/audits/server-response-time.js +2 -0
  42. package/core/audits/third-party-facades.js +1 -0
  43. package/core/audits/third-party-summary.js +5 -1
  44. package/core/audits/unsized-images.js +1 -1
  45. package/core/audits/uses-rel-preconnect.js +2 -3
  46. package/core/audits/uses-rel-preload.js +2 -3
  47. package/core/audits/viewport.js +1 -0
  48. package/core/audits/work-during-interaction.js +6 -2
  49. package/core/gather/session.js +2 -0
  50. package/core/lib/csp-evaluator.js +13 -13
  51. package/dist/report/bundle.esm.js +12 -89
  52. package/dist/report/flow.js +17 -94
  53. package/dist/report/standalone.js +13 -90
  54. package/package.json +4 -4
  55. package/report/assets/styles.css +1 -78
  56. package/report/assets/templates.html +0 -35
  57. package/report/renderer/components.d.ts +2 -2
  58. package/report/renderer/components.js +2 -51
  59. package/report/renderer/performance-category-renderer.d.ts +16 -18
  60. package/report/renderer/performance-category-renderer.js +90 -102
  61. package/shared/localization/locales/en-US.json +14 -14
  62. package/shared/localization/locales/en-XL.json +14 -14
  63. package/shared/util.d.ts +22 -0
  64. package/shared/util.js +31 -0
  65. package/types/audit.d.ts +5 -1
  66. package/types/internal/rxjs.d.ts +3 -0
  67. package/types/lhr/audit-result.d.ts +16 -0
  68. /package/{core/lib → shared}/statistics.d.ts +0 -0
  69. /package/{core/lib → shared}/statistics.js +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "11.1.0-dev.20231002",
4
+ "version": "11.1.0-dev.20231004",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -166,7 +166,7 @@
166
166
  "pako": "^2.0.3",
167
167
  "preact": "^10.7.2",
168
168
  "pretty-json-stringify": "^0.0.2",
169
- "puppeteer": "21.1.1",
169
+ "puppeteer": "^21.3.6",
170
170
  "resolve": "^1.22.1",
171
171
  "rollup": "^2.52.7",
172
172
  "rollup-plugin-polyfill-node": "^0.12.0",
@@ -182,7 +182,7 @@
182
182
  "dependencies": {
183
183
  "@sentry/node": "^6.17.4",
184
184
  "axe-core": "^4.8.1",
185
- "chrome-launcher": "^1.0.0",
185
+ "chrome-launcher": "^1.1.0",
186
186
  "configstore": "^5.0.1",
187
187
  "csp_evaluator": "1.1.1",
188
188
  "devtools-protocol": "0.0.1200039",
@@ -199,7 +199,7 @@
199
199
  "open": "^8.4.0",
200
200
  "parse-cache-control": "1.0.1",
201
201
  "ps-list": "^8.0.0",
202
- "puppeteer-core": "21.1.1",
202
+ "puppeteer-core": "^21.3.6",
203
203
  "robots-parser": "^3.0.1",
204
204
  "semver": "^5.3.0",
205
205
  "speedline-core": "^1.4.3",
@@ -131,7 +131,6 @@
131
131
  --section-padding-vertical: calc(var(--default-padding) * 6);
132
132
  --snippet-background-color: var(--color-gray-50);
133
133
  --snippet-color: #0938C2;
134
- --sparkline-height: 5px;
135
134
  --stackpack-padding-horizontal: 10px;
136
135
  --sticky-header-background-color: var(--report-background-color);
137
136
  --sticky-header-buffer: calc(var(--topbar-height) + var(--sticky-header-height));
@@ -238,11 +237,6 @@
238
237
  --topbar-height: 28px;
239
238
  --topbar-logo-size: 20px;
240
239
  }
241
-
242
- /* Not enough space to adequately show the relative savings bars. */
243
- .lh-sparkline {
244
- display: none;
245
- }
246
240
  }
247
241
 
248
242
  .lh-vars.lh-devtools {
@@ -611,7 +605,6 @@
611
605
 
612
606
 
613
607
  .lh-audit__display-text,
614
- .lh-load-opportunity__sparkline,
615
608
  .lh-chevron-container {
616
609
  margin: 0 var(--audit-margin-horizontal);
617
610
  }
@@ -628,14 +621,11 @@
628
621
  font-size: var(--report-monospace-font-size);
629
622
  }
630
623
 
631
- /* Prepend display text with em dash separator. But not in Opportunities. */
624
+ /* Prepend display text with em dash separator. */
632
625
  .lh-audit__display-text:not(:empty):before {
633
626
  content: '—';
634
627
  margin-right: var(--audit-margin-horizontal);
635
628
  }
636
- .lh-audit-group.lh-audit-group--load-opportunities .lh-audit__display-text:not(:empty):before {
637
- display: none;
638
- }
639
629
 
640
630
  /* Expandable Details (Audit Groups, Audits) */
641
631
  .lh-audit__header {
@@ -644,10 +634,6 @@
644
634
  padding: var(--default-padding);
645
635
  }
646
636
 
647
- .lh-audit--load-opportunity .lh-audit__header {
648
- display: block;
649
- }
650
-
651
637
 
652
638
  .lh-metricfilter {
653
639
  display: grid;
@@ -875,68 +861,6 @@
875
861
  color: var(--color-fail-secondary);
876
862
  }
877
863
 
878
- /* Perf load opportunity */
879
-
880
- .lh-load-opportunity__cols {
881
- display: flex;
882
- align-items: flex-start;
883
- }
884
-
885
- .lh-load-opportunity__header .lh-load-opportunity__col {
886
- color: var(--color-gray-600);
887
- display: unset;
888
- line-height: calc(2.3 * var(--report-font-size));
889
- }
890
-
891
- .lh-load-opportunity__col {
892
- display: flex;
893
- }
894
-
895
- .lh-load-opportunity__col--one {
896
- flex: 5;
897
- align-items: center;
898
- margin-right: 2px;
899
- }
900
- .lh-load-opportunity__col--two {
901
- flex: 4;
902
- text-align: right;
903
- }
904
-
905
- .lh-audit--load-opportunity .lh-audit__display-text {
906
- text-align: right;
907
- flex: 0 0 7.5ch;
908
- }
909
-
910
-
911
- /* Sparkline */
912
-
913
- .lh-load-opportunity__sparkline {
914
- flex: 1;
915
- margin-top: calc((var(--report-line-height) - var(--sparkline-height)) / 2);
916
- }
917
-
918
- .lh-sparkline {
919
- height: var(--sparkline-height);
920
- width: 100%;
921
- }
922
-
923
- .lh-sparkline__bar {
924
- height: 100%;
925
- float: right;
926
- }
927
-
928
- .lh-audit--pass .lh-sparkline__bar {
929
- background: var(--color-pass);
930
- }
931
-
932
- .lh-audit--average .lh-sparkline__bar {
933
- background: var(--color-average);
934
- }
935
-
936
- .lh-audit--fail .lh-sparkline__bar {
937
- background: var(--color-fail);
938
- }
939
-
940
864
  /* Filmstrip */
941
865
 
942
866
  .lh-filmstrip-container {
@@ -1078,7 +1002,6 @@
1078
1002
 
1079
1003
  .lh-details,
1080
1004
  .lh-category-header__description,
1081
- .lh-load-opportunity__header,
1082
1005
  .lh-audit-group__footer {
1083
1006
  font-size: var(--report-font-size-secondary);
1084
1007
  line-height: var(--report-line-height-secondary);
@@ -94,41 +94,6 @@ SPDX-License-Identifier: Apache-2.0
94
94
  </div>
95
95
  </template>
96
96
 
97
- <!-- Lighthouse perf opportunity -->
98
- <template id="opportunity">
99
- <div class="lh-audit lh-audit--load-opportunity">
100
- <details class="lh-expandable-details">
101
- <summary>
102
- <div class="lh-audit__header">
103
- <div class="lh-load-opportunity__cols">
104
- <div class="lh-load-opportunity__col lh-load-opportunity__col--one">
105
- <span class="lh-audit__score-icon"></span>
106
- <div class="lh-audit__title"></div>
107
- </div>
108
- <div class="lh-load-opportunity__col lh-load-opportunity__col--two">
109
- <div class="lh-load-opportunity__sparkline">
110
- <div class="lh-sparkline"><div class="lh-sparkline__bar"></div></div>
111
- </div>
112
- <div class="lh-audit__display-text"></div>
113
- <div class="lh-chevron-container"></div>
114
- </div>
115
- </div>
116
- </div>
117
- </summary>
118
- <div class="lh-audit__description"></div>
119
- <div class="lh-audit__stackpacks"></div>
120
- </details>
121
- </div>
122
- </template>
123
-
124
- <!-- Lighthouse perf opportunity header -->
125
- <template id="opportunityHeader">
126
- <div class="lh-load-opportunity__header lh-load-opportunity__cols">
127
- <div class="lh-load-opportunity__col lh-load-opportunity__col--one"></div>
128
- <div class="lh-load-opportunity__col lh-load-opportunity__col--two"></div>
129
- </div>
130
- </template>
131
-
132
97
  <!-- Lighthouse score container -->
133
98
  <template id="scoresWrapper">
134
99
  <style>
@@ -1,4 +1,4 @@
1
- /** @typedef {'3pFilter'|'audit'|'categoryHeader'|'chevron'|'clump'|'crc'|'crcChain'|'elementScreenshot'|'explodeyGauge'|'footer'|'fraction'|'gauge'|'gaugePwa'|'heading'|'metric'|'opportunity'|'opportunityHeader'|'scorescale'|'scoresWrapper'|'snippet'|'snippetContent'|'snippetHeader'|'snippetLine'|'styles'|'topbar'|'warningsToplevel'} ComponentName */
1
+ /** @typedef {'3pFilter'|'audit'|'categoryHeader'|'chevron'|'clump'|'crc'|'crcChain'|'elementScreenshot'|'explodeyGauge'|'footer'|'fraction'|'gauge'|'gaugePwa'|'heading'|'metric'|'scorescale'|'scoresWrapper'|'snippet'|'snippetContent'|'snippetHeader'|'snippetLine'|'styles'|'topbar'|'warningsToplevel'} ComponentName */
2
2
  /**
3
3
  * @param {DOM} dom
4
4
  * @param {ComponentName} componentName
@@ -6,5 +6,5 @@
6
6
  */
7
7
  export function createComponent(dom: DOM, componentName: ComponentName): DocumentFragment;
8
8
  export type DOM = import('./dom.js').DOM;
9
- export type ComponentName = '3pFilter' | 'audit' | 'categoryHeader' | 'chevron' | 'clump' | 'crc' | 'crcChain' | 'elementScreenshot' | 'explodeyGauge' | 'footer' | 'fraction' | 'gauge' | 'gaugePwa' | 'heading' | 'metric' | 'opportunity' | 'opportunityHeader' | 'scorescale' | 'scoresWrapper' | 'snippet' | 'snippetContent' | 'snippetHeader' | 'snippetLine' | 'styles' | 'topbar' | 'warningsToplevel';
9
+ export type ComponentName = '3pFilter' | 'audit' | 'categoryHeader' | 'chevron' | 'clump' | 'crc' | 'crcChain' | 'elementScreenshot' | 'explodeyGauge' | 'footer' | 'fraction' | 'gauge' | 'gaugePwa' | 'heading' | 'metric' | 'scorescale' | 'scoresWrapper' | 'snippet' | 'snippetContent' | 'snippetHeader' | 'snippetLine' | 'styles' | 'topbar' | 'warningsToplevel';
10
10
  //# sourceMappingURL=components.d.ts.map