lighthouse 11.7.0-dev.20240408 → 11.7.0-dev.20240410

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 (110) hide show
  1. package/cli/cli-flags.js +3 -3
  2. package/cli/test/smokehouse/config/exclusions.js +1 -0
  3. package/cli/test/smokehouse/core-tests.js +4 -16
  4. package/cli/test/smokehouse/frontends/smokehouse-bin.js +2 -2
  5. package/core/audits/redirects-http.d.ts +19 -0
  6. package/core/audits/redirects-http.js +75 -0
  7. package/core/config/default-config.js +10 -52
  8. package/core/gather/driver/target-manager.js +1 -1
  9. package/core/gather/driver/wait-for-condition.js +2 -3
  10. package/core/gather/driver.js +1 -0
  11. package/core/gather/session.d.ts +8 -0
  12. package/core/gather/session.js +12 -0
  13. package/core/lib/lantern/network-node.js +28 -4
  14. package/core/runner.js +18 -23
  15. package/dist/report/bundle.esm.js +11 -95
  16. package/dist/report/flow.js +16 -100
  17. package/dist/report/standalone.js +12 -96
  18. package/flow-report/src/help-dialog.tsx +0 -1
  19. package/flow-report/src/i18n/i18n.d.ts +0 -4
  20. package/flow-report/src/i18n/ui-strings.d.ts +0 -1
  21. package/flow-report/src/i18n/ui-strings.js +0 -2
  22. package/package.json +1 -1
  23. package/readme.md +2 -2
  24. package/report/assets/styles.css +1 -43
  25. package/report/assets/templates.html +0 -95
  26. package/report/renderer/components.d.ts +2 -2
  27. package/report/renderer/components.js +2 -103
  28. package/report/renderer/report-renderer.js +2 -12
  29. package/report/renderer/report-ui-features.js +1 -1
  30. package/report/renderer/report-utils.d.ts +0 -1
  31. package/report/renderer/report-utils.js +0 -3
  32. package/shared/localization/locales/ar-XB.json +0 -174
  33. package/shared/localization/locales/ar.json +0 -174
  34. package/shared/localization/locales/bg.json +0 -174
  35. package/shared/localization/locales/ca.json +0 -174
  36. package/shared/localization/locales/cs.json +0 -174
  37. package/shared/localization/locales/da.json +0 -174
  38. package/shared/localization/locales/de.json +0 -174
  39. package/shared/localization/locales/el.json +0 -174
  40. package/shared/localization/locales/en-GB.json +0 -174
  41. package/shared/localization/locales/en-US.json +9 -177
  42. package/shared/localization/locales/en-XA.json +0 -174
  43. package/shared/localization/locales/en-XL.json +9 -177
  44. package/shared/localization/locales/es-419.json +0 -174
  45. package/shared/localization/locales/es.json +0 -174
  46. package/shared/localization/locales/fi.json +0 -174
  47. package/shared/localization/locales/fil.json +0 -174
  48. package/shared/localization/locales/fr.json +0 -174
  49. package/shared/localization/locales/he.json +0 -174
  50. package/shared/localization/locales/hi.json +0 -174
  51. package/shared/localization/locales/hr.json +0 -174
  52. package/shared/localization/locales/hu.json +0 -174
  53. package/shared/localization/locales/id.json +0 -174
  54. package/shared/localization/locales/it.json +0 -174
  55. package/shared/localization/locales/ja.json +0 -174
  56. package/shared/localization/locales/ko.json +0 -174
  57. package/shared/localization/locales/lt.json +0 -174
  58. package/shared/localization/locales/lv.json +0 -174
  59. package/shared/localization/locales/nl.json +0 -174
  60. package/shared/localization/locales/no.json +0 -174
  61. package/shared/localization/locales/pl.json +0 -174
  62. package/shared/localization/locales/pt-PT.json +0 -174
  63. package/shared/localization/locales/pt.json +0 -174
  64. package/shared/localization/locales/ro.json +0 -174
  65. package/shared/localization/locales/ru.json +0 -174
  66. package/shared/localization/locales/sk.json +0 -174
  67. package/shared/localization/locales/sl.json +0 -174
  68. package/shared/localization/locales/sr-Latn.json +0 -174
  69. package/shared/localization/locales/sr.json +0 -174
  70. package/shared/localization/locales/sv.json +0 -174
  71. package/shared/localization/locales/ta.json +0 -174
  72. package/shared/localization/locales/te.json +0 -174
  73. package/shared/localization/locales/th.json +0 -174
  74. package/shared/localization/locales/tr.json +0 -174
  75. package/shared/localization/locales/uk.json +0 -174
  76. package/shared/localization/locales/vi.json +0 -174
  77. package/shared/localization/locales/zh-HK.json +0 -174
  78. package/shared/localization/locales/zh-TW.json +0 -174
  79. package/shared/localization/locales/zh.json +0 -174
  80. package/types/artifacts.d.ts +0 -27
  81. package/types/audit.d.ts +0 -10
  82. package/types/gatherer.d.ts +1 -0
  83. package/types/internal/smokehouse.d.ts +1 -1
  84. package/core/audits/content-width.d.ts +0 -17
  85. package/core/audits/content-width.js +0 -76
  86. package/core/audits/installable-manifest.d.ts +0 -111
  87. package/core/audits/installable-manifest.js +0 -248
  88. package/core/audits/manual/pwa-cross-browser.d.ts +0 -12
  89. package/core/audits/manual/pwa-cross-browser.js +0 -40
  90. package/core/audits/manual/pwa-each-page-has-url.d.ts +0 -12
  91. package/core/audits/manual/pwa-each-page-has-url.js +0 -38
  92. package/core/audits/manual/pwa-page-transitions.d.ts +0 -12
  93. package/core/audits/manual/pwa-page-transitions.js +0 -38
  94. package/core/audits/maskable-icon.d.ts +0 -25
  95. package/core/audits/maskable-icon.js +0 -70
  96. package/core/audits/multi-check-audit.d.ts +0 -28
  97. package/core/audits/multi-check-audit.js +0 -82
  98. package/core/audits/splash-screen.d.ts +0 -37
  99. package/core/audits/splash-screen.js +0 -98
  100. package/core/audits/themed-omnibox.d.ts +0 -42
  101. package/core/audits/themed-omnibox.js +0 -102
  102. package/core/computed/manifest-values.d.ts +0 -24
  103. package/core/computed/manifest-values.js +0 -136
  104. package/core/gather/gatherers/installability-errors.d.ts +0 -17
  105. package/core/gather/gatherers/installability-errors.js +0 -56
  106. package/core/gather/gatherers/web-app-manifest.d.ts +0 -32
  107. package/core/gather/gatherers/web-app-manifest.js +0 -106
  108. package/report/renderer/pwa-category-renderer.d.ts +0 -55
  109. package/report/renderer/pwa-category-renderer.js +0 -184
  110. package/third-party/chromium-synchronization/installability-errors-test.js +0 -79
