lighthouse 10.4.0-dev.20230802 → 11.0.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 (54) hide show
  1. package/core/config/default-config.js +0 -2
  2. package/dist/report/flow.js +1 -1
  3. package/package.json +3 -3
  4. package/shared/localization/locales/ar-XB.json +185 -14
  5. package/shared/localization/locales/ar.json +185 -14
  6. package/shared/localization/locales/bg.json +185 -14
  7. package/shared/localization/locales/ca.json +190 -19
  8. package/shared/localization/locales/cs.json +185 -14
  9. package/shared/localization/locales/da.json +185 -14
  10. package/shared/localization/locales/de.json +185 -14
  11. package/shared/localization/locales/el.json +185 -14
  12. package/shared/localization/locales/en-GB.json +185 -14
  13. package/shared/localization/locales/en-US.json +0 -9
  14. package/shared/localization/locales/en-XA.json +185 -14
  15. package/shared/localization/locales/en-XL.json +0 -9
  16. package/shared/localization/locales/es-419.json +185 -14
  17. package/shared/localization/locales/es.json +185 -14
  18. package/shared/localization/locales/fi.json +185 -14
  19. package/shared/localization/locales/fil.json +185 -14
  20. package/shared/localization/locales/fr.json +185 -14
  21. package/shared/localization/locales/he.json +186 -15
  22. package/shared/localization/locales/hi.json +185 -14
  23. package/shared/localization/locales/hr.json +185 -14
  24. package/shared/localization/locales/hu.json +185 -14
  25. package/shared/localization/locales/id.json +185 -14
  26. package/shared/localization/locales/it.json +185 -14
  27. package/shared/localization/locales/ja.json +185 -14
  28. package/shared/localization/locales/ko.json +185 -14
  29. package/shared/localization/locales/lt.json +185 -14
  30. package/shared/localization/locales/lv.json +185 -14
  31. package/shared/localization/locales/nl.json +185 -14
  32. package/shared/localization/locales/no.json +185 -14
  33. package/shared/localization/locales/pl.json +185 -14
  34. package/shared/localization/locales/pt-PT.json +185 -14
  35. package/shared/localization/locales/pt.json +190 -19
  36. package/shared/localization/locales/ro.json +185 -14
  37. package/shared/localization/locales/ru.json +185 -14
  38. package/shared/localization/locales/sk.json +185 -14
  39. package/shared/localization/locales/sl.json +185 -14
  40. package/shared/localization/locales/sr-Latn.json +185 -14
  41. package/shared/localization/locales/sr.json +185 -14
  42. package/shared/localization/locales/sv.json +185 -14
  43. package/shared/localization/locales/ta.json +185 -14
  44. package/shared/localization/locales/te.json +185 -14
  45. package/shared/localization/locales/th.json +185 -14
  46. package/shared/localization/locales/tr.json +185 -14
  47. package/shared/localization/locales/uk.json +185 -14
  48. package/shared/localization/locales/vi.json +185 -14
  49. package/shared/localization/locales/zh-HK.json +185 -14
  50. package/shared/localization/locales/zh-TW.json +185 -14
  51. package/shared/localization/locales/zh.json +185 -14
  52. package/types/internal/rxjs.d.ts +26 -0
  53. package/core/audits/resource-summary.d.ts +0 -16
  54. package/core/audits/resource-summary.js +0 -104
@@ -17,6 +17,15 @@
17
17
  "core/audits/accessibility/aria-allowed-attr.js | title": {
18
18
  "message": "`[aria-*]` 属性与其角色匹配"
19
19
  },
20
+ "core/audits/accessibility/aria-allowed-role.js | description": {
21
+ "message": "ARIA `role`s enable assistive technologies to know the role of each element on the web page. If the `role` values are misspelled, not existing ARIA `role` values, or abstract roles, then the purpose of the element will not be communicated to users of assistive technologies. [Learn more about ARIA roles](https://dequeuniversity.com/rules/axe/4.7/aria-allowed-roles)."
22
+ },
23
+ "core/audits/accessibility/aria-allowed-role.js | failureTitle": {
24
+ "message": "Values assigned to `role=\"\"` are not valid ARIA roles."
25
+ },
26
+ "core/audits/accessibility/aria-allowed-role.js | title": {
27
+ "message": "Values assigned to `role=\"\"` are valid ARIA roles."
28
+ },
20
29
  "core/audits/accessibility/aria-command-name.js | description": {
21
30
  "message": "如果某个元素没有无障碍名称,屏幕阅读器会将它读为通用名称,这会导致依赖屏幕阅读器的用户无法使用它。[了解如何让命令元素更便于使用](https://dequeuniversity.com/rules/axe/4.7/aria-command-name)。"
22
31
  },
@@ -26,6 +35,15 @@
26
35
  "core/audits/accessibility/aria-command-name.js | title": {
27
36
  "message": "`button`、`link` 和 `menuitem` 元素都有可供访问的名称"
28
37
  },
