lighthouse 12.8.2-dev.20251004 → 12.8.2-dev.20251006

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 (126) hide show
  1. package/cli/test/smokehouse/config/exclusions.js +0 -2
  2. package/core/audits/audit.js +0 -1
  3. package/core/audits/insights/cls-culprits-insight.js +1 -1
  4. package/core/audits/insights/dom-size-insight.js +6 -6
  5. package/core/audits/redirects.js +1 -0
  6. package/core/audits/server-response-time.d.ts +0 -5
  7. package/core/audits/server-response-time.js +12 -26
  8. package/core/computed/metrics/lcp-breakdown.js +1 -0
  9. package/core/config/default-config.js +20 -63
  10. package/core/config/experimental-config.js +1 -26
  11. package/core/config/filters.js +6 -9
  12. package/core/config/lr-desktop-config.js +0 -1
  13. package/core/config/lr-mobile-config.js +0 -1
  14. package/core/gather/gatherers/trace-elements.js +1 -0
  15. package/core/lib/proto-preprocessor.js +5 -22
  16. package/dist/report/bundle.esm.js +10 -49
  17. package/dist/report/flow.js +12 -51
  18. package/dist/report/standalone.js +11 -50
  19. package/flow-report/src/i18n/i18n.d.ts +4 -6
  20. package/package.json +3 -3
  21. package/report/assets/styles.css +0 -39
  22. package/report/renderer/api.js +0 -1
  23. package/report/renderer/category-renderer.js +6 -0
  24. package/report/renderer/components.js +1 -1
  25. package/report/renderer/dom.d.ts +0 -13
  26. package/report/renderer/dom.js +0 -38
  27. package/report/renderer/performance-category-renderer.d.ts +0 -26
  28. package/report/renderer/performance-category-renderer.js +10 -142
  29. package/report/renderer/report-ui-features.d.ts +0 -1
  30. package/report/renderer/report-ui-features.js +3 -13
  31. package/report/renderer/report-utils.d.ts +2 -3
  32. package/report/renderer/report-utils.js +4 -6
  33. package/report/types/report-renderer.d.ts +0 -6
  34. package/shared/localization/locales/ar-XB.json +0 -330
  35. package/shared/localization/locales/ar.json +0 -330
  36. package/shared/localization/locales/bg.json +0 -330
  37. package/shared/localization/locales/ca.json +0 -330
  38. package/shared/localization/locales/cs.json +0 -330
  39. package/shared/localization/locales/da.json +0 -330
  40. package/shared/localization/locales/de.json +0 -330
  41. package/shared/localization/locales/el.json +0 -330
  42. package/shared/localization/locales/en-GB.json +0 -330
  43. package/shared/localization/locales/en-US.json +26 -275
  44. package/shared/localization/locales/en-XA.json +0 -330
  45. package/shared/localization/locales/en-XL.json +26 -275
  46. package/shared/localization/locales/es-419.json +0 -330
  47. package/shared/localization/locales/es.json +0 -330
  48. package/shared/localization/locales/fi.json +0 -330
  49. package/shared/localization/locales/fil.json +0 -330
  50. package/shared/localization/locales/fr.json +0 -330
  51. package/shared/localization/locales/he.json +0 -330
  52. package/shared/localization/locales/hi.json +0 -330
  53. package/shared/localization/locales/hr.json +0 -330
  54. package/shared/localization/locales/hu.json +0 -330
  55. package/shared/localization/locales/id.json +0 -330
  56. package/shared/localization/locales/it.json +0 -330
  57. package/shared/localization/locales/ja.json +0 -330
  58. package/shared/localization/locales/ko.json +0 -330
  59. package/shared/localization/locales/lt.json +0 -330
  60. package/shared/localization/locales/lv.json +0 -330
  61. package/shared/localization/locales/nl.json +0 -330
  62. package/shared/localization/locales/no.json +0 -330
  63. package/shared/localization/locales/pl.json +0 -330
  64. package/shared/localization/locales/pt-PT.json +0 -330
  65. package/shared/localization/locales/pt.json +0 -330
  66. package/shared/localization/locales/ro.json +0 -330
  67. package/shared/localization/locales/ru.json +0 -330
  68. package/shared/localization/locales/sk.json +0 -330
  69. package/shared/localization/locales/sl.json +0 -330
  70. package/shared/localization/locales/sr-Latn.json +0 -330
  71. package/shared/localization/locales/sr.json +0 -330
  72. package/shared/localization/locales/sv.json +0 -330
  73. package/shared/localization/locales/ta.json +0 -330
  74. package/shared/localization/locales/te.json +0 -330
  75. package/shared/localization/locales/th.json +0 -330
  76. package/shared/localization/locales/tr.json +0 -330
  77. package/shared/localization/locales/uk.json +0 -330
  78. package/shared/localization/locales/vi.json +0 -330
  79. package/shared/localization/locales/zh-HK.json +0 -330
  80. package/shared/localization/locales/zh-TW.json +0 -330
  81. package/shared/localization/locales/zh.json +0 -330
  82. package/types/artifacts.d.ts +1 -0
  83. package/types/audit.d.ts +1 -1
  84. package/types/lhr/settings.d.ts +1 -1
  85. package/core/audits/byte-efficiency/duplicated-javascript.d.ts +0 -45
  86. package/core/audits/byte-efficiency/duplicated-javascript.js +0 -223
  87. package/core/audits/byte-efficiency/efficient-animated-content.d.ts +0 -22
  88. package/core/audits/byte-efficiency/efficient-animated-content.js +0 -93
  89. package/core/audits/byte-efficiency/legacy-javascript.d.ts +0 -28
  90. package/core/audits/byte-efficiency/legacy-javascript.js +0 -144
  91. package/core/audits/byte-efficiency/modern-image-formats.d.ts +0 -38
  92. package/core/audits/byte-efficiency/modern-image-formats.js +0 -187
  93. package/core/audits/byte-efficiency/render-blocking-resources.d.ts +0 -53
  94. package/core/audits/byte-efficiency/render-blocking-resources.js +0 -312
  95. package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +0 -59
  96. package/core/audits/byte-efficiency/uses-long-cache-ttl.js +0 -293
  97. package/core/audits/byte-efficiency/uses-optimized-images.d.ts +0 -33
  98. package/core/audits/byte-efficiency/uses-optimized-images.js +0 -146
  99. package/core/audits/byte-efficiency/uses-responsive-images-snapshot.d.ts +0 -16
  100. package/core/audits/byte-efficiency/uses-responsive-images-snapshot.js +0 -106
  101. package/core/audits/byte-efficiency/uses-responsive-images.d.ts +0 -44
  102. package/core/audits/byte-efficiency/uses-responsive-images.js +0 -202
  103. package/core/audits/byte-efficiency/uses-text-compression.d.ts +0 -14
  104. package/core/audits/byte-efficiency/uses-text-compression.js +0 -108
  105. package/core/audits/critical-request-chains.d.ts +0 -44
  106. package/core/audits/critical-request-chains.js +0 -221
  107. package/core/audits/dobetterweb/dom-size.d.ts +0 -32
  108. package/core/audits/dobetterweb/dom-size.js +0 -182
  109. package/core/audits/dobetterweb/uses-http2.d.ts +0 -72
  110. package/core/audits/dobetterweb/uses-http2.js +0 -276
  111. package/core/audits/font-display.d.ts +0 -32
  112. package/core/audits/font-display.js +0 -195
  113. package/core/audits/largest-contentful-paint-element.d.ts +0 -34
  114. package/core/audits/largest-contentful-paint-element.js +0 -181
  115. package/core/audits/lcp-lazy-loaded.d.ts +0 -22
  116. package/core/audits/lcp-lazy-loaded.js +0 -115
  117. package/core/audits/prioritize-lcp-image.d.ts +0 -74
  118. package/core/audits/prioritize-lcp-image.js +0 -297
  119. package/core/audits/third-party-summary.d.ts +0 -78
  120. package/core/audits/third-party-summary.js +0 -236
  121. package/core/audits/uses-rel-preconnect.d.ts +0 -37
  122. package/core/audits/uses-rel-preconnect.js +0 -286
  123. package/core/audits/viewport.d.ts +0 -17
  124. package/core/audits/viewport.js +0 -87
  125. package/core/audits/work-during-interaction.d.ts +0 -81
  126. package/core/audits/work-during-interaction.js +0 -287