@@ -734,18 +734,6 @@
734
734
  "core/audits/byte-efficiency/uses-text-compression.js | title": {
735
735
  "message": "啟用文字壓縮"
736
736
  },
737
- "core/audits/content-width.js | description": {
738
- "message": "如果你的應用程式內容寬度與可視區域的寬度不相符,應用程式可能無法在行動裝置螢幕上呈現最佳效果。[瞭解如何根據可視區域調整內容大小](https://developer.chrome.com/docs/lighthouse/pwa/content-width/)。"
739
- },
740
- "core/audits/content-width.js | explanation": {
741
- "message": "可視區域大小 ({innerWidth} 像素) 與視窗大小 ({outerWidth} 像素) 不相符。"
742
- },
743
- "core/audits/content-width.js | failureTitle": {
744
- "message": "未針對可視區域正確調整內容大小"
745
- },
746
- "core/audits/content-width.js | title": {
747
- "message": "已針對可視區域正確調整內容大小"
748
- },
749
737
  "core/audits/critical-request-chains.js | description": {
750
738
  "message": "下方的「關鍵要求鏈結」顯示優先載入的資源。建議你縮短鏈結長度、降低下載資源的大小,或是將非必要資源延後載入,以提高網頁載入速度。[瞭解如何避免鏈結關鍵要求](https://developer.chrome.com/docs/lighthouse/performance/critical-request-chains/)。"
751
739
  },
@@ -995,102 +983,6 @@
995
983
  "core/audits/image-size-responsive.js | title": {
996
984
  "message": "提供的圖片解析度適當"
997
985
  },