38
+ "core/audits/accessibility/aria-dialog-name.js | description": {
39
+ "message": "如果 ARIA 对话框元素缺少无障碍名称,可能会妨碍屏幕阅读器用户理解这些元素的用途。[了解如何让 ARIA 对话框元素更符合无障碍需求](https://dequeuniversity.com/rules/axe/4.7/aria-dialog-name)。"
40
+ },
41
+ "core/audits/accessibility/aria-dialog-name.js | failureTitle": {
42
+ "message": "具有 `role=\"dialog\"` 或 `role=\"alertdialog\"` 的元素缺少无障碍名称。"
43
+ },
44
+ "core/audits/accessibility/aria-dialog-name.js | title": {
45
+ "message": "具有 `role=\"dialog\"` 或 `role=\"alertdialog\"` 的元素均有无障碍名称。"
46
+ },
29
47
  "core/audits/accessibility/aria-hidden-body.js | description": {
30
48
  "message": "在文档 `<body>` 上设置 `aria-hidden=\"true\"` 后,辅助技术(如屏幕阅读器)的工作方式不一致。[了解 `aria-hidden` 对文档正文的影响](https://dequeuniversity.com/rules/axe/4.7/aria-hidden-body)。"
31
49
  },
@@ -107,6 +125,15 @@
107
125
  "core/audits/accessibility/aria-roles.js | title": {
108
126
  "message": "`[role]` 值有效"
109
127
  },
128
+ "core/audits/accessibility/aria-text.js | description": {
129
+ "message": "在一个被标记分隔的文本节点周围添加 `role=text` 后,VoiceOver 会将该文本元素视为一个短语,但不会读出它的可聚焦后代元素。[详细了解 `role=text` 属性](https://dequeuniversity.com/rules/axe/4.7/aria-text)。"
130
+ },
131
+ "core/audits/accessibility/aria-text.js | failureTitle": {
132
+ "message": "具有 `role=text` 属性的元素包含可聚焦后代元素。"
133
+ },
134
+ "core/audits/accessibility/aria-text.js | title": {
135
+ "message": "具有 `role=text` 属性的元素缺少可聚焦后代元素。"
136
+ },
110
137
  "core/audits/accessibility/aria-toggle-field-name.js | description": {
111
138
  "message": "如果某个切换字段没有无障碍名称,屏幕阅读器会将它读为通用名称,这会导致依赖屏幕阅读器的用户无法使用它。[详细了解切换字段](https://dequeuniversity.com/rules/axe/4.7/aria-toggle-field-name)。"
112
139
  },
@@ -227,6 +254,15 @@
227
254
  "core/audits/accessibility/duplicate-id-aria.js | title": {
228
255
  "message": "ARIA ID 都是独一无二的"
229
256
  },
257
+ "core/audits/accessibility/empty-heading.js | description": {
258
+ "message": "如果标题元素未包含任何内容或包含无法读取的文本,屏幕阅读器用户将难以获取网页的结构信息。[详细了解标题](https://dequeuniversity.com/rules/axe/4.7/empty-heading)。"
259
+ },
260
+ "core/audits/accessibility/empty-heading.js | failureTitle": {
261
+ "message": "标题元素未包含任何内容。"
262
+ },
263
+ "core/audits/accessibility/empty-heading.js | title": {
264
+ "message": "所有标题元素均包含内容。"
265
+ },
230
266
  "core/audits/accessibility/form-field-multiple-labels.js | description": {
231
267
  "message": "有多个标签的表单字段可能会被辅助技术(如屏幕阅读器)以令人困惑的方式播报出来,因为这些辅助技术可能会使用第一个标签或最后一个标签,也可能会使用所有标签。[了解如何使用表单标签](https://dequeuniversity.com/rules/axe/4.7/form-field-multiple-labels)。"
232
268
  },
@@ -281,6 +317,15 @@
281
317
  "core/audits/accessibility/html-xml-lang-mismatch.js | title": {
282
318
  "message": "`<html>` 元素的 `[xml:lang]` 属性与 `[lang]` 属性使用了相同的基本语言。"
283
319
  },
320
+ "core/audits/accessibility/identical-links-same-purpose.js | description": {
321
+ "message": "指向相同目标位置的链接应具有相同的说明,这有助于用户了解链接的用途并决定是否要访问它。[详细了解相同链接](https://dequeuniversity.com/rules/axe/4.7/identical-links-same-purpose)。"
322
+ },
323
+ "core/audits/accessibility/identical-links-same-purpose.js | failureTitle": {
324
+ "message": "相同链接的用途不一致。"
325
+ },
326
+ "core/audits/accessibility/identical-links-same-purpose.js | title": {
327
+ "message": "相同链接的用途一致。"
328
+ },
284
329
  "core/audits/accessibility/image-alt.js | description": {
285
330
  "message": "说明性元素应力求使用简短的描述性替代文字。未指定 alt 属性的装饰性元素可被忽略。[详细了解 `alt` 属性](https://dequeuniversity.com/rules/axe/4.7/image-alt)。"
286
331
  },