@@ -647,45 +647,12 @@
647
647
  "core/audits/bootup-time.js | title": {
648
648
  "message": "JavaScript 执行用时"
649
649
  },
650
- "core/audits/byte-efficiency/duplicated-javascript.js | description": {
651
- "message": "从软件包中移除重复的大型 JavaScript 模块可减少网络传输时不必要的流量消耗。 "
652
- },
653
- "core/audits/byte-efficiency/duplicated-javascript.js | title": {
654
- "message": "请移除 JavaScript 软件包中的重复模块"
655
- },
656
- "core/audits/byte-efficiency/efficient-animated-content.js | description": {
657
- "message": "使用大型 GIF 提供动画内容会导致效率低下。建议您改用 MPEG4/WebM 视频(来提供动画)和 PNG/WebP(来提供静态图片)以减少网络活动消耗的字节数。[详细了解高效视频格式](https://developer.chrome.com/docs/lighthouse/performance/efficient-animated-content/)"
658
- },
659
- "core/audits/byte-efficiency/efficient-animated-content.js | title": {
660
- "message": "使用视频格式提供动画内容"
661
- },
662
- "core/audits/byte-efficiency/legacy-javascript.js | description": {
663
- "message": "Polyfill 和 transform 让旧版浏览器能够使用新的 JavaScript 功能。不过,很多功能对现代浏览器而言并不是必需的。请考虑修改 JavaScript 构建流程,以便不转译 [Baseline](https://web.dev/baseline) 功能,除非您知道必须支持旧版浏览器。[了解为什么大多数网站可以部署 ES6+ 代码而无需转译](https://philipwalton.com/articles/the-state-of-es5-on-the-web/)"
664
- },
665
- "core/audits/byte-efficiency/legacy-javascript.js | detectedCoreJs2Warning": {
666
- "message": "在网页上检测到 core-js 的版本 2。您应该升级到版本 3,以获取诸多性能改进。"
667
- },
668
- "core/audits/byte-efficiency/legacy-javascript.js | title": {
669
- "message": "应避免向新型浏览器提供旧版 JavaScript"
670
- },
671
- "core/audits/byte-efficiency/modern-image-formats.js | description": {
672
- "message": "WebP 和 AVIF 等图片格式的压缩效果通常优于 PNG 或 JPEG,因而下载速度更快,消耗的数据流量更少。[详细了解现代图片格式](https://developer.chrome.com/docs/lighthouse/performance/uses-webp-images/)。"
673
- },
674
- "core/audits/byte-efficiency/modern-image-formats.js | title": {
675
- "message": "采用新一代格式提供图片"
676
- },
677
650
  "core/audits/byte-efficiency/offscreen-images.js | description": {
678
651
  "message": "建议您在所有关键资源加载完毕后再加载屏幕外图片和处于隐藏状态的图片,从而缩短 Time to Interactive。[了解如何推迟加载屏幕外图片](https://developer.chrome.com/docs/lighthouse/performance/offscreen-images/)。"
679
652
  },