998
- "core/audits/installable-manifest.js | already-installed": {
999
- "message": "先前已安裝這個應用程式"
1000
- },
1001
- "core/audits/installable-manifest.js | cannot-download-icon": {
1002
- "message": "無法從資訊清單下載必要圖示"
1003
- },
1004
- "core/audits/installable-manifest.js | columnValue": {
1005
- "message": "失敗原因"
1006
- },
1007
- "core/audits/installable-manifest.js | description": {
1008
- "message": "透過 Service Worker 技術,你的應用程式可以使用漸進式網頁應用程式的許多功能,例如離線功能、新增至主畫面,以及推播通知。正確導入 Service Worker 和資訊清單後,瀏覽器可主動提示使用者將你的應用程式新增至主畫面,進而提升參與度。[進一步瞭解資訊清單安裝規定](https://developer.chrome.com/docs/lighthouse/pwa/installable-manifest/)。"
1009
- },
1010
- "core/audits/installable-manifest.js | displayValue": {
1011
- "message": "{itemCount,plural, =1{1 個原因}other{# 個原因}}"
1012
- },
1013
- "core/audits/installable-manifest.js | failureTitle": {
1014
- "message": "網頁應用程式資訊清單或 Service Worker 不符合安裝規定"
1015
- },
1016
- "core/audits/installable-manifest.js | ids-do-not-match": {
1017
- "message": "Play 商店應用程式網址與 Play 商店 ID 不符"
1018
- },
1019
- "core/audits/installable-manifest.js | in-incognito": {
1020
- "message": "網頁透過無痕視窗載入"
1021
- },
1022
- "core/audits/installable-manifest.js | manifest-display-not-supported": {
1023
- "message": "資訊清單「`display`」屬性必須是「`standalone`」、「`fullscreen`」或「`minimal-ui`」其中之一"
1024
- },
1025
- "core/audits/installable-manifest.js | manifest-display-override-not-supported": {
1026
- "message": "資訊清單包含「display_override」欄位,且第一個支援的顯示模式必須是「standalone」、「fullscreen」或「minimal-ui」"
1027
- },
1028
- "core/audits/installable-manifest.js | manifest-empty": {
1029
- "message": "無法擷取或剖析資訊清單,或是資訊清單沒有任何內容"
1030
- },
1031
- "core/audits/installable-manifest.js | manifest-location-changed": {
1032
- "message": "資訊清單網址在資訊清單擷取期間已變更。"
1033
- },
1034
- "core/audits/installable-manifest.js | manifest-missing-name-or-short-name": {
1035
- "message": "資訊清單不含「`name`」或「`short_name`」欄位"
1036
- },
1037
- "core/audits/installable-manifest.js | manifest-missing-suitable-icon": {
1038
- "message": "資訊清單未包含適當圖示;圖示必須為 {value0} px 以上的 PNG、SVG 或 WebP 檔案,同時必須設定 sizes 屬性,且如果設有 purpose 屬性,當中必須包含「any」。"
1039
- },
1040
- "core/audits/installable-manifest.js | no-acceptable-icon": {
1041
- "message": "未提供任何大小在 {value0} px 以上的 PNG、SVG 或 WebP 格式正方形圖示,而且 purpose 屬性未設定或設為「any」"
1042
- },
1043
- "core/audits/installable-manifest.js | no-icon-available": {
1044
- "message": "下載的圖示空白或已損毀"
1045
- },
1046
- "core/audits/installable-manifest.js | no-id-specified": {
1047
- "message": "未提供 Play 商店 ID"
1048
- },
1049
- "core/audits/installable-manifest.js | no-manifest": {
1050
- "message": "網頁沒有資訊清單 <link> 網址"
1051
- },
1052
- "core/audits/installable-manifest.js | no-url-for-service-worker": {
1053
- "message": "資訊清單中沒有「start_url」欄位,因此無法檢查 Service Worker"
1054
- },
1055
- "core/audits/installable-manifest.js | noErrorId": {
1056
- "message": "無法辨識安裝錯誤 ID「{errorId}」"
1057
- },
1058
- "core/audits/installable-manifest.js | not-from-secure-origin": {
1059
- "message": "網頁的提供來源不安全"
1060
- },
1061
- "core/audits/installable-manifest.js | not-in-main-frame": {
1062
- "message": "網頁未在主頁框中載入"
1063
- },
1064
- "core/audits/installable-manifest.js | not-offline-capable": {
1065
- "message": "網頁無法離線運作"
1066
- },
1067
- "core/audits/installable-manifest.js | pipeline-restarted": {
1068
- "message": "PWA 已解除安裝並將重設安裝規定檢查。"
1069
- },
1070
- "core/audits/installable-manifest.js | platform-not-supported-on-android": {
1071
- "message": "Android 不支援指定的應用程式平台"
1072
- },
1073
- "core/audits/installable-manifest.js | prefer-related-applications": {
1074
- "message": "資訊清單指定了 prefer_related_applications: true"
1075
- },
1076
- "core/audits/installable-manifest.js | prefer-related-applications-only-beta-stable": {
1077
- "message": "prefer_related_applications 僅適用於 Android 上的 Chrome Beta 版和穩定版。"
1078
- },
1079
- "core/audits/installable-manifest.js | protocol-timeout": {
1080
- "message": "Lighthouse 無法判斷該網頁是否可安裝。請嘗試使用較新的 Chrome 版本。"
1081
- },
1082
- "core/audits/installable-manifest.js | start-url-not-valid": {
1083
- "message": "資訊清單開始網址無效"
1084
- },
1085
- "core/audits/installable-manifest.js | title": {
1086
- "message": "網頁應用程式資訊清單和 Service Worker 符合安裝規定"
1087
- },
1088
- "core/audits/installable-manifest.js | url-not-supported-for-webapk": {
1089
- "message": "資訊清單中的某個網址包含使用者名稱、密碼或連接埠"
1090
- },
1091
- "core/audits/installable-manifest.js | warn-not-offline-capable": {
1092
- "message": "網頁無法離線運作。Chrome 從 2021 年 8 月推出 93 穩定版開始,就不會再將這個網頁視為可安裝。"
1093
- },
1094
986
  "core/audits/is-on-https.js | allowed": {
1095
987
  "message": "已允許"
1096
988
  },
@@ -1202,33 +1094,6 @@
1202
1094
  "core/audits/mainthread-work-breakdown.js | title": {
1203
1095
  "message": "將主要執行緒的工作降到最低"
1204
1096
  },
1205
- "core/audits/manual/pwa-cross-browser.js | description": {
1206
- "message": "為了盡可能觸及使用者,網站應能在所有主要瀏覽器上運作。[瞭解跨瀏覽器相容性](https://developer.chrome.com/docs/lighthouse/pwa/pwa-cross-browser/)。"
1207
- },
1208
- "core/audits/manual/pwa-cross-browser.js | title": {
1209
- "message": "網站可以在不同瀏覽器上運作"
1210
- },
1211
- "core/audits/manual/pwa-each-page-has-url.js | description": {
1212
- "message": "可確保每個網頁都能透過網址進行深層連結,而且具有專屬網址,方便你在社群媒體上分享。[進一步瞭解如何提供深層連結](https://developer.chrome.com/docs/lighthouse/pwa/pwa-each-page-has-url/)。"
1213
- },
1214
- "core/audits/manual/pwa-each-page-has-url.js | title": {
1215
- "message": "每個網頁都有一個網址"
1216
- },
1217
- "core/audits/manual/pwa-page-transitions.js | description": {
1218
- "message": "即使網路速度緩慢,當使用者輕觸不同網頁也應該要能流暢切換,這是展現效能的重要關鍵。[進一步瞭解頁面轉換](https://developer.chrome.com/docs/lighthouse/pwa/pwa-page-transitions/)。"
1219
- },
1220
- "core/audits/manual/pwa-page-transitions.js | title": {
1221
- "message": "使用者在切換頁面時不會覺得網路速度緩慢"
1222
- },
1223
- "core/audits/maskable-icon.js | description": {
1224
- "message": "在裝置上安裝應用程式時,可遮蓋的圖示可確保圖片會填滿整個形狀,圖片的上方和下方不會加上黑邊。[瞭解可遮蓋的資訊清單圖示](https://developer.chrome.com/docs/lighthouse/pwa/maskable-icon-audit/)。"
1225
- },
1226
- "core/audits/maskable-icon.js | failureTitle": {
1227
- "message": "資訊清單未包含可遮蓋的圖示"
1228
- },
1229
- "core/audits/maskable-icon.js | title": {
1230
- "message": "資訊清單包含可遮蓋的圖示"
1231
- },
1232
1097
  "core/audits/metrics/cumulative-layout-shift.js | description": {
1233
1098
  "message": "「累計版面配置轉移」指標是用於測量可見元素在可視區域內的移動情形。[進一步瞭解「累計版面配置位移」指標](https://web.dev/articles/cls)。"
1234
1099
  },