@@ -290,6 +335,15 @@
290
335
  "core/audits/accessibility/image-alt.js | title": {
291
336
  "message": "图片元素具备 `[alt]` 属性"
292
337
  },
338
+ "core/audits/accessibility/image-redundant-alt.js | description": {
339
+ "message": "Informative elements should aim for short, descriptive alternative text. Alternative text that is exactly the same as the text adjacent to the link or image is potentially confusing for screen reader users, because the text will be read twice. [Learn more about the `alt` attribute](https://dequeuniversity.com/rules/axe/4.7/image-redundant-alt)."
340
+ },
341
+ "core/audits/accessibility/image-redundant-alt.js | failureTitle": {
342
+ "message": "Image elements have `[alt]` attributes that are redundant text."
343
+ },
344
+ "core/audits/accessibility/image-redundant-alt.js | title": {
345
+ "message": "Image elements do not have `[alt]` attributes that are redundant text."
346
+ },
293
347
  "core/audits/accessibility/input-button-name.js | description": {
294
348
  "message": "向输入按钮添加可识别的无障碍文本可帮助屏幕阅读器用户了解输入按钮的用途。[详细了解输入按钮](https://dequeuniversity.com/rules/axe/4.7/input-button-name)。"
295
349
  },
@@ -308,6 +362,15 @@
308
362
  "core/audits/accessibility/input-image-alt.js | title": {
309
363
  "message": "`<input type=\"image\">` 元素有对应的 `[alt]` 文字"
310
364
  },
365
+ "core/audits/accessibility/label-content-name-mismatch.js | description": {
366
+ "message": "Visible text labels that do not match the accessible name can result in a confusing experience for screen reader users. [Learn more about accessible names](https://dequeuniversity.com/rules/axe/4.7/label-content-name-mismatch)."
367
+ },
368
+ "core/audits/accessibility/label-content-name-mismatch.js | failureTitle": {
369
+ "message": "Elements with visible text labels do not have matching accessible names."
370
+ },
371
+ "core/audits/accessibility/label-content-name-mismatch.js | title": {
372
+ "message": "Elements with visible text labels have matching accessible names."
373
+ },
311
374
  "core/audits/accessibility/label.js | description": {
312
375
  "message": "标签可确保辅助技术(如屏幕阅读器)正确读出表单控件。[详细了解表单元素标签](https://dequeuniversity.com/rules/axe/4.7/label)。"
313
376
  },
@@ -317,6 +380,24 @@
317
380
  "core/audits/accessibility/label.js | title": {
318
381
  "message": "表单元素具有关联的标签"
319
382
  },
383
+ "core/audits/accessibility/landmark-one-main.js | description": {
384
+ "message": "主要位置标记有助于屏幕阅读器用户浏览网页。[详细了解位置标记](https://dequeuniversity.com/rules/axe/4.7/landmark-one-main)。"
385
+ },
386
+ "core/audits/accessibility/landmark-one-main.js | failureTitle": {
387
+ "message": "文档缺少主要位置标记。"
388
+ },
389
+ "core/audits/accessibility/landmark-one-main.js | title": {
390
+ "message": "文档有一个主要位置标记。"
391
+ },
392
+ "core/audits/accessibility/link-in-text-block.js | description": {
393
+ "message": "对许多用户而言,对比度低的文本都是难以阅读或无法阅读的。清晰可辨的链接文本可改善弱视用户的体验。[了解如何让链接容易辨识](https://dequeuniversity.com/rules/axe/4.7/link-in-text-block)。"
394
+ },
395
+ "core/audits/accessibility/link-in-text-block.js | failureTitle": {
396
+ "message": "必须依赖颜色才能辨识链接。"
397
+ },
398
+ "core/audits/accessibility/link-in-text-block.js | title": {
399
+ "message": "无需依赖颜色即可辨识链接。"
400
+ },
320
401
  "core/audits/accessibility/link-name.js | description": {
321
402
  "message": "请确保链接文字(以及用作链接的图片替代文字)可识别、独一无二且可聚焦,这样做会提升屏幕阅读器用户的导航体验。[了解如何使链接可供访问](https://dequeuniversity.com/rules/axe/4.7/link-name)。"
322
403
  },
@@ -371,6 +452,24 @@
371
452
  "core/audits/accessibility/object-alt.js | title": {
372
453
  "message": "`<object>` 元素有对应的替代文字"
373
454
  },