680
653
  "core/audits/byte-efficiency/offscreen-images.js | title": {
681
654
  "message": "推迟加载屏幕外图片"
682
655
  },
683
- "core/audits/byte-efficiency/render-blocking-resources.js | description": {
684
- "message": "资源阻止了系统对您网页的首次绘制。建议以内嵌方式提供关键的 JS/CSS,并推迟提供所有非关键的 JS/样式。[了解如何移除阻塞渲染的资源](https://developer.chrome.com/docs/lighthouse/performance/render-blocking-resources/)。"
685
- },
686
- "core/audits/byte-efficiency/render-blocking-resources.js | title": {
687
- "message": "移除阻塞渲染的资源"
688
- },
689
656
  "core/audits/byte-efficiency/total-byte-weight.js | description": {
690
657
  "message": "网络载荷过大不仅会让用户付出真金白银,还极有可能会延长加载用时。[了解如何缩减载荷大小](https://developer.chrome.com/docs/lighthouse/performance/total-byte-weight/)。"
691
658
  },
@@ -722,48 +689,6 @@
722
689
  "core/audits/byte-efficiency/unused-javascript.js | title": {
723
690
  "message": "减少未使用的 JavaScript"
724
691
  },
725
- "core/audits/byte-efficiency/uses-long-cache-ttl.js | description": {
726
- "message": "延长缓存期限可加快重访您网页的速度。[详细了解高效缓存政策](https://developer.chrome.com/docs/lighthouse/performance/uses-long-cache-ttl/)。"
727
- },
728
- "core/audits/byte-efficiency/uses-long-cache-ttl.js | displayValue": {
729
- "message": "{itemCount,plural, =1{找到了 1 项资源}other{找到了 # 项资源}}"
730
- },
731
- "core/audits/byte-efficiency/uses-long-cache-ttl.js | failureTitle": {
732
- "message": "采用高效的缓存策略提供静态资源"
733
- },
734
- "core/audits/byte-efficiency/uses-long-cache-ttl.js | title": {
735
- "message": "针对静态资源使用高效的缓存策略"
736
- },
737
- "core/audits/byte-efficiency/uses-optimized-images.js | description": {
738
- "message": "经过优化的图片有助于提升加载速度,并减少消耗的移动数据网络流量。[了解如何高效地对图片进行编码](https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/)。"
739
- },
740
- "core/audits/byte-efficiency/uses-optimized-images.js | title": {
741
- "message": "对图片进行高效编码"
742
- },
743
- "core/audits/byte-efficiency/uses-responsive-images-snapshot.js | columnActualDimensions": {
744
- "message": "实际尺寸"
745
- },
746
- "core/audits/byte-efficiency/uses-responsive-images-snapshot.js | columnDisplayedDimensions": {
747
- "message": "显示时的尺寸"
748
- },
749
- "core/audits/byte-efficiency/uses-responsive-images-snapshot.js | failureTitle": {
750
- "message": "图片大于其显示时的尺寸"
751
- },
752
- "core/audits/byte-efficiency/uses-responsive-images-snapshot.js | title": {
753
- "message": "图片适合其显示时的尺寸"
754
- },
755
- "core/audits/byte-efficiency/uses-responsive-images.js | description": {
756
- "message": "提供大小合适的图片可节省移动数据网络流量并缩短加载用时。[了解如何调整图片大小](https://developer.chrome.com/docs/lighthouse/performance/uses-responsive-images/)。"
757
- },
758
- "core/audits/byte-efficiency/uses-responsive-images.js | title": {
759
- "message": "适当调整图片大小"
760
- },
761
- "core/audits/byte-efficiency/uses-text-compression.js | description": {
762
- "message": "对于文本资源,应先压缩(gzip、deflate 或 brotli),然后再提供,以最大限度地减少网络活动消耗的字节总数。[详细了解文本压缩](https://developer.chrome.com/docs/lighthouse/performance/uses-text-compression/)。"
763
- },
764
- "core/audits/byte-efficiency/uses-text-compression.js | title": {
765
- "message": "启用文本压缩"
766
- },
767
692
  "core/audits/clickjacking-mitigation.js | columnSeverity": {
768
693
  "message": "严重程度"
769
694
  },
@@ -776,15 +701,6 @@
776
701
  "core/audits/clickjacking-mitigation.js | title": {
777
702
  "message": "使用 XFO 或 CSP 缓解点击劫持问题"
778
703
  },