@@ -1484,24 +1349,6 @@
1484
1349
  "core/audits/server-response-time.js | title": {
1485
1350
  "message": "初始伺服器回應時間很短"
1486
1351
  },
1487
- "core/audits/splash-screen.js | description": {
1488
- "message": "透過設定啟動畫面的主題,可確保使用者從主畫面啟動你的應用程式時享有優質體驗。[進一步瞭解啟動畫面](https://developer.chrome.com/docs/lighthouse/pwa/splash-screen/)。"
1489
- },
1490
- "core/audits/splash-screen.js | failureTitle": {
1491
- "message": "未設定自訂啟動畫面"
1492
- },
1493
- "core/audits/splash-screen.js | title": {
1494
- "message": "設有自訂啟動畫面"
1495
- },
1496
- "core/audits/themed-omnibox.js | description": {
1497
- "message": "你可以將瀏覽器網址列的主題設定為與網站相符。[進一步瞭解如何設定網址列的主題](https://developer.chrome.com/docs/lighthouse/pwa/themed-omnibox/)。"
1498
- },
1499
- "core/audits/themed-omnibox.js | failureTitle": {
1500
- "message": "尚未設定網址列的主題顏色。"
1501
- },
1502
- "core/audits/themed-omnibox.js | title": {
1503
- "message": "設定網址列的主題顏色。"
1504
- },
1505
1352
  "core/audits/third-party-cookies.js | description": {
1506
1353
  "message": "未來的 Chrome 版本將不再支援第三方 Cookie。[進一步瞭解 Chrome 如何逐步停止支援第三方 Cookie](https://developer.chrome.com/en/docs/privacy-sandbox/third-party-cookie-phase-out/)。"
1507
1354
  },
@@ -1769,21 +1616,6 @@
1769
1616
  "core/config/default-config.js | performanceCategoryTitle": {
1770
1617
  "message": "效能"
1771
1618
  },
1772
- "core/config/default-config.js | pwaCategoryDescription": {
1773
- "message": "這些檢查項目可從各個方面驗證漸進式網頁應用程式。[瞭解如何打造優質的漸進式網頁應用程式](https://web.dev/articles/pwa-checklist)。"
1774
- },
1775
- "core/config/default-config.js | pwaCategoryManualDescription": {
1776
- "message": "這些是基本 [PWA 檢查清單](https://web.dev/articles/pwa-checklist)規定的項目,但 Lighthouse 不會自動進行檢查。它們不會影響你的分數,但請務必手動驗證這些項目。"
1777
- },
1778
- "core/config/default-config.js | pwaCategoryTitle": {
1779
- "message": "PWA"
1780
- },
1781
- "core/config/default-config.js | pwaInstallableGroupTitle": {
1782
- "message": "可安裝"
1783
- },
1784
- "core/config/default-config.js | pwaOptimizedGroupTitle": {
1785
- "message": "PWA 最佳化"
1786
- },
1787
1619
  "core/config/default-config.js | seoCategoryDescription": {
1788
1620
  "message": "這些檢查項目可確保你的網頁採用基本的搜尋引擎最佳化建議。請注意,Lighthouse 這裡未列入評分的其他因素還有很多,這些因素也可能會影響你的網頁搜尋結果排名,包括[網站體驗核心指標](https://web.dev/explore/vitals)的成效。[進一步瞭解 Google 搜尋基礎入門](https://support.google.com/webmasters/answer/35769)。"
1789
1621
  },
@@ -2666,9 +2498,6 @@
2666
2498
  "flow-report/src/i18n/ui-strings.js | categoryPerformance": {
2667
2499
  "message": "效能"
2668
2500
  },
2669
- "flow-report/src/i18n/ui-strings.js | categoryProgressiveWebApp": {
2670
- "message": "漸進式網頁應用程式"
2671
- },
2672
2501
  "flow-report/src/i18n/ui-strings.js | categorySeo": {
2673
2502
  "message": "搜尋引擎最佳化 (SEO)"
2674
2503
  },
@@ -3335,9 +3164,6 @@
3335
3164
  "report/renderer/report-utils.js | passedAuditsGroupTitle": {
3336
3165
  "message": "通過稽核項目"
3337
3166
  },
3338
- "report/renderer/report-utils.js | pwaRemovalMessage": {
3339
- "message": "根據 [Chrome 的新版安裝條件](https://developer.chrome.com/blog/update-install-criteria),Lighthouse 將於之後的版本淘汰 PWA 類別。如果之後要進行 PWA 測試,請參閱[新版 PWA 說明文件](https://developer.chrome.com/docs/devtools/progressive-web-apps/)。"
3340
- },
3341
3167
  "report/renderer/report-utils.js | runtimeAnalysisWindow": {
3342
3168
  "message": "初次載入網頁"
3343
3169
  },
@@ -734,18 +734,6 @@
734
734
  "core/audits/byte-efficiency/uses-text-compression.js | title": {
735
735
  "message": "启用文本压缩"
736
736
  },