455
+ "core/audits/accessibility/select-name.js | description": {
456
+ "message": "如果表单元素缺少有效标签,可能会给屏幕阅读器用户带来糟糕的体验。[详细了解 `select` 元素](https://dequeuniversity.com/rules/axe/4.7/select-name)。"
457
+ },
458
+ "core/audits/accessibility/select-name.js | failureTitle": {
459
+ "message": "select 元素缺少关联的标签元素。"
460
+ },
461
+ "core/audits/accessibility/select-name.js | title": {
462
+ "message": "select 元素具有关联的标签元素。"
463
+ },
464
+ "core/audits/accessibility/skip-link.js | description": {
465
+ "message": "Including a skip link can help users skip to the main content to save time. [Learn more about skip links](https://dequeuniversity.com/rules/axe/4.7/skip-link)."
466
+ },
467
+ "core/audits/accessibility/skip-link.js | failureTitle": {
468
+ "message": "Skip links are not focusable."
469
+ },
470
+ "core/audits/accessibility/skip-link.js | title": {
471
+ "message": "Skip links are focusable."
472
+ },
374
473
  "core/audits/accessibility/tabindex.js | description": {
375
474
  "message": "值大于 0 意味着明确的导航顺序。尽管这在技术上可行,但往往会让依赖辅助技术的用户感到沮丧。[详细了解 `tabindex` 属性](https://dequeuniversity.com/rules/axe/4.7/tabindex)。"
376
475
  },
@@ -380,6 +479,15 @@
380
479
  "core/audits/accessibility/tabindex.js | title": {
381
480
  "message": "所有元素的 `[tabindex]` 值都不大于 0"
382
481
  },
482
+ "core/audits/accessibility/table-duplicate-name.js | description": {
483
+ "message": "The summary attribute should describe the table structure, while `<caption>` should have the onscreen title. Accurate table mark-up helps users of screen readers. [Learn more about summary and caption](https://dequeuniversity.com/rules/axe/4.7/table-duplicate-name)."
484
+ },
485
+ "core/audits/accessibility/table-duplicate-name.js | failureTitle": {
486
+ "message": "Tables have the same content in the summary attribute and `<caption>.`"
487
+ },
488
+ "core/audits/accessibility/table-duplicate-name.js | title": {
489
+ "message": "Tables have different content in the summary attribute and `<caption>`."
490
+ },
383
491
  "core/audits/accessibility/table-fake-caption.js | description": {
384
492
  "message": "屏幕阅读器提供了更便于用户浏览表格内容的功能。请务必确保表格实际使用了 <caption> 元素(而非带有 `[colspan]` 属性的单元格),这可以提升屏幕阅读器用户的体验。[详细了解表格标题](https://dequeuniversity.com/rules/axe/4.7/table-fake-caption)。"
385
493
  },
@@ -389,6 +497,15 @@
389
497
  "core/audits/accessibility/table-fake-caption.js | title": {
390
498
  "message": "表格使用了 `<caption>`(而非带有 `[colspan]` 属性的单元格)来表示表格标题。"
391
499
  },
500
+ "core/audits/accessibility/target-size.js | description": {
501
+ "message": "Touch targets with sufficient size and spacing help users who may have difficulty targeting small controls to activate the targets. [Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.7/target-size)."
502
+ },
503
+ "core/audits/accessibility/target-size.js | failureTitle": {
504
+ "message": "触摸目标的尺寸或间距不足。"
505
+ },
506
+ "core/audits/accessibility/target-size.js | title": {
507
+ "message": "触摸目标的尺寸和间距足够大。"
508
+ },
392
509
  "core/audits/accessibility/td-has-header.js | description": {
393
510
  "message": "屏幕阅读器提供了更便于用户浏览表格内容的功能。请务必确保大型表格(宽度和高度至少为 3 个单元格)中的 `<td>` 元素具有关联的表格标头,这可以提升屏幕阅读器用户的体验。[详细了解表格标头](https://dequeuniversity.com/rules/axe/4.7/td-has-header)。"
394
511
  },
@@ -966,7 +1083,7 @@
966
1083
  "message": "prefer_related_applications 仅适用于 Android 设备上的 Chrome Beta 版和稳定版。"
967
1084
  },
968
1085
  "core/audits/installable-manifest.js | protocol-timeout": {
969
- "message": "Lighthouse 无法确定是否有 Service Worker。请在更新版本的 Chrome 中重试。"
1086
+ "message": "Lighthouse could not determine if the page is installable. Please try with a newer version of Chrome."
970
1087
  },