779
- "core/audits/critical-request-chains.js | description": {
780
- "message": "下面的关键请求链显示了以高优先级加载的资源。建议缩短链长、缩减资源的下载文件大小,或者推迟下载不必要的资源,从而提高网页加载速度。[了解如何避免链接关键请求](https://developer.chrome.com/docs/lighthouse/performance/critical-request-chains/)。"
781
- },
782
- "core/audits/critical-request-chains.js | displayValue": {
783
- "message": "{itemCount,plural, =1{找到了 1 条请求链}other{找到了 # 条请求链}}"
784
- },
785
- "core/audits/critical-request-chains.js | title": {
786
- "message": "避免链接关键请求"
787
- },
788
704
  "core/audits/csp-xss.js | columnDirective": {
789
705
  "message": "指令"
790
706
  },
@@ -860,33 +776,6 @@
860
776
  "core/audits/dobetterweb/doctype.js | title": {
861
777
  "message": "页面包含 HTML DOCTYPE"
862
778
  },
863
- "core/audits/dobetterweb/dom-size.js | columnStatistic": {
864
- "message": "统计信息"
865
- },
866
- "core/audits/dobetterweb/dom-size.js | columnValue": {
867
- "message": "值"
868
- },
869
- "core/audits/dobetterweb/dom-size.js | description": {
870
- "message": "大型 DOM 会增加内存用量、导致[样式计算](https://developers.google.com/web/fundamentals/performance/rendering/reduce-the-scope-and-complexity-of-style-calculations)用时延长,并产生高昂的[布局自动重排](https://developers.google.com/speed/articles/reflow)成本。[了解如何避免 DOM 规模过大](https://developer.chrome.com/docs/lighthouse/performance/dom-size/)。"
871
- },
872
- "core/audits/dobetterweb/dom-size.js | displayValue": {
873
- "message": "{itemCount,plural, =1{1 个元素}other{# 个元素}}"
874
- },
875
- "core/audits/dobetterweb/dom-size.js | failureTitle": {
876
- "message": "避免 DOM 规模过大"
877
- },
878
- "core/audits/dobetterweb/dom-size.js | statisticDOMDepth": {
879
- "message": "最大 DOM 深度"
880
- },
881
- "core/audits/dobetterweb/dom-size.js | statisticDOMElements": {
882
- "message": "DOM 元素总数"
883
- },
884
- "core/audits/dobetterweb/dom-size.js | statisticDOMWidth": {
885
- "message": "子元素数量最大值"
886
- },
887
- "core/audits/dobetterweb/dom-size.js | title": {
888
- "message": "避免 DOM 规模过大"
889
- },
890
779
  "core/audits/dobetterweb/geolocation-on-start.js | description": {
891
780
  "message": "如果网站在缺少上下文的情况下请求位置信息,会导致用户不信任网站或感到困惑。建议将请求与用户操作进行绑定。[详细了解地理定位权限](https://developer.chrome.com/docs/lighthouse/best-practices/geolocation-on-start/)。"
892
781
  },
@@ -950,18 +839,6 @@
950
839
  "core/audits/dobetterweb/paste-preventing-inputs.js | title": {
951
840
  "message": "允许用户将内容粘贴到输入字段中"
952
841
  },
953
- "core/audits/dobetterweb/uses-http2.js | columnProtocol": {
954
- "message": "协议"
955
- },
956
- "core/audits/dobetterweb/uses-http2.js | description": {
957
- "message": "HTTP/2 提供了许多优于 HTTP/1.1 的益处,包括二进制标头和多路复用。[详细了解 HTTP/2](https://developer.chrome.com/docs/lighthouse/best-practices/uses-http2/)。"
958
- },
959
- "core/audits/dobetterweb/uses-http2.js | displayValue": {
960
- "message": "{itemCount,plural, =1{1 条请求未通过 HTTP/2 传送}other{# 条请求未通过 HTTP/2 传送}}"
961
- },
962
- "core/audits/dobetterweb/uses-http2.js | title": {
963
- "message": "使用 HTTP/2"
964
- },
965
842
  "core/audits/dobetterweb/uses-passive-event-listeners.js | description": {
966
843
  "message": "建议您将轻触和滚轮事件监听器标记为 `passive`,以提高页面的滚动性能。[详细了解如何采用被动事件监听器](https://developer.chrome.com/docs/lighthouse/best-practices/uses-passive-event-listeners/)。"
967
844
  },
@@ -980,18 +857,6 @@
980
857
  "core/audits/errors-in-console.js | title": {
981
858
  "message": "控制台日志中未记录浏览器错误"
982
859
  },
983
- "core/audits/font-display.js | description": {
984
- "message": "利用 `font-display` CSS 功能来确保用户在网页字体加载期间能看到文字。[详细了解 `font-display`](https://developer.chrome.com/docs/lighthouse/performance/font-display/)。"
985
- },
986
- "core/audits/font-display.js | failureTitle": {
987
- "message": "确保文本在网页字体加载期间保持可见状态"
988
- },
989
- "core/audits/font-display.js | title": {
990
- "message": "在网页字体加载期间,所有文本都保持可见状态"
991
- },
992
- "core/audits/font-display.js | undeclaredFontOriginWarning": {
993
- "message": "{fontCountForOrigin,plural, =1{Lighthouse 无法自动检查源 {fontOrigin} 的 `font-display` 值。}other{Lighthouse 无法自动检查源 {fontOrigin} 的 `font-display` 值。}}"
994
- },
995
860
  "core/audits/has-hsts.js | columnDirective": {
996
861
  "message": "指令"
997
862
  },
@@ -1088,63 +953,6 @@
1088
953
  "core/audits/is-on-https.js | warning": {
1089
954
  "message": "允许(附带警告)"
1090
955
  },