737
- "core/audits/content-width.js | description": {
738
- "message": "如果应用内容的宽度与视口的宽度不一致,该应用可能不会针对移动设备屏幕进行优化。[了解如何根据视口调整内容大小](https://developer.chrome.com/docs/lighthouse/pwa/content-width/)。"
739
- },
740
- "core/audits/content-width.js | explanation": {
741
- "message": "视口大小({innerWidth} 像素)与窗口大小({outerWidth} 像素)不一致。"
742
- },
743
- "core/audits/content-width.js | failureTitle": {
744
- "message": "未根据视口正确设置内容尺寸"
745
- },
746
- "core/audits/content-width.js | title": {
747
- "message": "已根据视口正确设置内容尺寸"
748
- },
749
737
  "core/audits/critical-request-chains.js | description": {
750
738
  "message": "下面的关键请求链显示了以高优先级加载的资源。建议缩短链长、缩减资源的下载文件大小,或者推迟下载不必要的资源,从而提高网页加载速度。[了解如何避免链接关键请求](https://developer.chrome.com/docs/lighthouse/performance/critical-request-chains/)。"
751
739
  },
@@ -995,102 +983,6 @@
995
983
  "core/audits/image-size-responsive.js | title": {
996
984
  "message": "所提供的图片都采用了合适的分辨率"
997
985
  },
998
- "core/audits/installable-manifest.js | already-installed": {
999
- "message": "该应用已安装"
1000
- },
1001
- "core/audits/installable-manifest.js | cannot-download-icon": {
1002
- "message": "无法从清单下载必需的图标"
1003
- },
1004
- "core/audits/installable-manifest.js | columnValue": {
1005
- "message": "失败原因"
1006
- },
1007
- "core/audits/installable-manifest.js | description": {
1008
- "message": "Service Worker 是一项技术,可让您的应用使用很多渐进式 Web 应用功能,例如离线、添加到主屏幕和推送通知。如果 Service Worker 和清单的实现均正确无误,浏览器可主动提示用户向其主屏幕中添加您的应用,这有助于提高互动度。[详细了解清单可安装性要求](https://developer.chrome.com/docs/lighthouse/pwa/installable-manifest/)。"
1009
- },
1010
- "core/audits/installable-manifest.js | displayValue": {
1011
- "message": "{itemCount,plural, =1{1 个原因}other{# 个原因}}"
1012
- },
1013
- "core/audits/installable-manifest.js | failureTitle": {
1014
- "message": "Web 应用清单或 Service Worker 不符合可安装性要求"
1015
- },
1016
- "core/audits/installable-manifest.js | ids-do-not-match": {
1017
- "message": "Play 商店应用网址和 Play 商店 ID 不相符"
1018
- },
1019
- "core/audits/installable-manifest.js | in-incognito": {
1020
- "message": "该网页是在无痕式窗口中加载的"
1021
- },
1022
- "core/audits/installable-manifest.js | manifest-display-not-supported": {
1023
- "message": "清单 `display` 属性必须是 `standalone`、`fullscreen` 或 `minimal-ui`"
1024
- },
1025
- "core/audits/installable-manifest.js | manifest-display-override-not-supported": {
1026
- "message": "清单包含“display_override”字段,因此第一个受支持的显示模式必须是“standalone”、“fullscreen”或“minimal-ui”之一"
1027
- },
1028
- "core/audits/installable-manifest.js | manifest-empty": {
1029
- "message": "清单无法提取、为空或无法解析"
1030
- },
1031
- "core/audits/installable-manifest.js | manifest-location-changed": {
1032
- "message": "在提取清单期间,清单网址发生了更改。"
1033
- },
1034
- "core/audits/installable-manifest.js | manifest-missing-name-or-short-name": {
1035
- "message": "清单未包含 `name` 或 `short_name` 字段"
1036
- },
1037
- "core/audits/installable-manifest.js | manifest-missing-suitable-icon": {
1038
- "message": "清单未包含合适的图标 - 必须提供不小于 {value0} 像素的 PNG、SVG 或 WebP 格式图标;必须设置 sizes 属性;如果设置了 purpose 属性,其中必须包含“any”。"
1039
- },
1040
- "core/audits/installable-manifest.js | no-acceptable-icon": {
1041
- "message": "清单未提供不小于 {value0} 正方形像素的 PNG、SVG 或 WebP 格式图标,而且 purpose 属性设为“any”或未设置"
1042
- },
1043
- "core/audits/installable-manifest.js | no-icon-available": {
1044
- "message": "下载的图标为空或已损坏"
1045
- },
1046
- "core/audits/installable-manifest.js | no-id-specified": {
1047
- "message": "未提供 Play 商店 ID"
1048
- },
1049
- "core/audits/installable-manifest.js | no-manifest": {
1050
- "message": "该网页没有清单 <link> 网址"
1051
- },
1052
- "core/audits/installable-manifest.js | no-url-for-service-worker": {
1053
- "message": "如果清单不含“start_url”字段,则无法检查 Service Worker"
1054
- },
1055
- "core/audits/installable-manifest.js | noErrorId": {
1056
- "message": "系统无法识别可安装性错误 ID“{errorId}”"
1057
- },
1058
- "core/audits/installable-manifest.js | not-from-secure-origin": {
1059
- "message": "该网页不是从安全来源提供的"
1060
- },
1061
- "core/audits/installable-manifest.js | not-in-main-frame": {
1062
- "message": "该网页不是在主框架中加载的"
1063
- },
1064
- "core/audits/installable-manifest.js | not-offline-capable": {
1065
- "message": "该网页无法离线使用"
1066
- },
1067
- "core/audits/installable-manifest.js | pipeline-restarted": {
1068
- "message": "PWA 已卸载完毕,正在重置可安装性检查。"
1069
- },
1070
- "core/audits/installable-manifest.js | platform-not-supported-on-android": {
1071
- "message": "指定的应用平台在 Android 设备上不受支持"
1072
- },
1073
- "core/audits/installable-manifest.js | prefer-related-applications": {
1074
- "message": "清单指定了 prefer_related_applications: true"
1075
- },
1076
- "core/audits/installable-manifest.js | prefer-related-applications-only-beta-stable": {
1077
- "message": "prefer_related_applications 仅适用于 Android 设备上的 Chrome Beta 版和稳定版。"
1078
- },
1079
- "core/audits/installable-manifest.js | protocol-timeout": {
1080
- "message": "Lighthouse 无法确定该页面是否可安装。请在较新版本的 Chrome 中重试。"
1081
- },
1082
- "core/audits/installable-manifest.js | start-url-not-valid": {
1083
- "message": "清单起始网址无效"
1084
- },
1085
- "core/audits/installable-manifest.js | title": {
1086
- "message": "Web 应用清单和 Service Worker 符合可安装性要求"
1087
- },
1088
- "core/audits/installable-manifest.js | url-not-supported-for-webapk": {
1089
- "message": "清单中的某个网址包含用户名、密码或端口"
1090
- },
1091
- "core/audits/installable-manifest.js | warn-not-offline-capable": {
1092
- "message": "该网页无法离线使用。Chrome 于 2021 年 8 月推出 93 稳定版之后,不会将该网页视为可安装。"
1093
- },
1094
986
  "core/audits/is-on-https.js | allowed": {
1095
987
  "message": "允许"
1096
988
  },