971
1088
  "core/audits/installable-manifest.js | scheme-not-supported-for-webapk": {
972
1089
  "message": "清单网址的架构 ({scheme}) 在 Android 设备上不受支持。"
@@ -1115,6 +1232,9 @@
1115
1232
  "core/audits/metrics/first-meaningful-paint.js | description": {
1116
1233
  "message": "“首次有效绘制时间”测量的是网页主要内容开始对用户显示的时间。[详细了解“首次有效绘制时间”指标](https://developer.chrome.com/docs/lighthouse/performance/first-meaningful-paint/)。"
1117
1234
  },
1235
+ "core/audits/metrics/interaction-to-next-paint.js | description": {
1236
+ "message": "Interaction to Next Paint 用于衡量网页响应速度,即网页需要多久才会明显响应用户输入。[详细了解 Interaction to Next Paint 指标](https://web.dev/inp/)。"
1237
+ },
1118
1238
  "core/audits/metrics/interactive.js | description": {
1119
1239
  "message": "“Time to Interactive”是指网页需要多长时间才能提供完整的交互功能。[详细了解“Time to Interactive”指标](https://developer.chrome.com/docs/lighthouse/performance/interactive/)。"
1120
1240
  },
@@ -1208,15 +1328,6 @@
1208
1328
  "core/audits/redirects.js | title": {
1209
1329
  "message": "避免多次网页重定向"
1210
1330
  },
1211
- "core/audits/resource-summary.js | description": {
1212
- "message": "若要根据页面资源的数量和大小设置预算,请添加 budget.json 文件。[详细了解性能预算](https://web.dev/use-lighthouse-for-performance-budgets/)。"
1213
- },
1214
- "core/audits/resource-summary.js | displayValue": {
1215
- "message": "{requestCount,plural, =1{1 项请求 • {byteCount, number, bytes} KiB}other{# 项请求 • {byteCount, number, bytes} KiB}}"
1216
- },
1217
- "core/audits/resource-summary.js | title": {
1218
- "message": "请保持较低的请求数量和较小的传输大小"
1219
- },
1220
1331
  "core/audits/seo/canonical.js | description": {
1221
1332
  "message": "规范链接用于建议应在搜索结果中显示哪个网址。[详细了解规范链接](https://developer.chrome.com/docs/lighthouse/seo/canonical/)。"
1222
1333
  },
@@ -1596,7 +1707,7 @@
1596
1707
  "message": "最佳做法"
1597
1708
  },
1598
1709
  "core/config/default-config.js | a11yCategoryDescription": {
1599
- "message": "这些检查会突出显示可[改进您网络应用的无障碍功能](https://developer.chrome.com/docs/lighthouse/accessibility/)的提示。系统只能自动检测到一小部分无障碍功能问题,因此您最好也手动测试一下。"
1710
+ "message": "These checks highlight opportunities to [improve the accessibility of your web app](https://developer.chrome.com/docs/lighthouse/accessibility/). Automatic detection can only detect a subset of issues and does not guarantee the accessibility of your web app, so [manual testing](https://web.dev/how-to-review/) is also encouraged."
1600
1711
  },
1601
1712
  "core/config/default-config.js | a11yCategoryManualDescription": {
1602
1713
  "message": "这些条目旨在检查自动化测试工具未涵盖的方面。如需了解详情,请参阅有关如何[执行无障碍功能审查](https://web.dev/how-to-review/)的指南。"
@@ -2742,7 +2853,7 @@
2742
2853
  "message": "安装可延迟加载图片的 [Drupal 模块](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A67&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=%22lazy+load%22&solrsort=iss_project_release_usage+desc&op=Search)。此类模块能够推迟加载所有的屏幕外图片,进而提高性能。"
2743
2854
  },
2744
2855
  "node_modules/lighthouse-stack-packs/packs/drupal.js | render-blocking-resources": {
2745
- "message": "建议您使用模块来内嵌重要的 CSS JavaScipt,或通过 JavaScript(例如[高级 CSS/JS 聚合](https://www.drupal.org/project/advagg)模块)异步加载资源。请注意,此模块执行的优化可能会导致您的网站无法正常运行,因此您可能需要更改代码。"
2856
+ "message": "Consider using a module to inline critical CSS and JavaScript, and use the defer attribute for non-critical CSS or JavaScript."
2746
2857
  },
2747
2858
  "node_modules/lighthouse-stack-packs/packs/drupal.js | server-response-time": {
2748
2859
  "message": "主题背景、模块和服务器规格都会影响服务器响应用时。建议您查找更优化的主题背景、仔细选择优化模块并/或升级您的服务器。您的托管服务器应该使用 PHP 运算码缓存、内存缓存(例如 Redis 或 Memcached)来缩短数据库查询时间,并优化应用逻辑以加快网页准备速度。"
@@ -2751,10 +2862,10 @@
2751
2862
  "message": "建议您使用[自适应图片样式](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8)减小在您网页上加载的图片的大小。如果您使用 Views 在网页上显示多个内容项,请考虑实现分页,以限制给定网页上显示的内容项的数量。"
2752
2863
  },
2753
2864
  "node_modules/lighthouse-stack-packs/packs/drupal.js | unminified-css": {
2754
- "message": "确保您已在“管理 » 配置 » 开发”页面中启用了“聚合 CSS 文件”。您还可以通过[其他模块](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A123&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=css+aggregation&solrsort=iss_project_release_usage+desc&op=Search)配置更高级的聚合选项,以通过串联、缩减和压缩您的 CSS 样式来加快您网站的加载速度。"
2865
+ "message": "Ensure you have enabled \"Aggregate CSS files\" in the \"Administration » Configuration » Development\" page. Ensure your Drupal site is running at least Drupal 10.1 for improved asset aggregation support."
2755
2866
  },