1091
- "core/audits/largest-contentful-paint-element.js | columnPercentOfLCP": {
1092
- "message": "LCP 占比 (%)"
1093
- },
1094
- "core/audits/largest-contentful-paint-element.js | columnPhase": {
1095
- "message": "阶段"
1096
- },
1097
- "core/audits/largest-contentful-paint-element.js | columnTiming": {
1098
- "message": "用时"
1099
- },
1100
- "core/audits/largest-contentful-paint-element.js | description": {
1101
- "message": "这是此视口内绘制的最大内容元素。[详细了解 Largest Contentful Paint 元素](https://developer.chrome.com/docs/lighthouse/performance/lighthouse-largest-contentful-paint/)"
1102
- },
1103
- "core/audits/largest-contentful-paint-element.js | itemLoadDelay": {
1104
- "message": "加载延迟"
1105
- },
1106
- "core/audits/largest-contentful-paint-element.js | itemLoadTime": {
1107
- "message": "加载时间"
1108
- },
1109
- "core/audits/largest-contentful-paint-element.js | itemRenderDelay": {
1110
- "message": "渲染延迟"
1111
- },
1112
- "core/audits/largest-contentful-paint-element.js | itemTTFB": {
1113
- "message": "TTFB"
1114
- },
1115
- "core/audits/largest-contentful-paint-element.js | title": {
1116
- "message": "最大内容渲染时间元素"
1117
- },
1118
- "core/audits/layout-shifts.js | columnScore": {
1119
- "message": "布局偏移分数"
1120
- },
1121
- "core/audits/layout-shifts.js | description": {
1122
- "message": "这些是在网页上观察到的最大幅的布局偏移。表格中的每个项均表示一次布局偏移,并显示了发生最大幅偏移的元素。每个项的下方列出了哪些可能的根本原因导致了相应的布局偏移。由于[窗口化](https://web.dev/articles/cls#what_is_cls)的原因,所显示的某些布局偏移可能未包含在 CLS 指标值中。[了解如何改善 CLS](https://web.dev/articles/optimize-cls)"
1123
- },
1124
- "core/audits/layout-shifts.js | displayValueShiftsFound": {
1125
- "message": "{shiftCount,plural, =1{发现了 1 次布局偏移}other{发现了 # 次布局偏移}}"
1126
- },
1127
- "core/audits/layout-shifts.js | rootCauseFontChanges": {
1128
- "message": "加载了网络字体"
1129
- },
1130
- "core/audits/layout-shifts.js | rootCauseInjectedIframe": {
1131
- "message": "注入的 iframe"
1132
- },
1133
- "core/audits/layout-shifts.js | rootCauseUnsizedMedia": {
1134
- "message": "媒体元素缺少明确的大小"
1135
- },
1136
- "core/audits/layout-shifts.js | title": {
1137
- "message": "请避免出现大幅度的布局偏移"
1138
- },
1139
- "core/audits/lcp-lazy-loaded.js | description": {
1140
- "message": "被延迟加载的首屏图片会在页面生命周期内的较晚时间渲染,这可能会致使系统延迟 Largest Contentful Paint。[详细了解最佳延迟加载](https://web.dev/articles/lcp-lazy-loading)。"
1141
- },
1142
- "core/audits/lcp-lazy-loaded.js | failureTitle": {
1143
- "message": "Largest Contentful Paint 所对应的图片被延迟加载了"
1144
- },
1145
- "core/audits/lcp-lazy-loaded.js | title": {
1146
- "message": "Largest Contentful Paint 所对应的图片未被延迟加载"
1147
- },
1148
956
  "core/audits/long-tasks.js | description": {
1149
957
  "message": "列出了主线程中运行时间最长的任务,有助于识别出导致输入延迟的最主要原因。[了解如何避免出现长时间运行的主线程任务](https://web.dev/articles/optimize-long-tasks)"
1150
958
  },
@@ -1205,33 +1013,6 @@
1205
1013
  "core/audits/network-server-latency.js | title": {
1206
1014
  "message": "服务器后端延迟"
1207
1015
  },
1208
- "core/audits/non-composited-animations.js | description": {
1209
- "message": "未合成的动画可能会卡顿并增加 CLS。[了解如何避免使用未合成的动画](https://developer.chrome.com/docs/lighthouse/performance/non-composited-animations/)"
1210
- },
1211
- "core/audits/non-composited-animations.js | displayValue": {
1212
- "message": "{itemCount,plural, =1{发现了 # 个动画元素}other{发现了 # 个动画元素}}"
1213
- },
1214
- "core/audits/non-composited-animations.js | filterMayMovePixels": {
1215
- "message": "某个过滤相关属性可能会移动像素"
1216
- },
1217
- "core/audits/non-composited-animations.js | incompatibleAnimations": {
1218
- "message": "目标中另有一个不兼容的动画"
1219
- },
1220
- "core/audits/non-composited-animations.js | nonReplaceCompositeMode": {
1221
- "message": "效果中含有除了“replace”以外的合成模式"
1222
- },
1223
- "core/audits/non-composited-animations.js | title": {
1224
- "message": "避免使用未合成的动画"
1225
- },
1226
- "core/audits/non-composited-animations.js | transformDependsBoxSize": {
1227
- "message": "某个转换相关属性取决于元素边界框的大小"
1228
- },
1229
- "core/audits/non-composited-animations.js | unsupportedCSSProperty": {
1230
- "message": "{propertyCount,plural, =1{不受支持的 CSS 属性:{properties}}other{不受支持的 CSS 属性:{properties}}}"
1231
- },
1232
- "core/audits/non-composited-animations.js | unsupportedTimingParameters": {
1233
- "message": "效果含有不受支持的时间参数"
1234
- },
1235
1016
  "core/audits/origin-isolation.js | columnDirective": {
1236
1017
  "message": "指令"
1237
1018
  },