@@ -1202,33 +1094,6 @@
1202
1094
  "core/audits/mainthread-work-breakdown.js | title": {
1203
1095
  "message": "最大限度地减少主线程工作"
1204
1096
  },
1205
- "core/audits/manual/pwa-cross-browser.js | description": {
1206
- "message": "网站应该能在所有主流浏览器中正常显示,以便覆盖尽可能多的用户。[了解跨浏览器兼容性](https://developer.chrome.com/docs/lighthouse/pwa/pwa-cross-browser/)。"
1207
- },
1208
- "core/audits/manual/pwa-cross-browser.js | title": {
1209
- "message": "网站能在各种浏览器中正常显示"
1210
- },
1211
- "core/audits/manual/pwa-each-page-has-url.js | description": {
1212
- "message": "确保各个网页可通过网址建立深层链接,并且这些网址是独一无二的,可以在社交媒体上共享。[详细了解如何提供深层链接](https://developer.chrome.com/docs/lighthouse/pwa/pwa-each-page-has-url/)。"
1213
- },
1214
- "core/audits/manual/pwa-each-page-has-url.js | title": {
1215
- "message": "每个网页都有一个网址"
1216
- },
1217
- "core/audits/manual/pwa-page-transitions.js | description": {
1218
- "message": "无论点按哪个链接,都应能快速跳转到相应页面,即使网速缓慢也应如此。若想让用户感知到出色的网页加载速度,这种体验至关重要。[详细了解网页转换](https://developer.chrome.com/docs/lighthouse/pwa/pwa-page-transitions/)。"
1219
- },
1220
- "core/audits/manual/pwa-page-transitions.js | title": {
1221
- "message": "在不同网页之间跳转时,用户感觉不到网页加载缓慢"
1222
- },
1223
- "core/audits/maskable-icon.js | description": {
1224
- "message": "利用可遮盖式图标,可确保应用安装到设备上后,图片可填满整个形状轮廓,而不会出现黑边。[了解可遮盖式清单图标](https://developer.chrome.com/docs/lighthouse/pwa/maskable-icon-audit/)。"
1225
- },
1226
- "core/audits/maskable-icon.js | failureTitle": {
1227
- "message": "清单不含可遮罩的图标"
1228
- },
1229
- "core/audits/maskable-icon.js | title": {
1230
- "message": "清单含有可遮罩的图标"
1231
- },
1232
1097
  "core/audits/metrics/cumulative-layout-shift.js | description": {
1233
1098
  "message": "Cumulative Layout Shift 旨在衡量可见元素在视口内的移动情况。[详细了解 Cumulative Layout Shift 指标](https://web.dev/articles/cls)。"
1234
1099
  },
@@ -1484,24 +1349,6 @@
1484
1349
  "core/audits/server-response-time.js | title": {
1485
1350
  "message": "初始服务器响应用时较短"
1486
1351
  },
1487
- "core/audits/splash-screen.js | description": {
1488
- "message": "选定主题的启动画面可确保用户在从主屏幕中启动您的应用时获得优质体验。[详细了解启动画面](https://developer.chrome.com/docs/lighthouse/pwa/splash-screen/)。"
1489
- },
1490
- "core/audits/splash-screen.js | failureTitle": {
1491
- "message": "未针对自定义启动画面进行配置"
1492
- },
1493
- "core/audits/splash-screen.js | title": {
1494
- "message": "已针对自定义启动画面进行配置"
1495
- },
1496
- "core/audits/themed-omnibox.js | description": {
1497
- "message": "可以为浏览器地址栏设置与您的网站相契合的主题。[详细了解如何为地址栏设置主题](https://developer.chrome.com/docs/lighthouse/pwa/themed-omnibox/)。"
1498
- },
1499
- "core/audits/themed-omnibox.js | failureTitle": {
1500
- "message": "没有为地址栏设置主题背景颜色。"
1501
- },
1502
- "core/audits/themed-omnibox.js | title": {
1503
- "message": "为地址栏设置主题背景颜色。"
1504
- },
1505
1352
  "core/audits/third-party-cookies.js | description": {
1506
1353
  "message": "在 Chrome 的某个未来版本中,对第三方 Cookie 的支持将被彻底取消。[详细了解逐步停用第三方 Cookie](https://developer.chrome.com/en/docs/privacy-sandbox/third-party-cookie-phase-out/)。"
1507
1354
  },
@@ -1769,21 +1616,6 @@
1769
1616
  "core/config/default-config.js | performanceCategoryTitle": {
1770
1617
  "message": "性能"
1771
1618
  },