2756
2867
  "node_modules/lighthouse-stack-packs/packs/drupal.js | unminified-javascript": {
2757
- "message": "确保您已在“管理 » 配置 » 开发”页面中启用了“聚合 JavaScript 文件”。您还可以通过[其他模块](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A123&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=javascript+aggregation&solrsort=iss_project_release_usage+desc&op=Search)配置更高级的聚合选项,从而通过串联、缩减和压缩您的 JavaScript 资源加快您网站的加载速度。"
2868
+ "message": "Ensure you have enabled \"Aggregate JavaScript files\" in the \"Administration » Configuration » Development\" page. Ensure your Drupal site is running at least Drupal 10.1 for improved asset aggregation support."
2758
2869
  },
2759
2870
  "node_modules/lighthouse-stack-packs/packs/drupal.js | unused-css-rules": {
2760
2871
  "message": "建议您移除未使用的 CSS 规则,仅将所需的 Drupal 库附加到相关网页或网页中的组件。如需了解详情,请访问 [Drupal 文档链接](https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module#library)。若想找出会添加无关 CSS 的附加库,请尝试在 Chrome 开发者工具中运行[代码覆盖率](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage)测试。在 Drupal 网站中停用 CSS 聚合后,您可根据样式表网址找出导致问题的主题背景/模块。请留意列表中哪些主题背景/模块有大量样式表的代码覆盖率偏红。主题背景/模块应该只将网页中确实用到的样式表加入队列。"
@@ -2954,6 +3065,48 @@
2954
3065
  "node_modules/lighthouse-stack-packs/packs/next.js | uses-text-compression": {
2955
3066
  "message": "请在您的 Next.js 服务器上启用压缩功能。[了解详情](https://nextjs.org/docs/api-reference/next.config.js/compression)。"
2956
3067
  },
3068
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | dom-size": {
3069
+ "message": "Contact your account manager to enable [`HTML Lazy Load`](https://support.nitropack.io/hc/en-us/articles/17144942904337). Configuring it will prioritize and optimize your page rendering performance."
3070
+ },
3071
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | font-display": {
3072
+ "message": "Use the [`Override Font Rendering Behavior`](https://support.nitropack.io/hc/en-us/articles/16547358865041) option in NitroPack to set a desired value for the CSS font-display rule."
3073
+ },
3074
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | modern-image-formats": {
3075
+ "message": "Use [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/16547237162513) to automatically convert your images to WebP."
3076
+ },
3077
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | offscreen-images": {
3078
+ "message": "Defer offscreen images by enabling [`Automatic Image Lazy Loading`](https://support.nitropack.io/hc/en-us/articles/12457493524369-NitroPack-Lazy-Loading-Feature-for-Images)."
3079
+ },
3080
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | render-blocking-resources": {
3081
+ "message": "Enable [`Remove render-blocking resources`](https://support.nitropack.io/hc/en-us/articles/13820893500049-How-to-Deal-with-Render-Blocking-Resources-in-NitroPack) in NitroPack for faster initial load times."
3082
+ },
3083
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | server-response-time": {
3084
+ "message": "Improve server response time and optimize perceived performance by activating [`Instant Load`](https://support.nitropack.io/hc/en-us/articles/16547340617361)."
3085
+ },
3086
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | unminified-css": {
3087
+ "message": "Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your CSS, HTML, and JavaScript files for faster load times."
3088
+ },
3089
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | unminified-javascript": {
3090
+ "message": "Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your JS, HTML, and CSS files for faster load times."
3091
+ },
3092
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | unused-css-rules": {
3093
+ "message": "Enable [`Reduce Unused CSS`](https://support.nitropack.io/hc/en-us/articles/360020418457-Reduce-Unused-CSS) to remove CSS rules that are not applicable to this page."
3094
+ },
3095
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | unused-javascript": {
3096
+ "message": "Configure [`Delayed Scripts`](https://support.nitropack.io/hc/en-us/articles/1500002600942-Delayed-Scripts) in NitroPack to delay loading of scripts until they are needed."
3097
+ },
3098
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-long-cache-ttl": {
3099
+ "message": "Go to the [`Improve Server Response Time`](https://support.nitropack.io/hc/en-us/articles/1500002321821-Improve-Server-Response-Time) feature in the `Caching` menu and adjust your page cache expiration time to improve loading times and user experience."
3100
+ },
3101
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-optimized-images": {
3102
+ "message": "Automatically compress, optimize, and convert your images into WebP by enabling the [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/14177271695121-How-to-serve-images-in-next-gen-formats-using-NitroPack) setting."
3103
+ },
3104
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-responsive-images": {
3105
+ "message": "Enable [`Adaptive Image Sizing`](https://support.nitropack.io/hc/en-us/articles/10123833029905-How-to-Enable-Adaptive-Image-Sizing-For-Your-Site) to preemptively optimize your images and make them match the dimensions of the containers they’re displayed in across all devices."
3106
+ },
3107
+ "node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-text-compression": {
3108
+ "message": "Use [`Gzip compression`](https://support.nitropack.io/hc/en-us/articles/13229297479313-Enabling-GZIP-compression) in NitroPack to reduce the size of the files that are sent to the browser."
3109
+ },
2957
3110
  "node_modules/lighthouse-stack-packs/packs/nuxt.js | modern-image-formats": {
2958
3111
  "message": "请使用 `nuxt/image` 组件并采用如下设置:`format=\"webp\"`。[了解详情](https://image.nuxtjs.org/components/nuxt-img#format)。"
2959
3112
  },