@@ -1250,12 +1031,6 @@
1250
1031
  "core/audits/origin-isolation.js | title": {
1251
1032
  "message": "确保通过 COOP 实现适当的源隔离"
1252
1033
  },
1253
- "core/audits/prioritize-lcp-image.js | description": {
1254
- "message": "如果向网页中动态添加 LCP 元素,您应预加载图片以缩短 LCP 用时。[详细了解如何预加载 LCP 元素](https://web.dev/articles/optimize-lcp#optimize_when_the_resource_is_discovered)。"
1255
- },
1256
- "core/audits/prioritize-lcp-image.js | title": {
1257
- "message": "预加载 LCP 元素所用图片"
1258
- },
1259
1034
  "core/audits/redirects-http.js | description": {
1260
1035
  "message": "请务必将所有 HTTP 流量都重定向到 HTTPS,以便为所有用户启用安全的网络功能。[了解详情](https://developer.chrome.com/docs/lighthouse/pwa/redirects-http/)。"
1261
1036
  },
@@ -1265,12 +1040,6 @@
1265
1040
  "core/audits/redirects-http.js | title": {
1266
1041
  "message": "将 HTTP 流量重定向到 HTTPS"
1267
1042
  },
1268
- "core/audits/redirects.js | description": {
1269
- "message": "重定向会在网页可加载前引入更多延迟。[了解如何避免网页重定向](https://developer.chrome.com/docs/lighthouse/performance/redirects/)。"
1270
- },
1271
- "core/audits/redirects.js | title": {
1272
- "message": "避免多次网页重定向"
1273
- },
1274
1043
  "core/audits/seo/canonical.js | description": {
1275
1044
  "message": "规范链接用于建议应在搜索结果中显示哪个网址。[详细了解规范链接](https://developer.chrome.com/docs/lighthouse/seo/canonical/)。"
1276
1045
  },
@@ -1388,18 +1157,6 @@
1388
1157
  "core/audits/seo/robots-txt.js | title": {
1389
1158
  "message": "robots.txt 有效"
1390
1159
  },
1391
- "core/audits/server-response-time.js | description": {
1392
- "message": "请确保服务器响应主文档的用时较短,因为这会影响到所有其他请求的响应时长。[详细了解 Time to First Byte 指标](https://developer.chrome.com/docs/lighthouse/performance/time-to-first-byte/)。"
1393
- },
1394
- "core/audits/server-response-time.js | displayValue": {
1395
- "message": "根文档花费了 {timeInMs, number, milliseconds} 毫秒"
1396
- },
1397
- "core/audits/server-response-time.js | failureTitle": {
1398
- "message": "请缩短初始服务器响应用时"
1399
- },
1400
- "core/audits/server-response-time.js | title": {
1401
- "message": "初始服务器响应用时较短"
1402
- },
1403
1160
  "core/audits/third-party-cookies.js | description": {
1404
1161
  "message": "在某些情况下,第三方 Cookie 可能会被屏蔽。[详细了解如何为第三方 Cookie 限制做好准备](https://privacysandbox.google.com/cookies/prepare/overview)。"
1405
1162
  },
@@ -1412,21 +1169,6 @@
1412
1169
  "core/audits/third-party-cookies.js | title": {
1413
1170
  "message": "避免使用第三方 Cookie"
1414
1171
  },
1415
- "core/audits/third-party-summary.js | columnThirdParty": {
1416
- "message": "第三方"
1417
- },
1418
- "core/audits/third-party-summary.js | description": {
1419
- "message": "第三方代码可能会显著影响加载性能。请限制冗余第三方提供商的数量,并尝试在页面完成主要加载后再加载第三方代码。[了解如何将第三方的影响降至最低](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/loading-third-party-javascript/)。"
1420
- },
1421
- "core/audits/third-party-summary.js | displayValue": {
1422
- "message": "第三方代码将主线程阻止了 {timeInMs, number, milliseconds} 毫秒"
1423
- },
1424
- "core/audits/third-party-summary.js | failureTitle": {
1425
- "message": "降低第三方代码的影响"
1426
- },
1427
- "core/audits/third-party-summary.js | title": {
1428
- "message": "尽量减少第三方使用"
1429
- },
1430
1172
  "core/audits/trusted-types-xss.js | columnSeverity": {
1431
1173
  "message": "严重程度"
1432
1174
  },
@@ -1439,15 +1181,6 @@
1439
1181
  "core/audits/trusted-types-xss.js | title": {
1440
1182
  "message": "使用 Trusted Types 缓解基于 DOM 的 XSS 攻击"
1441
1183
  },
1442
- "core/audits/unsized-images.js | description": {
1443
- "message": "请为图片元素设置明确的宽度值和高度值,以减少布局偏移并改善 CLS。[了解如何设置图片尺寸](https://web.dev/articles/optimize-cls#images_without_dimensions)"
1444
- },
1445
- "core/audits/unsized-images.js | failureTitle": {
1446
- "message": "图片元素没有明确的`width`和`height`"
1447
- },
1448
- "core/audits/unsized-images.js | title": {
1449
- "message": "图片元素都有明确的`width`和`height`"
1450
- },
1451
1184
  "core/audits/user-timings.js | columnType": {
1452
1185
  "message": "类型"
1453
1186
  },