1772
- "core/config/default-config.js | pwaCategoryDescription": {
1773
- "message": "此类检查会验证渐进式 Web 应用的各个方面。[了解如何构建优秀的渐进式 Web 应用](https://web.dev/articles/pwa-checklist)。"
1774
- },
1775
- "core/config/default-config.js | pwaCategoryManualDescription": {
1776
- "message": "基准 [PWA 核对清单](https://web.dev/articles/pwa-checklist)要求必须进行此类检查,但 Lighthouse 不会自动进行此类检查。它们不会影响您的得分,但您必须手动对其进行验证。"
1777
- },
1778
- "core/config/default-config.js | pwaCategoryTitle": {
1779
- "message": "PWA"
1780
- },
1781
- "core/config/default-config.js | pwaInstallableGroupTitle": {
1782
- "message": "可安装"
1783
- },
1784
- "core/config/default-config.js | pwaOptimizedGroupTitle": {
1785
- "message": "优化 PWA"
1786
- },
1787
1619
  "core/config/default-config.js | seoCategoryDescription": {
1788
1620
  "message": "此类检查可确保您的网页遵循了基本的搜索引擎优化建议。还有很多其他因素可能会影响您的网页在搜索引擎结果中的排名,但未被 Lighthouse 纳入此处的评估范围,其中包括[核心网页指标](https://web.dev/explore/vitals)衡量结果。[详细了解 Google Search Essentials](https://support.google.com/webmasters/answer/35769)。"
1789
1621
  },
@@ -2666,9 +2498,6 @@
2666
2498
  "flow-report/src/i18n/ui-strings.js | categoryPerformance": {
2667
2499
  "message": "性能"
2668
2500
  },
2669
- "flow-report/src/i18n/ui-strings.js | categoryProgressiveWebApp": {
2670
- "message": "渐进式 Web 应用"
2671
- },
2672
2501
  "flow-report/src/i18n/ui-strings.js | categorySeo": {
2673
2502
  "message": "SEO"
2674
2503
  },
@@ -3335,9 +3164,6 @@
3335
3164
  "report/renderer/report-utils.js | passedAuditsGroupTitle": {
3336
3165
  "message": "已通过的审核"
3337
3166
  },
3338
- "report/renderer/report-utils.js | pwaRemovalMessage": {
3339
- "message": "根据 [Chrome 更新后的可安装性标准](https://developer.chrome.com/blog/update-install-criteria),Lighthouse 将在未来的版本中弃用 PWA 类别。请参阅[更新后的 PWA 文档](https://developer.chrome.com/docs/devtools/progressive-web-apps/),了解今后的 PWA 测试。"
3340
- },
3341
3167
  "report/renderer/report-utils.js | runtimeAnalysisWindow": {
3342
3168
  "message": "初始网页加载"
3343
3169
  },
@@ -129,8 +129,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
129
129
  GlobalListeners: Array<Artifacts.GlobalListener>;
130
130
  /** The issues surfaced in the devtools Issues panel */
131
131
  InspectorIssues: Artifacts.InspectorIssues;
132
- /** Errors preventing page being installable as PWA. */
133
- InstallabilityErrors: Artifacts.InstallabilityErrors;
134
132
  /** JS coverage information for code used during audit. Keyed by script id. */
135
133
  // 'url' is excluded because it can be overridden by a magic sourceURL= comment, which makes keeping it a dangerous footgun!
136
134
  JsUsage: Record<string, Omit<Crdp.Profiler.ScriptCoverage, 'url'>>;
@@ -160,8 +158,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
160
158
  TraceError: Trace;
161
159
  /** Elements associated with metrics (ie: Largest Contentful Paint element). */
162
160
  TraceElements: Artifacts.TraceElement[];
163
- /** Parsed version of the page's Web App Manifest, or null if none found. */
164
- WebAppManifest: Artifacts.Manifest | null;
165
161
  /** COMPAT: A set of traces, keyed by passName. */
166
162
  traces: {[passName: string]: Trace};
167
163
  /** COMPAT: A set of DevTools debugger protocol records, keyed by passName. */