@@ -3035,6 +3188,21 @@
3035
3188
  "node_modules/lighthouse-stack-packs/packs/react.js | user-timings": {
3036
3189
  "message": "使用 React DevTools Profiler,从而利用 Profiler API 来衡量组件的呈现性能。[了解详情](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html)。"
3037
3190
  },
3191
+ "node_modules/lighthouse-stack-packs/packs/wix.js | efficient-animated-content": {
3192
+ "message": "请将视频放置在 `VideoBoxes` 内,使用`Video Masks`自定义视频,或者添加`Transparent Videos`。[了解详情](https://support.wix.com/en/article/wix-video-about-wix-video)。"
3193
+ },
3194
+ "node_modules/lighthouse-stack-packs/packs/wix.js | modern-image-formats": {
3195
+ "message": "请使用 `Wix Media Manager` 上传图片,以确保网站能自动以 WebP 格式加载图片。了解网站媒体资源的[更多优化方法](https://support.wix.com/en/article/site-performance-optimizing-your-media)。"
3196
+ },
3197
+ "node_modules/lighthouse-stack-packs/packs/wix.js | render-blocking-resources": {
3198
+ "message": "在网站信息中心的“`Custom Code`”标签页中[添加第三方代码](https://support.wix.com/en/article/site-performance-using-third-party-code-on-your-site)时,请确保推迟加载或在代码正文的末尾加载该第三方代码。请尽可能使用 Wix 的[集成](https://support.wix.com/en/article/about-marketing-integrations)功能将营销工具嵌入到您的网站中。 "
3199
+ },
3200
+ "node_modules/lighthouse-stack-packs/packs/wix.js | server-response-time": {
3201
+ "message": "Wix 利用 CDN 和缓存,为大多数访问者提供尽可能快速的响应。请考虑为网站[手动启用缓存](https://support.wix.com/en/article/site-performance-caching-pages-to-optimize-loading-speed),尤其是在使用 `Velo` 的情况下。"
3202
+ },
3203
+ "node_modules/lighthouse-stack-packs/packs/wix.js | unused-javascript": {
3204
+ "message": "请在网站信息中心的“`Custom Code`”标签页中查看您已向网站添加的所有第三方代码,并且仅保留对网站必要的服务。[了解详情](https://support.wix.com/en/article/site-performance-removing-unused-javascript)。"
3205
+ },
3038
3206
  "node_modules/lighthouse-stack-packs/packs/wordpress.js | efficient-animated-content": {
3039
3207
  "message": "建议您将 GIF 上传到可让其作为 HTML5 视频嵌入的服务。"
3040
3208
  },
@@ -3140,6 +3308,9 @@
3140
3308
  "report/renderer/report-utils.js | dropdownSaveJSON": {
3141
3309
  "message": "另存为 JSON"
3142
3310
  },