@@ -1460,21 +1193,6 @@
1460
1193
  "core/audits/user-timings.js | title": {
1461
1194
  "message": "User Timing 标记和测量结果"
1462
1195
  },
1463
- "core/audits/uses-rel-preconnect.js | crossoriginWarning": {
1464
- "message": "“{securityOrigin}”已有 `<link rel=preconnect>`,但浏览器未使用该链接。请检查并确保您正确地使用了 `crossorigin` 属性。"
1465
- },
1466
- "core/audits/uses-rel-preconnect.js | description": {
1467
- "message": "建议添加 `preconnect` 或 `dns-prefetch` 资源提示,以尽早连接到重要的第三方源。[了解如何预先连接到必需的源](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/)。"
1468
- },
1469
- "core/audits/uses-rel-preconnect.js | title": {
1470
- "message": "预先连接到必要的来源"
1471
- },
1472
- "core/audits/uses-rel-preconnect.js | tooManyPreconnectLinksWarning": {
1473
- "message": "发现了不止 2 个 `<link rel=preconnect>` 连接。此类连接应尽量少用,且应仅用于指向最重要的来源。"
1474
- },
1475
- "core/audits/uses-rel-preconnect.js | unusedWarning": {
1476
- "message": "“{securityOrigin}”已有 `<link rel=preconnect>`,但浏览器未使用该链接。请仅针对网页肯定会请求的重要来源使用 `preconnect`。"
1477
- },
1478
1196
  "core/audits/valid-source-maps.js | columnMapURL": {
1479
1197
  "message": "映射网址"
1480
1198
  },
@@ -1493,42 +1211,6 @@
1493
1211
  "core/audits/valid-source-maps.js | title": {
1494
1212
  "message": "页面包含有效的源代码映射"
1495
1213
  },
1496
- "core/audits/viewport.js | description": {
1497
- "message": "`<meta name=\"viewport\">` 不仅会针对移动设备屏幕尺寸优化您的应用,还会阻止[系统在响应用户输入前出现 300 毫秒的延迟](https://developer.chrome.com/blog/300ms-tap-delay-gone-away/)。[详细了解如何使用视口元标记](https://developer.chrome.com/docs/lighthouse/pwa/viewport/)。"
1498
- },
1499
- "core/audits/viewport.js | explanationNoTag": {
1500
- "message": "未找到任何 `<meta name=\"viewport\">` 标记"
1501
- },
1502
- "core/audits/viewport.js | failureTitle": {
1503
- "message": "没有包含 `width` 或 `initial-scale` 的 `<meta name=\"viewport\">` 标记"
1504
- },
1505
- "core/audits/viewport.js | title": {
1506
- "message": "具有包含 `width` 或 `initial-scale` 的 `<meta name=\"viewport\">` 标记"
1507
- },
1508
- "core/audits/work-during-interaction.js | description": {
1509
- "message": "这是在 Interaction to Next Paint 测量期间发生的线程阻塞工作。[详细了解 Interaction to Next Paint 指标](https://web.dev/articles/inp)。"
1510
- },
1511
- "core/audits/work-during-interaction.js | displayValue": {
1512
- "message": "事件“{interactionType}”花费了 {timeInMs, number, milliseconds} 毫秒"
1513
- },
1514
- "core/audits/work-during-interaction.js | eventTarget": {
1515
- "message": "事件目标"
1516
- },
1517
- "core/audits/work-during-interaction.js | failureTitle": {
1518
- "message": "尽量减少关键互动期间的工作量"
1519
- },
1520
- "core/audits/work-during-interaction.js | inputDelay": {
1521
- "message": "输入延迟"
1522
- },
1523
- "core/audits/work-during-interaction.js | presentationDelay": {
1524
- "message": "展示延迟时间"
1525
- },
1526
- "core/audits/work-during-interaction.js | processingDuration": {
1527
- "message": "处理用时"
1528
- },
1529
- "core/audits/work-during-interaction.js | title": {
1530
- "message": "尽量减少关键互动期间的工作量"
1531
- },
1532
1214
  "core/config/default-config.js | a11yAriaGroupDescription": {
1533
1215
  "message": "这些提示旨在帮助改进 ARIA 在您的应用内的使用情况,从而改善辅助技术(例如屏幕阅读器)用户的体验。"
1534
1216
  },
@@ -3359,9 +3041,6 @@
3359
3041
  "node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-responsive-images": {
3360
3042
  "message": "启用 [`Adaptive Image Sizing`](https://support.nitropack.io/hc/en-us/articles/10123833029905-How-to-Enable-Adaptive-Image-Sizing-For-Your-Site) 可提前优化图片,使其与在所有设备上显示时所用容器的尺寸相匹配。"
3361
3043
  },
3362
- "node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-text-compression": {
3363
- "message": "在 NitroPack 中使用 [`Gzip compression`](https://support.nitropack.io/hc/en-us/articles/13229297479313-Enabling-GZIP-compression) 可缩减向浏览器发送的文件的大小。"
3364
- },
3365
3044
  "node_modules/lighthouse-stack-packs/packs/nuxt.js | modern-image-formats": {
3366
3045
  "message": "请使用 `nuxt/image` 组件并采用如下设置:`format=\"webp\"`。[了解详情](https://image.nuxt.com/usage/nuxt-img#format)。"
3367
3046
  },