@@ -436,10 +432,6 @@ declare module Artifacts {
436
432
  // TODO(bckenny): real type for parsed manifest.
437
433
  type Manifest = ReturnType<typeof parseManifest>;
438
434
 
439
- interface InstallabilityErrors {
440
- errors: Crdp.Page.InstallabilityError[];
441
- }
442
-
443
435
  interface ImageElement {
444
436
  /** The resolved source URL of the image. Similar to `currentSrc`, but resolved for CSS images as well. */
445
437
  src: string;
@@ -601,25 +593,6 @@ declare module Artifacts {
601
593
  }
602
594
  }
603
595
 
604
- type ManifestValueCheckID = 'hasStartUrl'|'hasIconsAtLeast144px'|'hasIconsAtLeast512px'|'fetchesIcon'|'hasPWADisplayValue'|'hasBackgroundColor'|'hasThemeColor'|'hasShortName'|'hasName'|'shortNameLength'|'hasMaskableIcon';
605
-
606
- type ManifestValues = {
607
- isParseFailure: false;
608
- allChecks: {
609
- id: ManifestValueCheckID;
610
- failureText: string;
611
- passing: boolean;
612
- }[];
613
- } | {
614
- isParseFailure: true;
615
- parseFailureReason: string;
616
- allChecks: {
617
- id: ManifestValueCheckID;
618
- failureText: string;
619
- passing: boolean;
620
- }[];
621
- }
622
-
623
596
  type MeasureEntry = LHResult.MeasureEntry;
624
597
 
625
598
  interface MetricComputationDataInput {
package/types/audit.d.ts CHANGED
@@ -117,16 +117,6 @@ declare module Audit {
117
117
 
118
118
  /** Type returned by Audit.audit(). Only score is required. */
119
119
  type Product = NonNumericProduct | NumericProduct;
120
-
121
- type MultiCheckAuditP1 = Partial<Record<Artifacts.ManifestValueCheckID, boolean>>;
122
- type MultiCheckAuditP2 = Partial<Artifacts.ManifestValues>;
123
- interface MultiCheckAuditP3 {
124
- failures: Array<string>;
125
- manifestValues?: undefined;
126
- allChecks?: undefined;
127
- }
128
-
129
- type MultiCheckAuditDetails = MultiCheckAuditP1 & MultiCheckAuditP2 & MultiCheckAuditP3;
130
120
  }
131
121
 
132
122
  export default Audit;
@@ -33,6 +33,7 @@ declare module Gatherer {
33
33
  once<TEvent extends keyof CrdpEvents>(event: TEvent, callback: (...args: CrdpEvents[TEvent]) => void): void;
34
34
  off<TEvent extends keyof CrdpEvents>(event: TEvent, callback: (...args: CrdpEvents[TEvent]) => void): void;
35
35
  sendCommand<TMethod extends keyof CrdpCommands>(method: TMethod, ...params: CrdpCommands[TMethod]['paramsType']): Promise<CrdpCommands[TMethod]['returnType']>;
36
+ sendCommandAndIgnore<TMethod extends keyof CrdpCommands>(method: TMethod, ...params: CrdpCommands[TMethod]['paramsType']): Promise<void>;
36
37
  dispose(): Promise<void>;
37
38
  }
38
39
 
@@ -33,7 +33,7 @@ declare global {
33
33
  }
34
34
 
35
35
  export interface TestDfn {
36
- /** Identification of test. Can be used for group selection (e.g. `yarn smoke pwa` will run all tests with `id.includes('pwa')`). */
36
+ /** Identification of test. Can be used for group selection (e.g. `yarn smoke csp` will run all tests with `id.includes('csp')`). */
37
37
  id: string;
38
38
  /** Expected test results. */
39
39
  expectations: ExpectedRunnerResult;
@@ -1,17 +0,0 @@
1
- export default ContentWidth;
2
- declare class ContentWidth extends Audit {
3
- /**
4
- * @param {LH.Artifacts} artifacts
5
- * @param {LH.Audit.Context} context
6
- * @return {LH.Audit.Product}
7
- */
8
- static audit(artifacts: LH.Artifacts, context: LH.Audit.Context): LH.Audit.Product;
9
- }
10
- export namespace UIStrings {
11
- const title: string;
12
- const failureTitle: string;
13
- const description: string;
14
- const explanation: string;
15
- }
16
- import { Audit } from './audit.js';
17
- //# sourceMappingURL=content-width.d.ts.map
@@ -1,76 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2016 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
-
7
- import {Audit} from './audit.js';
8
- import * as i18n from '../lib/i18n/i18n.js';
9
-
10
- const UIStrings = {
11
- /** Title of a Lighthouse audit that provides detail on the content size of a web site compared to the viewport, which is the size of the screen the site is displayed on. This descriptive title is shown to users when the site's content is sized appropriately. */
12
- title: 'Content is sized correctly for the viewport',
13
- /** Title of a Lighthouse audit that provides detail on the content size of a web site compared to the viewport, which is the size of the screen the site is displayed on. This descriptive title is shown to users when the site's content is not sized appropriately. */
14
- failureTitle: 'Content is not sized correctly for the viewport',
15
- /** Description of a Lighthouse audit that tells the user why they should care that a site's content size should match its viewport size, which is the size of the screen the site is displayed on. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
16
- description: 'If the width of your app\'s content doesn\'t match the width ' +
17
- 'of the viewport, your app might not be optimized for mobile screens. ' +
18
- '[Learn how to size content for the viewport](https://developer.chrome.com/docs/lighthouse/pwa/content-width/).',
19
- /**
20
- * @description Explanatory message stating that the viewport size and window size differ.
21
- * @example {100} innerWidth
22
- * @example {101} outerWidth
23
- * */
24
- explanation: 'The viewport size of {innerWidth}px does not match the window ' +
25
- 'size of {outerWidth}px.',
26
- };
27
-
28
- const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
29
-
30
- class ContentWidth extends Audit {
31
- /**
32
- * @return {LH.Audit.Meta}
33
- */
34
- static get meta() {
35
- return {
36
- id: 'content-width',
37
- title: str_(UIStrings.title),
38
- failureTitle: str_(UIStrings.failureTitle),
39
- description: str_(UIStrings.description),
40
- requiredArtifacts: ['ViewportDimensions'],
41
- };
42
- }
43
-
44
- /**
45
- * @param {LH.Artifacts} artifacts
46
- * @param {LH.Audit.Context} context
47
- * @return {LH.Audit.Product}
48
- */
49
- static audit(artifacts, context) {
50
- const viewportWidth = artifacts.ViewportDimensions.innerWidth;
51
- const windowWidth = artifacts.ViewportDimensions.outerWidth;
52
- const widthsMatch = viewportWidth === windowWidth;
53
-
54
- if (context.settings.formFactor === 'desktop') {
55
- return {
56
- score: 1,
57
- notApplicable: true,
58
- };
59
- }
60
-
61
- let explanation;
62
- if (!widthsMatch) {
63
- explanation = str_(UIStrings.explanation,
64
- {innerWidth: artifacts.ViewportDimensions.innerWidth,
65
- outerWidth: artifacts.ViewportDimensions.outerWidth});
66
- }
67
-
68
- return {
69
- score: Number(widthsMatch),
70
- explanation,
71
- };
72
- }
73
- }
74
-
75
- export default ContentWidth;
76
- export {UIStrings};