3311
+ "report/renderer/report-utils.js | dropdownViewUnthrottledTrace": {
3312
+ "message": "View Unthrottled Trace"
3313
+ },
3143
3314
  "report/renderer/report-utils.js | dropdownViewer": {
3144
3315
  "message": "在查看器中打开"
3145
3316
  },
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license Copyright 2023 The Lighthouse Authors. All Rights Reserved.
3
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
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
+ */
6
+
7
+ declare module 'rxjs' {
8
+ export * from 'rxjs/index.js';
9
+
10
+ // Puppeteer uses a later version of rxjs as a dev dep.
11
+ // We don't need it for normal execution, but these types are necessary
12
+ // when we reach into puppeteer internals in `lightrider-entry.js`
13
+ export const catchError: any;
14
+ export const defaultIfEmpty: any;
15
+ export const filter: any;
16
+ export const first: any;
17
+ export const ignoreElements: any;
18
+ export const map: any;
19
+ export const mergeMap: any;
20
+ export const raceWith: any;
21
+ export const retry: any;
22
+ export const tap: any;
23
+ export const throwIfEmpty: any;
24
+ export const firstValueFrom: any;
25
+ }
26
+
@@ -1,16 +0,0 @@
1
- export default ResourceSummary;
2
- declare class ResourceSummary extends Audit {
3
- /**
4
- * @param {LH.Artifacts} artifacts
5
- * @param {LH.Audit.Context} context
6
- * @return {Promise<LH.Audit.Product>}
7
- */
8
- static audit(artifacts: LH.Artifacts, context: LH.Audit.Context): Promise<LH.Audit.Product>;
9
- }
10
- export namespace UIStrings {
11
- const title: string;
12
- const description: string;
13
- const displayValue: string;
14
- }
15
- import { Audit } from './audit.js';
16
- //# sourceMappingURL=resource-summary.d.ts.map
@@ -1,104 +0,0 @@
1
- /**
2
- * @license Copyright 2019 The Lighthouse Authors. All Rights Reserved.
3
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
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
- */
6
-
7
- import {Audit} from './audit.js';
8
- import {ResourceSummary as ComputedResourceSummary} from '../computed/resource-summary.js';
9
- import * as i18n from '../lib/i18n/i18n.js';
10
-
11
- const UIStrings = {
12
- /** Imperative title of a Lighthouse audit that tells the user to minimize the size and quantity of resources used to load the page. */
13
- title: 'Keep request counts low and transfer sizes small',
14
- /** Description of a Lighthouse audit that tells the user that they can setup a budgets for the quantity and size of page resources. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
15
- description: 'To set budgets for the quantity and size of page resources,' +
16
- ' add a budget.json file. ' +
17
- '[Learn more about performance budgets](https://web.dev/use-lighthouse-for-performance-budgets/).',
18
- /** [ICU Syntax] Label for an audit identifying the number of requests and kibibytes used to load the page. */
19
- displayValue: `{requestCount, plural, ` +
20
- `=1 {1 request • {byteCount, number, bytes} KiB} ` +
21
- `other {# requests • {byteCount, number, bytes} KiB}}`,
22
- };
23
-
24
- const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
25
-
26
- class ResourceSummary extends Audit {
27
- /**
28
- * @return {LH.Audit.Meta}
29
- */
30
- static get meta() {
31
- return {
32
- id: 'resource-summary',
33
- title: str_(UIStrings.title),
34
- description: str_(UIStrings.description),
35
- scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
36
- requiredArtifacts: ['devtoolsLogs', 'URL'],
37
- };
38
- }
39
-
40
- /**
41
- * @param {LH.Artifacts} artifacts
42
- * @param {LH.Audit.Context} context
43
- * @return {Promise<LH.Audit.Product>}
44
- */
45
- static async audit(artifacts, context) {
46
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
47
- const summary = await ComputedResourceSummary
48
- .request({devtoolsLog, URL: artifacts.URL, budgets: context.settings.budgets}, context);
49
-
50
- /** @type {LH.Audit.Details.Table['headings']} */
51
- const headings = [
52
- {key: 'label', valueType: 'text', label: str_(i18n.UIStrings.columnResourceType)},
53
- {key: 'requestCount', valueType: 'numeric', label: str_(i18n.UIStrings.columnRequests)},
54
- {key: 'transferSize', valueType: 'bytes', label: str_(i18n.UIStrings.columnTransferSize)},
55
- ];
56
-
57
-
58
- /** @type {Record<LH.Budget.ResourceType, LH.IcuMessage>} */
59
- const strMappings = {
60
- 'total': str_(i18n.UIStrings.totalResourceType),
61
- 'document': str_(i18n.UIStrings.documentResourceType),
62
- 'script': str_(i18n.UIStrings.scriptResourceType),
63
- 'stylesheet': str_(i18n.UIStrings.stylesheetResourceType),
64
- 'image': str_(i18n.UIStrings.imageResourceType),
65
- 'media': str_(i18n.UIStrings.mediaResourceType),
66
- 'font': str_(i18n.UIStrings.fontResourceType),
67
- 'other': str_(i18n.UIStrings.otherResourceType),
68
- 'third-party': str_(i18n.UIStrings.thirdPartyResourceType),
69
- };
70
-
71
- const types = /** @type {Array<LH.Budget.ResourceType>} */ (Object.keys(summary));
72
- const rows = types.map(type => {
73
- return {
74
- // ResourceType is included as an "id" for ease of use.
75
- // It does not appear directly in the table.
76
- resourceType: type,
77
- label: strMappings[type],
78
- requestCount: summary[type].count,
79
- transferSize: summary[type].transferSize,
80
- };
81
- });
82
- // Force third-party to be last, descending by size otherwise
83
- const thirdPartyRow = rows.find(r => r.resourceType === 'third-party') || [];
84
- const otherRows = rows.filter(r => r.resourceType !== 'third-party')
85
- .sort((a, b) => {
86
- return b.transferSize - a.transferSize;
87
- });
88
- const tableItems = otherRows.concat(thirdPartyRow);
89
-
90
- const tableDetails = Audit.makeTableDetails(headings, tableItems);
91
-
92
- return {
93
- details: tableDetails,
94
- score: 1,
95
- displayValue: str_(UIStrings.displayValue, {
96
- requestCount: summary.total.count,
97
- byteCount: summary.total.transferSize,
98
- }),
99
- };
100
- }
101
- }
102
-
103
- export default ResourceSummary;
104
- export {UIStrings};