@@ -3584,15 +3263,9 @@
3584
3263
  "report/renderer/report-utils.js | footerIssue": {
3585
3264
  "message": "提交问题"
3586
3265
  },
3587
- "report/renderer/report-utils.js | goBackToAudits": {
3588
- "message": "返回审核部分"
3589
- },
3590
3266
  "report/renderer/report-utils.js | hide": {
3591
3267
  "message": "隐藏"
3592
3268
  },
3593
- "report/renderer/report-utils.js | insightsNotice": {
3594
- "message": "今年晚些时候,数据分析将取代效果审核。[点击此处了解详情并提供反馈](https://github.com/GoogleChrome/lighthouse/discussions/16462)。"
3595
- },
3596
3269
  "report/renderer/report-utils.js | labDataTitle": {
3597
3270
  "message": "实验室数据"
3598
3271
  },
@@ -3692,9 +3365,6 @@
3692
3365
  "report/renderer/report-utils.js | toplevelWarningsMessage": {
3693
3366
  "message": "此次 Lighthouse 运行并不顺利,原因如下:"
3694
3367
  },
3695
- "report/renderer/report-utils.js | tryInsights": {
3696
- "message": "试用数据分析功能"
3697
- },
3698
3368
  "report/renderer/report-utils.js | unattributable": {
3699
3369
  "message": "无法归因"
3700
3370
  },
@@ -892,6 +892,7 @@ export interface TraceEvent {
892
892
  initiator?: {type: string, url?: string, stack?: any};
893
893
  protocol?: string;
894
894
  finishTime?: number;
895
+ headers?: Array<{name: string, value: string}>;
895
896
  };
896
897
  frame?: string;
897
898
  name?: string;
package/types/audit.d.ts CHANGED
@@ -64,7 +64,7 @@ declare module Audit {
64
64
  supportedModes?: Gatherer.GatherMode[],
65
65
  /** A number indicating how much guidance Lighthouse provides to solve the problem in this audit on a 1-3 scale. Higher means more guidance. */
66
66
  guidanceLevel?: number;
67
- /** A list of audit ids that this audit replaces. Used to ensure the report does not render the audits in this list at the same time as the audit which contains the list. */
67
+ /** A list of audit ids that this audit replaced in v13. Only used now to associate stack packs for removed audits with the new insight audit. */
68
68
  replacesAudits?: string[];
69
69
  }
70
70
 
@@ -112,7 +112,7 @@ export type ScreenEmulationSettings = {
112
112
  pauseAfterFcpMs?: number;
113
113
  /** The number of milliseconds to wait after the load event until the page should be considered loaded. */
114
114
  pauseAfterLoadMs?: number;
115
- /** The number of milliseconds to wait between high priority network requests or 3 simulataneous requests before the page should be considered loaded. */
115
+ /** The number of milliseconds to wait between high priority network requests or 3 simultaneous requests before the page should be considered loaded. */
116
116
  networkQuietThresholdMs?: number;
117
117
  /** The number of milliseconds to wait between long tasks until the page should be considered loaded. */
118
118
  cpuQuietThresholdMs?: number;
@@ -1,45 +0,0 @@
1
- export default DuplicatedJavascript;
2
- export type ByteEfficiencyProduct = import("./byte-efficiency-audit.js").ByteEfficiencyProduct;
3
- export type Item = LH.Audit.ByteEfficiencyItem & {
4
- source: string;
5
- subItems: {
6
- type: "subitems";
7
- items: SubItem[];
8
- };
9
- };
10
- export type SubItem = {
11
- url: string;
12
- sourceTransferBytes?: number;
13
- };
14
- declare class DuplicatedJavascript extends ByteEfficiencyAudit {
15
- /**
16
- * @param {string} source
17
- */
18
- static _getNodeModuleName(source: string): string;
19
- /**
20
- * @param {LH.Artifacts} artifacts
21
- * @param {LH.Audit.Context} context
22
- */
23
- static _getDuplicationGroupedByNodeModules(artifacts: LH.Artifacts, context: LH.Audit.Context): Promise<Map<string, {
24
- scriptId: string;
25
- scriptUrl: string;
26
- resourceSize: number;
27
- }[]>>;
28
- /**
29
- * Each details item returned is a module with subItems for each resource that
30
- * includes it. The wastedBytes for the details item is the number of bytes
31
- * occupied by the sum of all but the largest copy of the module. wastedBytesByUrl
32
- * attributes the cost of the bytes to a specific resource, for use by lantern.
33
- * @param {LH.Artifacts} artifacts
34
- * @param {Array<LH.Artifacts.NetworkRequest>} networkRecords
35
- * @param {LH.Audit.Context} context
36
- * @return {Promise<ByteEfficiencyProduct>}
37
- */
38
- static audit_(artifacts: LH.Artifacts, networkRecords: Array<LH.Artifacts.NetworkRequest>, context: LH.Audit.Context): Promise<ByteEfficiencyProduct>;
39
- }
40
- export namespace UIStrings {
41
- let title: string;
42
- let description: string;
43
- }
44
- import { ByteEfficiencyAudit } from './byte-efficiency-audit.js';
45
- //# sourceMappingURL=duplicated-javascript.d.ts.map