lighthouse 12.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/run.js +5 -38
- package/cli/test/smokehouse/lighthouse-runners/bundle.js +1 -1
- package/cli/test/smokehouse/smokehouse.js +11 -1
- package/core/audits/accessibility/aria-allowed-role.js +7 -9
- package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +2 -2
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +3 -3
- package/core/audits/byte-efficiency/offscreen-images.js +1 -1
- package/core/audits/byte-efficiency/render-blocking-resources.d.ts +3 -3
- package/core/audits/byte-efficiency/render-blocking-resources.js +10 -10
- package/core/audits/dobetterweb/uses-http2.d.ts +2 -2
- package/core/audits/dobetterweb/uses-http2.js +5 -5
- package/core/audits/long-tasks.d.ts +7 -6
- package/core/audits/long-tasks.js +5 -4
- package/core/audits/metrics/first-meaningful-paint.d.ts +1 -17
- package/core/audits/metrics/first-meaningful-paint.js +5 -47
- package/core/audits/metrics/interactive.d.ts +1 -1
- package/core/audits/metrics/interactive.js +1 -1
- package/core/audits/predictive-perf.js +0 -6
- package/core/audits/prioritize-lcp-image.d.ts +1 -1
- package/core/audits/prioritize-lcp-image.js +2 -2
- package/core/audits/redirects.js +2 -3
- package/core/audits/third-party-facades.js +1 -1
- package/core/audits/third-party-summary.js +1 -1
- package/core/audits/uses-rel-preconnect.js +2 -2
- package/core/audits/uses-rel-preload.js +9 -9
- package/core/computed/critical-request-chains.js +3 -3
- package/core/computed/document-urls.js +3 -2
- package/core/computed/load-simulator.d.ts +4 -4
- package/core/computed/load-simulator.js +3 -54
- package/core/computed/main-resource.js +3 -2
- package/core/computed/metrics/interactive.d.ts +6 -0
- package/core/computed/metrics/interactive.js +2 -2
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +4 -4
- package/core/computed/metrics/lantern-first-contentful-paint.js +3 -3
- package/core/computed/metrics/lantern-interactive.d.ts +4 -4
- package/core/computed/metrics/lantern-interactive.js +6 -6
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +4 -4
- package/core/computed/metrics/lantern-largest-contentful-paint.js +3 -3
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +4 -4
- package/core/computed/metrics/lantern-max-potential-fid.js +3 -3
- package/core/computed/metrics/lantern-metric.d.ts +21 -2
- package/core/computed/metrics/lantern-metric.js +39 -4
- package/core/computed/metrics/lantern-speed-index.d.ts +4 -4
- package/core/computed/metrics/lantern-speed-index.js +4 -4
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +4 -4
- package/core/computed/metrics/lantern-total-blocking-time.js +3 -3
- package/core/computed/metrics/timing-summary.js +0 -6
- package/core/computed/metrics/total-blocking-time.js +3 -1
- package/core/computed/navigation-insights.d.ts +2 -20
- package/core/computed/network-analysis.d.ts +0 -5
- package/core/computed/network-analysis.js +2 -42
- package/core/computed/page-dependency-graph.d.ts +5 -3
- package/core/computed/page-dependency-graph.js +17 -7
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/computed/tbt-impact-tasks.js +4 -2
- package/core/computed/trace-engine-result.d.ts +0 -11
- package/core/computed/trace-engine-result.js +5 -19
- package/core/config/constants.d.ts +28 -53
- package/core/config/constants.js +2 -43
- package/core/gather/driver/navigation.js +1 -1
- package/core/gather/driver/network-monitor.d.ts +2 -1
- package/core/gather/driver/network-monitor.js +4 -4
- package/core/gather/driver/target-manager.d.ts +1 -1
- package/core/gather/driver.d.ts +0 -12
- package/core/gather/driver.js +1 -26
- package/core/gather/gatherers/inspector-issues.js +1 -0
- package/core/gather/gatherers/root-causes.js +0 -1
- package/core/gather/session.d.ts +5 -3
- package/core/gather/session.js +22 -1
- package/core/lib/asset-saver.d.ts +13 -9
- package/core/lib/asset-saver.js +77 -30
- package/core/lib/bf-cache-strings.js +2 -2
- package/core/lib/lantern/{base-node.d.ts → BaseNode.d.ts} +7 -9
- package/core/lib/lantern/{base-node.js → BaseNode.js} +6 -6
- package/core/lib/lantern/BaseNode.test.js +385 -0
- package/core/lib/lantern/CpuNode.d.ts +43 -0
- package/core/lib/lantern/{cpu-node.js → CpuNode.js} +8 -9
- package/core/lib/lantern/{lantern-error.d.ts → LanternError.d.ts} +1 -1
- package/core/lib/lantern/{metric.d.ts → Metric.d.ts} +23 -25
- package/core/lib/lantern/{metric.js → Metric.js} +14 -16
- package/core/lib/lantern/{network-node.d.ts → NetworkNode.d.ts} +6 -7
- package/core/lib/lantern/{network-node.js → NetworkNode.js} +7 -9
- package/core/lib/lantern/PageDependencyGraph.d.ts +82 -0
- package/core/lib/lantern/{page-dependency-graph.js → PageDependencyGraph.js} +185 -50
- package/core/lib/lantern/PageDependencyGraph.test.js +654 -0
- package/core/{computed/metrics/tbt-utils.d.ts → lib/lantern/TBTUtils.d.ts} +1 -1
- package/core/lib/lantern/TBTUtils.test.d.ts +2 -0
- package/core/lib/lantern/TBTUtils.test.js +130 -0
- package/core/lib/lantern/TraceEngineComputationData.d.ts +25 -0
- package/core/lib/lantern/TraceEngineComputationData.js +466 -0
- package/core/lib/lantern/lantern.d.ts +19 -7
- package/core/lib/lantern/lantern.js +21 -1
- package/core/lib/lantern/metrics/{first-contentful-paint.d.ts → FirstContentfulPaint.d.ts} +11 -11
- package/core/lib/lantern/metrics/{first-contentful-paint.js → FirstContentfulPaint.js} +11 -13
- package/core/lib/lantern/metrics/FirstContentfulPaint.test.js +54 -0
- package/core/lib/lantern/metrics/Interactive.d.ts +20 -0
- package/core/lib/lantern/metrics/{interactive.js → Interactive.js} +23 -26
- package/core/lib/lantern/metrics/Interactive.test.js +56 -0
- package/core/lib/lantern/metrics/LargestContentfulPaint.d.ts +19 -0
- package/core/lib/lantern/metrics/{largest-contentful-paint.js → LargestContentfulPaint.js} +16 -19
- package/core/lib/lantern/metrics/LargestContentfulPaint.test.js +42 -0
- package/core/lib/lantern/metrics/MaxPotentialFID.d.ts +24 -0
- package/core/lib/lantern/metrics/{max-potential-fid.js → MaxPotentialFID.js} +12 -13
- package/core/lib/lantern/metrics/MetricTestUtils.d.ts +19 -0
- package/core/lib/lantern/metrics/MetricTestUtils.js +48 -0
- package/core/lib/lantern/metrics/{speed-index.d.ts → SpeedIndex.d.ts} +7 -13
- package/core/lib/lantern/metrics/{speed-index.js → SpeedIndex.js} +14 -16
- package/core/lib/lantern/metrics/SpeedIndex.test.js +83 -0
- package/core/lib/lantern/metrics/TotalBlockingTime.d.ts +25 -0
- package/core/lib/lantern/metrics/{total-blocking-time.js → TotalBlockingTime.js} +13 -16
- package/core/lib/lantern/metrics/__snapshots__/FirstContentfulPaint.test.js.snap +11 -0
- package/core/lib/lantern/metrics/__snapshots__/Interactive.test.js.snap +17 -0
- package/core/lib/lantern/metrics/metrics.d.ts +9 -0
- package/core/lib/lantern/metrics/metrics.js +16 -0
- package/core/lib/lantern/{simulator/connection-pool.d.ts → simulation/ConnectionPool.d.ts} +15 -15
- package/core/lib/lantern/{simulator/connection-pool.js → simulation/ConnectionPool.js} +25 -25
- package/core/lib/lantern/simulation/ConnectionPool.test.js +195 -0
- package/core/lib/lantern/simulation/Constants.d.ts +52 -0
- package/core/lib/lantern/simulation/Constants.js +48 -0
- package/core/lib/lantern/{simulator/dns-cache.d.ts → simulation/DNSCache.d.ts} +3 -3
- package/core/lib/lantern/{simulator/dns-cache.js → simulation/DNSCache.js} +2 -2
- package/core/lib/lantern/simulation/DNSCache.test.js +72 -0
- package/core/lib/lantern/{simulator/network-analyzer.d.ts → simulation/NetworkAnalyzer.d.ts} +34 -21
- package/core/lib/lantern/{simulator/network-analyzer.js → simulation/NetworkAnalyzer.js} +106 -57
- package/core/lib/lantern/simulation/NetworkAnalyzer.test.js +475 -0
- package/core/lib/lantern/{simulator/simulator-timing-map.d.ts → simulation/SimulationTimingMap.d.ts} +7 -7
- package/core/lib/lantern/{simulator/simulator-timing-map.js → simulation/SimulationTimingMap.js} +5 -6
- package/core/lib/lantern/{simulator/simulator.d.ts → simulation/Simulator.d.ts} +21 -19
- package/core/lib/lantern/{simulator/simulator.js → simulation/Simulator.js} +100 -45
- package/core/lib/lantern/simulation/Simulator.test.js +434 -0
- package/core/lib/lantern/simulation/TCPConnection.test.d.ts +2 -0
- package/core/lib/lantern/simulation/TCPConnection.test.js +374 -0
- package/core/lib/lantern/{simulator/tcp-connection.d.ts → simulation/TcpConnection.d.ts} +2 -2
- package/core/lib/lantern/{simulator/tcp-connection.js → simulation/TcpConnection.js} +1 -1
- package/core/lib/lantern/simulation/simulation.d.ts +21 -0
- package/core/lib/lantern/simulation/simulation.js +28 -0
- package/core/lib/lantern/types/lantern.d.ts +145 -20
- package/core/lib/lantern-trace-saver.d.ts +4 -4
- package/core/lib/lantern-trace-saver.js +4 -4
- package/core/lib/navigation-error.js +3 -3
- package/core/lib/network-recorder.js +2 -2
- package/core/lib/network-request.d.ts +29 -3
- package/core/lib/network-request.js +20 -13
- package/core/lib/tracehouse/trace-processor.d.ts +0 -2
- package/core/lib/tracehouse/trace-processor.js +1 -31
- package/core/lib/traces/metric-trace-events.js +0 -5
- package/dist/report/bundle.esm.js +1 -1
- package/dist/report/flow.js +1 -1
- package/dist/report/standalone.js +1 -1
- package/package.json +14 -13
- package/report/renderer/performance-category-renderer.js +1 -1
- package/shared/localization/locales/ar-XB.json +43 -4
- package/shared/localization/locales/ar.json +43 -4
- package/shared/localization/locales/bg.json +43 -4
- package/shared/localization/locales/ca.json +44 -5
- package/shared/localization/locales/cs.json +43 -4
- package/shared/localization/locales/da.json +43 -4
- package/shared/localization/locales/de.json +43 -4
- package/shared/localization/locales/el.json +43 -4
- package/shared/localization/locales/en-GB.json +42 -3
- package/shared/localization/locales/en-US.json +4 -4
- package/shared/localization/locales/en-XA.json +43 -4
- package/shared/localization/locales/en-XL.json +4 -4
- package/shared/localization/locales/es-419.json +43 -4
- package/shared/localization/locales/es.json +42 -3
- package/shared/localization/locales/fi.json +43 -4
- package/shared/localization/locales/fil.json +42 -3
- package/shared/localization/locales/fr.json +42 -3
- package/shared/localization/locales/he.json +48 -9
- package/shared/localization/locales/hi.json +43 -4
- package/shared/localization/locales/hr.json +43 -4
- package/shared/localization/locales/hu.json +42 -3
- package/shared/localization/locales/id.json +42 -3
- package/shared/localization/locales/it.json +43 -4
- package/shared/localization/locales/ja.json +42 -3
- package/shared/localization/locales/ko.json +43 -4
- package/shared/localization/locales/lt.json +42 -3
- package/shared/localization/locales/lv.json +43 -4
- package/shared/localization/locales/nl.json +44 -5
- package/shared/localization/locales/no.json +42 -3
- package/shared/localization/locales/pl.json +43 -4
- package/shared/localization/locales/pt-PT.json +43 -4
- package/shared/localization/locales/pt.json +43 -4
- package/shared/localization/locales/ro.json +43 -4
- package/shared/localization/locales/ru.json +43 -4
- package/shared/localization/locales/sk.json +43 -4
- package/shared/localization/locales/sl.json +42 -3
- package/shared/localization/locales/sr-Latn.json +43 -4
- package/shared/localization/locales/sr.json +43 -4
- package/shared/localization/locales/sv.json +42 -3
- package/shared/localization/locales/ta.json +42 -3
- package/shared/localization/locales/te.json +43 -4
- package/shared/localization/locales/th.json +44 -5
- package/shared/localization/locales/tr.json +43 -4
- package/shared/localization/locales/uk.json +43 -4
- package/shared/localization/locales/vi.json +43 -4
- package/shared/localization/locales/zh-HK.json +43 -4
- package/shared/localization/locales/zh-TW.json +43 -4
- package/shared/localization/locales/zh.json +43 -4
- package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +1 -0
- package/tsconfig-all.json +1 -0
- package/tsconfig.json +11 -7
- package/types/artifacts.d.ts +23 -25
- package/types/gatherer.d.ts +2 -3
- package/types/lhr/lhr.d.ts +2 -0
- package/core/computed/metrics/first-meaningful-paint.d.ts +0 -21
- package/core/computed/metrics/first-meaningful-paint.js +0 -44
- package/core/computed/metrics/lantern-first-meaningful-paint.d.ts +0 -25
- package/core/computed/metrics/lantern-first-meaningful-paint.js +0 -43
- package/core/lib/lantern/cpu-node.d.ts +0 -44
- package/core/lib/lantern/metrics/first-meaningful-paint.d.ts +0 -6
- package/core/lib/lantern/metrics/first-meaningful-paint.js +0 -64
- package/core/lib/lantern/metrics/interactive.d.ts +0 -26
- package/core/lib/lantern/metrics/largest-contentful-paint.d.ts +0 -19
- package/core/lib/lantern/metrics/max-potential-fid.d.ts +0 -30
- package/core/lib/lantern/metrics/total-blocking-time.d.ts +0 -31
- package/core/lib/lantern/page-dependency-graph.d.ts +0 -58
- /package/core/lib/lantern/{lantern-error.js → LanternError.js} +0 -0
- /package/core/{computed/metrics/tbt-utils.js → lib/lantern/TBTUtils.js} +0 -0
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"message": "Các thuộc tính `[aria-*]` khớp với vai trò tương ứng"
|
|
19
19
|
},
|
|
20
20
|
"core/audits/accessibility/aria-allowed-role.js | description": {
|
|
21
|
-
"message": "
|
|
21
|
+
"message": "Nhiều phần tử HTML chỉ có thể được chỉ định những vai trò nhất định của ARIA. Việc sử dụng vai trò của ARIA cho các phần tử không được phép có thể ảnh hưởng đến khả năng hỗ trợ tiếp cận của trang web. [Tìm hiểu thêm về các vai trò của ARIA](https://dequeuniversity.com/rules/axe/4.9/aria-allowed-role)."
|
|
22
22
|
},
|
|
23
23
|
"core/audits/accessibility/aria-allowed-role.js | failureTitle": {
|
|
24
|
-
"message": "
|
|
24
|
+
"message": "Sử dụng vai trò của ARIA cho các phần tử không tương thích"
|
|
25
25
|
},
|
|
26
26
|
"core/audits/accessibility/aria-allowed-role.js | title": {
|
|
27
|
-
"message": "
|
|
27
|
+
"message": "Chỉ sử dụng vai trò của ARIA cho các phần tử tương thích"
|
|
28
28
|
},
|
|
29
29
|
"core/audits/accessibility/aria-command-name.js | description": {
|
|
30
30
|
"message": "Khi một phần tử không có tên thành phần hỗ trợ tiếp cận, trình đọc màn hình sẽ gọi phần tử đó bằng một tên gọi chung, dẫn đến việc người dùng trình đọc màn hình không sử dụng được phần tử này. [Tìm hiểu cách giúp các phần tử lệnh dễ tiếp cận hơn](https://dequeuniversity.com/rules/axe/4.9/aria-command-name)."
|
|
@@ -35,6 +35,24 @@
|
|
|
35
35
|
"core/audits/accessibility/aria-command-name.js | title": {
|
|
36
36
|
"message": "Các phần tử `button`, `link` và `menuitem` có tên dễ đọc"
|
|
37
37
|
},
|
|
38
|
+
"core/audits/accessibility/aria-conditional-attr.js | description": {
|
|
39
|
+
"message": "Một số thuộc tính ARIA chỉ có thể được sử dụng trên một phần tử trong những điều kiện nhất định. [Tìm hiểu thêm về các thuộc tính ARIA có điều kiện](https://dequeuniversity.com/rules/axe/4.9/aria-conditional-attr)."
|
|
40
|
+
},
|
|
41
|
+
"core/audits/accessibility/aria-conditional-attr.js | failureTitle": {
|
|
42
|
+
"message": "Các thuộc tính ARIA không được dùng theo chỉ định cho vai trò của phần tử"
|
|
43
|
+
},
|
|
44
|
+
"core/audits/accessibility/aria-conditional-attr.js | title": {
|
|
45
|
+
"message": "Các thuộc tính ARIA được dùng theo chỉ định cho vai trò của phần tử"
|
|
46
|
+
},
|
|
47
|
+
"core/audits/accessibility/aria-deprecated-role.js | description": {
|
|
48
|
+
"message": "Công nghệ hỗ trợ có thể sẽ không xử lý đúng cách đối với các vai trò của ARIA mà Chrome không còn hỗ trợ. [Tìm hiểu thêm về các vai trò của ARIA mà Chrome không còn hỗ trợ](https://dequeuniversity.com/rules/axe/4.9/aria-deprecated-role)."
|
|
49
|
+
},
|
|
50
|
+
"core/audits/accessibility/aria-deprecated-role.js | failureTitle": {
|
|
51
|
+
"message": "Các vai trò của ARIA mà Chrome không còn hỗ trợ đã được sử dụng"
|
|
52
|
+
},
|
|
53
|
+
"core/audits/accessibility/aria-deprecated-role.js | title": {
|
|
54
|
+
"message": "Các vai trò của ARIA mà Chrome không còn hỗ trợ không được sử dụng"
|
|
55
|
+
},
|
|
38
56
|
"core/audits/accessibility/aria-dialog-name.js | description": {
|
|
39
57
|
"message": "Các phần tử hộp thoại của ARIA không có tên thành phần hỗ trợ tiếp cận có thể khiến người dùng trình đọc màn hình không phân biệt được mục đích của các phần tử này. [Tìm hiểu cách giúp các phần tử hộp thoại của ARIA dễ tiếp cận hơn](https://dequeuniversity.com/rules/axe/4.9/aria-dialog-name)."
|
|
40
58
|
},
|
|
@@ -89,6 +107,15 @@
|
|
|
89
107
|
"core/audits/accessibility/aria-progressbar-name.js | title": {
|
|
90
108
|
"message": "Các phần tử `progressbar` của ARIA có tên dễ đọc"
|
|
91
109
|
},
|
|
110
|
+
"core/audits/accessibility/aria-prohibited-attr.js | description": {
|
|
111
|
+
"message": "Việc sử dụng các thuộc tính ARIA ở vai trò bị cấm có thể khiến thông tin quan trọng không được truyền đạt tới những người dùng công nghệ hỗ trợ. [Tìm hiểu thêm về các vai trò bị cấm của ARIA](https://dequeuniversity.com/rules/axe/4.9/aria-prohibited-attr)."
|
|
112
|
+
},
|
|
113
|
+
"core/audits/accessibility/aria-prohibited-attr.js | failureTitle": {
|
|
114
|
+
"message": "Các phần tử sử dụng thuộc tính ARIA bị cấm"
|
|
115
|
+
},
|
|
116
|
+
"core/audits/accessibility/aria-prohibited-attr.js | title": {
|
|
117
|
+
"message": "Các phần tử chỉ sử dụng thuộc tính ARIA được phép"
|
|
118
|
+
},
|
|
92
119
|
"core/audits/accessibility/aria-required-attr.js | description": {
|
|
93
120
|
"message": "Một số vai trò ARIA có các thuộc tính bắt buộc mô tả trạng thái của phần tử cho trình đọc màn hình. [Tìm hiểu thêm về các vai trò và thuộc tính bắt buộc](https://dequeuniversity.com/rules/axe/4.9/aria-required-attr)."
|
|
94
121
|
},
|
|
@@ -1175,6 +1202,15 @@
|
|
|
1175
1202
|
"core/audits/prioritize-lcp-image.js | title": {
|
|
1176
1203
|
"message": "Tải trước hình ảnh có Thời gian hiển thị nội dung lớn nhất"
|
|
1177
1204
|
},
|
|
1205
|
+
"core/audits/redirects-http.js | description": {
|
|
1206
|
+
"message": "Hãy nhớ chuyển hướng tất cả lưu lượng truy cập HTTP tới HTTPS để bật các tính năng web an toàn cho tất cả người dùng. [Tìm hiểu thêm](https://developer.chrome.com/docs/lighthouse/pwa/redirects-http/)."
|
|
1207
|
+
},
|
|
1208
|
+
"core/audits/redirects-http.js | failureTitle": {
|
|
1209
|
+
"message": "Không chuyển hướng lưu lượng truy cập HTTP tới HTTPS"
|
|
1210
|
+
},
|
|
1211
|
+
"core/audits/redirects-http.js | title": {
|
|
1212
|
+
"message": "Chuyển hướng lưu lượng truy cập HTTP tới HTTPS"
|
|
1213
|
+
},
|
|
1178
1214
|
"core/audits/redirects.js | description": {
|
|
1179
1215
|
"message": "Các lần chuyển hướng sẽ khiến tốc độ tải trang chậm thêm. [Tìm hiểu cách tránh các lần chuyển hướng trang](https://developer.chrome.com/docs/lighthouse/performance/redirects/)."
|
|
1180
1216
|
},
|
|
@@ -1713,7 +1749,7 @@
|
|
|
1713
1749
|
"message": "Những trang sử dụng API nối tiếp không đủ điều kiện dùng bộ nhớ đệm cho thao tác tiến/lùi."
|
|
1714
1750
|
},
|
|
1715
1751
|
"core/lib/bf-cache-strings.js | contentWebAuthenticationAPI": {
|
|
1716
|
-
"message": "Những trang sử dụng API
|
|
1752
|
+
"message": "Những trang sử dụng WebAuthentication API không đủ điều kiện dùng bộ nhớ đệm cho thao tác tiến/lùi."
|
|
1717
1753
|
},
|
|
1718
1754
|
"core/lib/bf-cache-strings.js | contentWebBluetooth": {
|
|
1719
1755
|
"message": "Những trang sử dụng API WebBluetooth không đủ điều kiện dùng bộ nhớ đệm cho thao tác tiến/lùi."
|
|
@@ -2432,6 +2468,9 @@
|
|
|
2432
2468
|
"core/lib/lh-error.js | requestContentTimeout": {
|
|
2433
2469
|
"message": "Quá trình tìm nạp nội dung tài nguyên đã vượt quá thời gian phân bổ"
|
|
2434
2470
|
},
|
|
2471
|
+
"core/lib/lh-error.js | targetCrashed": {
|
|
2472
|
+
"message": "Thẻ trình duyệt đã gặp sự cố bất ngờ."
|
|
2473
|
+
},
|
|
2435
2474
|
"core/lib/lh-error.js | urlInvalid": {
|
|
2436
2475
|
"message": "URL bạn cung cấp có vẻ không hợp lệ."
|
|
2437
2476
|
},
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"message": "`[aria-*]` 屬性與其角色相符"
|
|
19
19
|
},
|
|
20
20
|
"core/audits/accessibility/aria-allowed-role.js | description": {
|
|
21
|
-
"message": "
|
|
21
|
+
"message": "Many HTML elements can only be assigned certain ARIA roles. Using ARIA roles where they are not allowed can interfere with the accessibility of the web page. [Learn more about ARIA roles](https://dequeuniversity.com/rules/axe/4.9/aria-allowed-role)."
|
|
22
22
|
},
|
|
23
23
|
"core/audits/accessibility/aria-allowed-role.js | failureTitle": {
|
|
24
|
-
"message": "
|
|
24
|
+
"message": "Uses ARIA roles on incompatible elements"
|
|
25
25
|
},
|
|
26
26
|
"core/audits/accessibility/aria-allowed-role.js | title": {
|
|
27
|
-
"message": "
|
|
27
|
+
"message": "Uses ARIA roles only on compatible elements"
|
|
28
28
|
},
|
|
29
29
|
"core/audits/accessibility/aria-command-name.js | description": {
|
|
30
30
|
"message": "如果元素沒有無障礙名稱,螢幕閱讀器只會讀出一般名稱,導致依賴螢幕閱讀器的使用者無法使用該欄位。[瞭解如何讓指令元素更容易使用](https://dequeuniversity.com/rules/axe/4.9/aria-command-name)。"
|
|
@@ -35,6 +35,24 @@
|
|
|
35
35
|
"core/audits/accessibility/aria-command-name.js | title": {
|
|
36
36
|
"message": "`button`、`link` 和 `menuitem` 元素具有無障礙名稱"
|
|
37
37
|
},
|
|
38
|
+
"core/audits/accessibility/aria-conditional-attr.js | description": {
|
|
39
|
+
"message": "元素的部分 ARIA 屬性只能在特定條件下使用。[進一步瞭解條件式 ARIA 屬性](https://dequeuniversity.com/rules/axe/4.9/aria-conditional-attr)。"
|
|
40
|
+
},
|
|
41
|
+
"core/audits/accessibility/aria-conditional-attr.js | failureTitle": {
|
|
42
|
+
"message": "未按照指定方式在元素角色中使用 ARIA 屬性"
|
|
43
|
+
},
|
|
44
|
+
"core/audits/accessibility/aria-conditional-attr.js | title": {
|
|
45
|
+
"message": "按照指定方式在元素角色中使用 ARIA 屬性"
|
|
46
|
+
},
|
|
47
|
+
"core/audits/accessibility/aria-deprecated-role.js | description": {
|
|
48
|
+
"message": "輔助技術可能無法正確處理已淘汰的 ARIA 角色。[進一步瞭解已淘汰的 ARIA 角色](https://dequeuniversity.com/rules/axe/4.9/aria-deprecated-role)。"
|
|
49
|
+
},
|
|
50
|
+
"core/audits/accessibility/aria-deprecated-role.js | failureTitle": {
|
|
51
|
+
"message": "使用已淘汰的 ARIA 角色"
|
|
52
|
+
},
|
|
53
|
+
"core/audits/accessibility/aria-deprecated-role.js | title": {
|
|
54
|
+
"message": "未使用已淘汰的 ARIA 角色"
|
|
55
|
+
},
|
|
38
56
|
"core/audits/accessibility/aria-dialog-name.js | description": {
|
|
39
57
|
"message": "如果 ARIA 對話框元素沒有無障礙名稱,螢幕閱讀器使用者就可能無法分辨這些元素的用途。[瞭解如何讓 ARIA 對話框元素更易用](https://dequeuniversity.com/rules/axe/4.9/aria-dialog-name)。"
|
|
40
58
|
},
|
|
@@ -89,6 +107,15 @@
|
|
|
89
107
|
"core/audits/accessibility/aria-progressbar-name.js | title": {
|
|
90
108
|
"message": "ARIA `progressbar` 元素具有無障礙名稱"
|
|
91
109
|
},
|
|
110
|
+
"core/audits/accessibility/aria-prohibited-attr.js | description": {
|
|
111
|
+
"message": "如果在禁止使用 ARIA 屬性的角色中使用這些屬性,可能會導致輔助技術使用者無法取得重要資料。[進一步瞭解禁止使用的 ARIA 角色](https://dequeuniversity.com/rules/axe/4.9/aria-prohibited-attr)。"
|
|
112
|
+
},
|
|
113
|
+
"core/audits/accessibility/aria-prohibited-attr.js | failureTitle": {
|
|
114
|
+
"message": "多項元素使用禁用的 ARIA 屬性"
|
|
115
|
+
},
|
|
116
|
+
"core/audits/accessibility/aria-prohibited-attr.js | title": {
|
|
117
|
+
"message": "元素僅使用允許的 ARIA 屬性"
|
|
118
|
+
},
|
|
92
119
|
"core/audits/accessibility/aria-required-attr.js | description": {
|
|
93
120
|
"message": "部分 ARIA 角色的必要屬性會向螢幕閱讀器的使用者說明元素狀態。[進一步瞭解角色和必要屬性](https://dequeuniversity.com/rules/axe/4.9/aria-required-attr)。"
|
|
94
121
|
},
|
|
@@ -1175,6 +1202,15 @@
|
|
|
1175
1202
|
"core/audits/prioritize-lcp-image.js | title": {
|
|
1176
1203
|
"message": "預先載入「最大內容繪製」圖片"
|
|
1177
1204
|
},
|
|
1205
|
+
"core/audits/redirects-http.js | description": {
|
|
1206
|
+
"message": "請確認是否已將所有 HTTP 流量重新導向至 HTTPS,以便為所有使用者提供安全的網絡功能。[瞭解詳情](https://developer.chrome.com/docs/lighthouse/pwa/redirects-http/)。"
|
|
1207
|
+
},
|
|
1208
|
+
"core/audits/redirects-http.js | failureTitle": {
|
|
1209
|
+
"message": "尚未將 HTTP 流量重新導向至 HTTPS"
|
|
1210
|
+
},
|
|
1211
|
+
"core/audits/redirects-http.js | title": {
|
|
1212
|
+
"message": "將 HTTP 流量重新導向至 HTTPS"
|
|
1213
|
+
},
|
|
1178
1214
|
"core/audits/redirects.js | description": {
|
|
1179
1215
|
"message": "重新導向會導致頁面延遲載入。[瞭解如何避免網頁重新導向](https://developer.chrome.com/docs/lighthouse/performance/redirects/)。"
|
|
1180
1216
|
},
|
|
@@ -1713,7 +1749,7 @@
|
|
|
1713
1749
|
"message": "使用序號 API 的網頁不符合向前/返回快取的資格。"
|
|
1714
1750
|
},
|
|
1715
1751
|
"core/lib/bf-cache-strings.js | contentWebAuthenticationAPI": {
|
|
1716
|
-
"message": "使用
|
|
1752
|
+
"message": "使用 WebAuthentication API 的網頁不符合向前/返回快取的資格。"
|
|
1717
1753
|
},
|
|
1718
1754
|
"core/lib/bf-cache-strings.js | contentWebBluetooth": {
|
|
1719
1755
|
"message": "使用 WebBluetooth API 的網頁不符合向前/返回快取的資格。"
|
|
@@ -2432,6 +2468,9 @@
|
|
|
2432
2468
|
"core/lib/lh-error.js | requestContentTimeout": {
|
|
2433
2469
|
"message": "擷取資源內容的時間超出系統分配上限。"
|
|
2434
2470
|
},
|
|
2471
|
+
"core/lib/lh-error.js | targetCrashed": {
|
|
2472
|
+
"message": "瀏覽器分頁已意外當機。"
|
|
2473
|
+
},
|
|
2435
2474
|
"core/lib/lh-error.js | urlInvalid": {
|
|
2436
2475
|
"message": "您提供的網址無效。"
|
|
2437
2476
|
},
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"message": "`[aria-*]` 屬性與其角色相符"
|
|
19
19
|
},
|
|
20
20
|
"core/audits/accessibility/aria-allowed-role.js | description": {
|
|
21
|
-
"message": "
|
|
21
|
+
"message": "Many HTML elements can only be assigned certain ARIA roles. Using ARIA roles where they are not allowed can interfere with the accessibility of the web page. [Learn more about ARIA roles](https://dequeuniversity.com/rules/axe/4.9/aria-allowed-role)."
|
|
22
22
|
},
|
|
23
23
|
"core/audits/accessibility/aria-allowed-role.js | failureTitle": {
|
|
24
|
-
"message": "
|
|
24
|
+
"message": "Uses ARIA roles on incompatible elements"
|
|
25
25
|
},
|
|
26
26
|
"core/audits/accessibility/aria-allowed-role.js | title": {
|
|
27
|
-
"message": "
|
|
27
|
+
"message": "Uses ARIA roles only on compatible elements"
|
|
28
28
|
},
|
|
29
29
|
"core/audits/accessibility/aria-command-name.js | description": {
|
|
30
30
|
"message": "如果元素沒有無障礙元素名稱,螢幕閱讀器只會讀出通用名稱,這樣仰賴螢幕閱讀器的使用者就無法知道這個元素的用途。[瞭解如何讓指令元素更容易使用](https://dequeuniversity.com/rules/axe/4.9/aria-command-name)。"
|
|
@@ -35,6 +35,24 @@
|
|
|
35
35
|
"core/audits/accessibility/aria-command-name.js | title": {
|
|
36
36
|
"message": "`button`、`link` 和 `menuitem` 元素具有可解讀的名稱"
|
|
37
37
|
},
|
|
38
|
+
"core/audits/accessibility/aria-conditional-attr.js | description": {
|
|
39
|
+
"message": "元素的某些 ARIA 屬性只能在特定條件下使用。[進一步瞭解條件式 ARIA 屬性](https://dequeuniversity.com/rules/axe/4.9/aria-conditional-attr)。"
|
|
40
|
+
},
|
|
41
|
+
"core/audits/accessibility/aria-conditional-attr.js | failureTitle": {
|
|
42
|
+
"message": "未按照指定方式在元素角色中使用 ARIA 屬性"
|
|
43
|
+
},
|
|
44
|
+
"core/audits/accessibility/aria-conditional-attr.js | title": {
|
|
45
|
+
"message": "已按照指定方式在元素角色中使用 ARIA 屬性"
|
|
46
|
+
},
|
|
47
|
+
"core/audits/accessibility/aria-deprecated-role.js | description": {
|
|
48
|
+
"message": "輔助技術可能無法正確處理已淘汰的 ARIA 角色。[進一步瞭解已淘汰的 ARIA 角色](https://dequeuniversity.com/rules/axe/4.9/aria-deprecated-role)。"
|
|
49
|
+
},
|
|
50
|
+
"core/audits/accessibility/aria-deprecated-role.js | failureTitle": {
|
|
51
|
+
"message": "使用已淘汰的 ARIA 角色"
|
|
52
|
+
},
|
|
53
|
+
"core/audits/accessibility/aria-deprecated-role.js | title": {
|
|
54
|
+
"message": "未使用已淘汰的 ARIA 角色"
|
|
55
|
+
},
|
|
38
56
|
"core/audits/accessibility/aria-dialog-name.js | description": {
|
|
39
57
|
"message": "如果 ARIA 對話方塊元素缺少無障礙元素名稱,螢幕閱讀器使用者就可能無法分辨這些元素的用途。[瞭解如何讓 ARIA 對話方塊元素更易於存取](https://dequeuniversity.com/rules/axe/4.9/aria-dialog-name)。"
|
|
40
58
|
},
|
|
@@ -89,6 +107,15 @@
|
|
|
89
107
|
"core/audits/accessibility/aria-progressbar-name.js | title": {
|
|
90
108
|
"message": "ARIA `progressbar` 元素具有可解讀的名稱"
|
|
91
109
|
},
|
|
110
|
+
"core/audits/accessibility/aria-prohibited-attr.js | description": {
|
|
111
|
+
"message": "如果在禁止使用 ARIA 屬性的角色中使用這些屬性,可能會導致輔助技術使用者無法取得重要資訊。[進一步瞭解禁止使用的 ARIA 角色](https://dequeuniversity.com/rules/axe/4.9/aria-prohibited-attr)。"
|
|
112
|
+
},
|
|
113
|
+
"core/audits/accessibility/aria-prohibited-attr.js | failureTitle": {
|
|
114
|
+
"message": "多項元素使用禁用的 ARIA 屬性"
|
|
115
|
+
},
|
|
116
|
+
"core/audits/accessibility/aria-prohibited-attr.js | title": {
|
|
117
|
+
"message": "元素僅使用允許的 ARIA 屬性"
|
|
118
|
+
},
|
|
92
119
|
"core/audits/accessibility/aria-required-attr.js | description": {
|
|
93
120
|
"message": "部分 ARIA 角色的必要屬性會向螢幕閱讀器的使用者說明元素狀態。[進一步瞭解角色和必要屬性](https://dequeuniversity.com/rules/axe/4.9/aria-required-attr)。"
|
|
94
121
|
},
|
|
@@ -1175,6 +1202,15 @@
|
|
|
1175
1202
|
"core/audits/prioritize-lcp-image.js | title": {
|
|
1176
1203
|
"message": "預先載入最大內容繪製圖片"
|
|
1177
1204
|
},
|
|
1205
|
+
"core/audits/redirects-http.js | description": {
|
|
1206
|
+
"message": "請確認所有 HTTP 流量都已重新導向到 HTTPS,讓所有使用者可以安全存取網路功能。[瞭解詳情](https://developer.chrome.com/docs/lighthouse/pwa/redirects-http/)。"
|
|
1207
|
+
},
|
|
1208
|
+
"core/audits/redirects-http.js | failureTitle": {
|
|
1209
|
+
"message": "未將 HTTP 流量重新導向至 HTTPS"
|
|
1210
|
+
},
|
|
1211
|
+
"core/audits/redirects-http.js | title": {
|
|
1212
|
+
"message": "將 HTTP 流量重新導向至 HTTPS"
|
|
1213
|
+
},
|
|
1178
1214
|
"core/audits/redirects.js | description": {
|
|
1179
1215
|
"message": "重新導向會導致網頁進一步延遲載入。[瞭解如何避免網頁重新導向](https://developer.chrome.com/docs/lighthouse/performance/redirects/)。"
|
|
1180
1216
|
},
|
|
@@ -1713,7 +1749,7 @@
|
|
|
1713
1749
|
"message": "使用 Serial API 的網頁不適用往返快取。"
|
|
1714
1750
|
},
|
|
1715
1751
|
"core/lib/bf-cache-strings.js | contentWebAuthenticationAPI": {
|
|
1716
|
-
"message": "使用
|
|
1752
|
+
"message": "使用 WebAuthentication API 的網頁不適用往返快取。"
|
|
1717
1753
|
},
|
|
1718
1754
|
"core/lib/bf-cache-strings.js | contentWebBluetooth": {
|
|
1719
1755
|
"message": "使用 WebBluetooth API 的網頁不適用往返快取。"
|
|
@@ -2432,6 +2468,9 @@
|
|
|
2432
2468
|
"core/lib/lh-error.js | requestContentTimeout": {
|
|
2433
2469
|
"message": "擷取資源內容的時間超出系統分配上限。"
|
|
2434
2470
|
},
|
|
2471
|
+
"core/lib/lh-error.js | targetCrashed": {
|
|
2472
|
+
"message": "瀏覽器分頁意外停止運作。"
|
|
2473
|
+
},
|
|
2435
2474
|
"core/lib/lh-error.js | urlInvalid": {
|
|
2436
2475
|
"message": "你所提供的網址無效。"
|
|
2437
2476
|
},
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"message": "`[aria-*]` 属性与其角色匹配"
|
|
19
19
|
},
|
|
20
20
|
"core/audits/accessibility/aria-allowed-role.js | description": {
|
|
21
|
-
"message": "
|
|
21
|
+
"message": "Many HTML elements can only be assigned certain ARIA roles. Using ARIA roles where they are not allowed can interfere with the accessibility of the web page. [Learn more about ARIA roles](https://dequeuniversity.com/rules/axe/4.9/aria-allowed-role)."
|
|
22
22
|
},
|
|
23
23
|
"core/audits/accessibility/aria-allowed-role.js | failureTitle": {
|
|
24
|
-
"message": "
|
|
24
|
+
"message": "Uses ARIA roles on incompatible elements"
|
|
25
25
|
},
|
|
26
26
|
"core/audits/accessibility/aria-allowed-role.js | title": {
|
|
27
|
-
"message": "
|
|
27
|
+
"message": "Uses ARIA roles only on compatible elements"
|
|
28
28
|
},
|
|
29
29
|
"core/audits/accessibility/aria-command-name.js | description": {
|
|
30
30
|
"message": "如果某个元素没有无障碍名称,屏幕阅读器会将它读为通用名称,这会导致依赖屏幕阅读器的用户无法使用它。[了解如何让命令元素更便于使用](https://dequeuniversity.com/rules/axe/4.9/aria-command-name)。"
|
|
@@ -35,6 +35,24 @@
|
|
|
35
35
|
"core/audits/accessibility/aria-command-name.js | title": {
|
|
36
36
|
"message": "`button`、`link` 和 `menuitem` 元素都有可供访问的名称"
|
|
37
37
|
},
|
|
38
|
+
"core/audits/accessibility/aria-conditional-attr.js | description": {
|
|
39
|
+
"message": "只能在特定条件下使用元素的某些 ARIA 属性。[详细了解条件性 ARIA 属性](https://dequeuniversity.com/rules/axe/4.9/aria-conditional-attr)。"
|
|
40
|
+
},
|
|
41
|
+
"core/audits/accessibility/aria-conditional-attr.js | failureTitle": {
|
|
42
|
+
"message": "未按照指定方式在元素角色中使用 ARIA 属性"
|
|
43
|
+
},
|
|
44
|
+
"core/audits/accessibility/aria-conditional-attr.js | title": {
|
|
45
|
+
"message": "按照指定方式在元素角色中使用了 ARIA 属性"
|
|
46
|
+
},
|
|
47
|
+
"core/audits/accessibility/aria-deprecated-role.js | description": {
|
|
48
|
+
"message": "辅助技术可能无法正确处理已弃用的 ARIA 角色。[详细了解已弃用的 ARIA 角色](https://dequeuniversity.com/rules/axe/4.9/aria-deprecated-role)。"
|
|
49
|
+
},
|
|
50
|
+
"core/audits/accessibility/aria-deprecated-role.js | failureTitle": {
|
|
51
|
+
"message": "使用了已弃用的 ARIA 角色"
|
|
52
|
+
},
|
|
53
|
+
"core/audits/accessibility/aria-deprecated-role.js | title": {
|
|
54
|
+
"message": "未使用已弃用的 ARIA 角色"
|
|
55
|
+
},
|
|
38
56
|
"core/audits/accessibility/aria-dialog-name.js | description": {
|
|
39
57
|
"message": "如果 ARIA 对话框元素缺少无障碍名称,可能会妨碍屏幕阅读器用户理解这些元素的用途。[了解如何让 ARIA 对话框元素更符合无障碍需求](https://dequeuniversity.com/rules/axe/4.9/aria-dialog-name)。"
|
|
40
58
|
},
|
|
@@ -89,6 +107,15 @@
|
|
|
89
107
|
"core/audits/accessibility/aria-progressbar-name.js | title": {
|
|
90
108
|
"message": "ARIA `progressbar` 元素都有可供访问的名称"
|
|
91
109
|
},
|
|
110
|
+
"core/audits/accessibility/aria-prohibited-attr.js | description": {
|
|
111
|
+
"message": "在禁止使用 ARIA 属性的角色中使用 ARIA 属性可能会导致重要信息无法传达给使用辅助技术的用户。[详细了解被禁止的 ARIA 角色](https://dequeuniversity.com/rules/axe/4.9/aria-prohibited-attr)。"
|
|
112
|
+
},
|
|
113
|
+
"core/audits/accessibility/aria-prohibited-attr.js | failureTitle": {
|
|
114
|
+
"message": "元素使用了禁止使用的 ARIA 属性"
|
|
115
|
+
},
|
|
116
|
+
"core/audits/accessibility/aria-prohibited-attr.js | title": {
|
|
117
|
+
"message": "元素仅使用允许的 ARIA 属性"
|
|
118
|
+
},
|
|
92
119
|
"core/audits/accessibility/aria-required-attr.js | description": {
|
|
93
120
|
"message": "一些 ARIA 角色有必需属性,这些属性向屏幕阅读器描述了相应元素的状态。[详细了解角色和必需属性](https://dequeuniversity.com/rules/axe/4.9/aria-required-attr)。"
|
|
94
121
|
},
|
|
@@ -1175,6 +1202,15 @@
|
|
|
1175
1202
|
"core/audits/prioritize-lcp-image.js | title": {
|
|
1176
1203
|
"message": "预加载 LCP 元素所用图片"
|
|
1177
1204
|
},
|
|
1205
|
+
"core/audits/redirects-http.js | description": {
|
|
1206
|
+
"message": "请务必将所有 HTTP 流量都重定向到 HTTPS,以便为所有用户启用安全的网络功能。[了解详情](https://developer.chrome.com/docs/lighthouse/pwa/redirects-http/)。"
|
|
1207
|
+
},
|
|
1208
|
+
"core/audits/redirects-http.js | failureTitle": {
|
|
1209
|
+
"message": "未将 HTTP 流量重定向到 HTTPS"
|
|
1210
|
+
},
|
|
1211
|
+
"core/audits/redirects-http.js | title": {
|
|
1212
|
+
"message": "将 HTTP 流量重定向到 HTTPS"
|
|
1213
|
+
},
|
|
1178
1214
|
"core/audits/redirects.js | description": {
|
|
1179
1215
|
"message": "重定向会在网页可加载前引入更多延迟。[了解如何避免网页重定向](https://developer.chrome.com/docs/lighthouse/performance/redirects/)。"
|
|
1180
1216
|
},
|
|
@@ -1713,7 +1749,7 @@
|
|
|
1713
1749
|
"message": "使用 Serial API 的网页无法储存至往返缓存。"
|
|
1714
1750
|
},
|
|
1715
1751
|
"core/lib/bf-cache-strings.js | contentWebAuthenticationAPI": {
|
|
1716
|
-
"message": "使用
|
|
1752
|
+
"message": "使用 WebAuthentication API 的网页无法储存至往返缓存。"
|
|
1717
1753
|
},
|
|
1718
1754
|
"core/lib/bf-cache-strings.js | contentWebBluetooth": {
|
|
1719
1755
|
"message": "使用 WebBluetooth API 的网页无法储存至往返缓存。"
|
|
@@ -2432,6 +2468,9 @@
|
|
|
2432
2468
|
"core/lib/lh-error.js | requestContentTimeout": {
|
|
2433
2469
|
"message": "提取资源内容的用时超出了分配的时间"
|
|
2434
2470
|
},
|
|
2471
|
+
"core/lib/lh-error.js | targetCrashed": {
|
|
2472
|
+
"message": "浏览器标签页意外崩溃。"
|
|
2473
|
+
},
|
|
2435
2474
|
"core/lib/lh-error.js | urlInvalid": {
|
|
2436
2475
|
"message": "您提供的网址似乎无效。"
|
|
2437
2476
|
},
|
package/tsconfig-all.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"core/test/audits/**/*.js",
|
|
34
34
|
"core/test/fixtures/**/*.js",
|
|
35
35
|
"core/test/computed/**/*.js",
|
|
36
|
+
"clients/lightrider/**/*.js",
|
|
36
37
|
"clients/test/**/*.js",
|
|
37
38
|
"cli/test/fixtures/**/*.js",
|
|
38
39
|
"core/scripts/legacy-javascript/variants",
|
|
@@ -66,13 +67,15 @@
|
|
|
66
67
|
"core/test/lib/emulation-test.js",
|
|
67
68
|
"core/test/lib/i18n/i18n-test.js",
|
|
68
69
|
"core/test/lib/icons-test.js",
|
|
69
|
-
|
|
70
|
-
"core/
|
|
71
|
-
"core/
|
|
72
|
-
"core/
|
|
73
|
-
"core/
|
|
74
|
-
"core/
|
|
75
|
-
"core/
|
|
70
|
+
// TODO(15841): remove when importing Lantern from npm
|
|
71
|
+
"core/lib/lantern/BaseNode.test.js",
|
|
72
|
+
"core/lib/lantern/metrics/*.test.js",
|
|
73
|
+
"core/lib/lantern/PageDependencyGraph.test.js",
|
|
74
|
+
"core/lib/lantern/simulation/ConnectionPool.test.js",
|
|
75
|
+
"core/lib/lantern/simulation/DNSCache.test.js",
|
|
76
|
+
"core/lib/lantern/simulation/NetworkAnalyzer.test.js",
|
|
77
|
+
"core/lib/lantern/simulation/Simulator.test.js",
|
|
78
|
+
// ------ done TODO
|
|
76
79
|
"core/test/lib/lh-element-test.js",
|
|
77
80
|
"core/test/lib/lighthouse-compatibility-test.js",
|
|
78
81
|
"core/test/lib/manifest-parser-test.js",
|
|
@@ -109,5 +112,6 @@
|
|
|
109
112
|
"core/test/computed/metrics/interactive-test.js",
|
|
110
113
|
"core/test/computed/tbt-impact-tasks-test.js",
|
|
111
114
|
"core/test/fixtures/config-plugins/lighthouse-plugin-simple/plugin-simple.js",
|
|
115
|
+
"core/lib/lantern/metrics/MetricTestUtils.js",
|
|
112
116
|
],
|
|
113
117
|
}
|
package/types/artifacts.d.ts
CHANGED
|
@@ -6,17 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
import {Protocol as Crdp} from 'devtools-protocol/types/protocol.js';
|
|
8
8
|
import * as TraceEngine from '@paulirish/trace_engine';
|
|
9
|
+
import * as Lantern from '../core/lib/lantern/lantern.js';
|
|
9
10
|
import {LayoutShiftRootCausesData} from '@paulirish/trace_engine/models/trace/root-causes/LayoutShift.js';
|
|
10
11
|
|
|
11
12
|
import {parseManifest} from '../core/lib/manifest-parser.js';
|
|
12
|
-
import {Simulator} from '../core/lib/lantern/simulator/simulator.js';
|
|
13
13
|
import {LighthouseError} from '../core/lib/lh-error.js';
|
|
14
14
|
import {NetworkRequest as _NetworkRequest} from '../core/lib/network-request.js';
|
|
15
15
|
import speedline from 'speedline-core';
|
|
16
16
|
import * as CDTSourceMap from '../core/lib/cdt/generated/SourceMap.js';
|
|
17
17
|
import {ArbitraryEqualityMap} from '../core/lib/arbitrary-equality-map.js';
|
|
18
18
|
import type { TaskNode as _TaskNode } from '../core/lib/tracehouse/main-thread-tasks.js';
|
|
19
|
-
import type {EnabledHandlers} from '../core/computed/trace-engine-result.js';
|
|
20
19
|
import AuditDetails from './lhr/audit-details.js'
|
|
21
20
|
import Config from './config.js';
|
|
22
21
|
import Gatherer from './gatherer.js';
|
|
@@ -191,6 +190,7 @@ declare module Artifacts {
|
|
|
191
190
|
boundingRect: Rect,
|
|
192
191
|
snippet: string,
|
|
193
192
|
nodeLabel: string,
|
|
193
|
+
explanation?: string,
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
interface RuleExecutionError {
|
|
@@ -510,8 +510,8 @@ declare module Artifacts {
|
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
interface TraceEngineResult {
|
|
513
|
-
data: TraceEngine.Handlers.Types.
|
|
514
|
-
insights: TraceEngine.Insights.Types.TraceInsightData<
|
|
513
|
+
data: TraceEngine.Handlers.Types.TraceParseData;
|
|
514
|
+
insights: TraceEngine.Insights.Types.TraceInsightData<typeof TraceEngine.Handlers.ModelHandlers>;
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
interface TraceEngineRootCauses {
|
|
@@ -545,6 +545,7 @@ declare module Artifacts {
|
|
|
545
545
|
quirksModeIssue: Crdp.Audits.QuirksModeIssueDetails[];
|
|
546
546
|
cookieIssue: Crdp.Audits.CookieIssueDetails[];
|
|
547
547
|
sharedArrayBufferIssue: Crdp.Audits.SharedArrayBufferIssueDetails[];
|
|
548
|
+
sharedDictionaryIssue: Crdp.Audits.SharedDictionaryIssueDetails[];
|
|
548
549
|
stylesheetLoadingIssue: Crdp.Audits.StylesheetLoadingIssueDetails[];
|
|
549
550
|
federatedAuthUserInfoRequestIssue: Crdp.Audits.FederatedAuthUserInfoRequestIssueDetails[];
|
|
550
551
|
}
|
|
@@ -564,7 +565,7 @@ declare module Artifacts {
|
|
|
564
565
|
trace: Trace;
|
|
565
566
|
settings: Audit.Context['settings'];
|
|
566
567
|
gatherContext: Artifacts['GatherContext'];
|
|
567
|
-
simulator?: InstanceType<typeof Simulator>;
|
|
568
|
+
simulator?: InstanceType<typeof Lantern.Simulation.Simulator>;
|
|
568
569
|
URL: Artifacts['URL'];
|
|
569
570
|
}
|
|
570
571
|
|
|
@@ -590,14 +591,7 @@ declare module Artifacts {
|
|
|
590
591
|
throughput: number;
|
|
591
592
|
}
|
|
592
593
|
|
|
593
|
-
|
|
594
|
-
timing: number;
|
|
595
|
-
timestamp?: never;
|
|
596
|
-
optimisticEstimate: Gatherer.Simulation.Result
|
|
597
|
-
pessimisticEstimate: Gatherer.Simulation.Result;
|
|
598
|
-
optimisticGraph: Gatherer.Simulation.GraphNode;
|
|
599
|
-
pessimisticGraph: Gatherer.Simulation.GraphNode;
|
|
600
|
-
}
|
|
594
|
+
type LanternMetric = Lantern.Metrics.Result<Artifacts.NetworkRequest>;
|
|
601
595
|
|
|
602
596
|
type Speedline = speedline.Output<'speedIndex'>;
|
|
603
597
|
|
|
@@ -611,7 +605,6 @@ declare module Artifacts {
|
|
|
611
605
|
firstPaint?: number;
|
|
612
606
|
firstContentfulPaint: number;
|
|
613
607
|
firstContentfulPaintAllFrames: number;
|
|
614
|
-
firstMeaningfulPaint?: number;
|
|
615
608
|
largestContentfulPaint?: number;
|
|
616
609
|
largestContentfulPaintAllFrames?: number;
|
|
617
610
|
traceEnd: number;
|
|
@@ -655,8 +648,6 @@ declare module Artifacts {
|
|
|
655
648
|
firstContentfulPaintEvt: TraceEvent;
|
|
656
649
|
/** The trace event marking firstContentfulPaint from all frames, if it was found. */
|
|
657
650
|
firstContentfulPaintAllFramesEvt: TraceEvent;
|
|
658
|
-
/** The trace event marking firstMeaningfulPaint, if it was found. */
|
|
659
|
-
firstMeaningfulPaintEvt?: TraceEvent;
|
|
660
651
|
/** The trace event marking largestContentfulPaint, if it was found. */
|
|
661
652
|
largestContentfulPaintEvt?: TraceEvent;
|
|
662
653
|
/** The trace event marking largestContentfulPaint from all frames, if it was found. */
|
|
@@ -665,11 +656,6 @@ declare module Artifacts {
|
|
|
665
656
|
loadEvt?: TraceEvent;
|
|
666
657
|
/** The trace event marking domContentLoadedEventEnd, if it was found. */
|
|
667
658
|
domContentLoadedEvt?: TraceEvent;
|
|
668
|
-
/**
|
|
669
|
-
* Whether the firstMeaningfulPaintEvt was the definitive event or a fallback to
|
|
670
|
-
* firstMeaningfulPaintCandidate events had to be attempted.
|
|
671
|
-
*/
|
|
672
|
-
fmpFellBack: boolean;
|
|
673
659
|
/** Whether LCP was invalidated without a new candidate. */
|
|
674
660
|
lcpInvalidated: boolean;
|
|
675
661
|
}
|
|
@@ -693,8 +679,6 @@ declare module Artifacts {
|
|
|
693
679
|
firstContentfulPaintTs: number | undefined;
|
|
694
680
|
firstContentfulPaintAllFrames: number | undefined;
|
|
695
681
|
firstContentfulPaintAllFramesTs: number | undefined;
|
|
696
|
-
firstMeaningfulPaint: number | undefined;
|
|
697
|
-
firstMeaningfulPaintTs: number | undefined;
|
|
698
682
|
largestContentfulPaint: number | undefined;
|
|
699
683
|
largestContentfulPaintTs: number | undefined;
|
|
700
684
|
largestContentfulPaintAllFrames: number | undefined;
|
|
@@ -723,8 +707,6 @@ declare module Artifacts {
|
|
|
723
707
|
observedFirstContentfulPaintTs: number | undefined;
|
|
724
708
|
observedFirstContentfulPaintAllFrames: number | undefined;
|
|
725
709
|
observedFirstContentfulPaintAllFramesTs: number | undefined;
|
|
726
|
-
observedFirstMeaningfulPaint: number | undefined;
|
|
727
|
-
observedFirstMeaningfulPaintTs: number | undefined;
|
|
728
710
|
observedLargestContentfulPaint: number | undefined;
|
|
729
711
|
observedLargestContentfulPaintTs: number | undefined;
|
|
730
712
|
observedLargestContentfulPaintAllFrames: number | undefined;
|
|
@@ -940,6 +922,22 @@ export interface TraceEvent {
|
|
|
940
922
|
name?: string;
|
|
941
923
|
duration?: number;
|
|
942
924
|
blockingDuration?: number;
|
|
925
|
+
candidateIndex?: number;
|
|
926
|
+
priority?: string;
|
|
927
|
+
requestMethod?: string;
|
|
928
|
+
resourceType?: string;
|
|
929
|
+
fromCache?: boolean;
|
|
930
|
+
fromServiceWorker?: boolean;
|
|
931
|
+
mimeType?: string;
|
|
932
|
+
statusCode?: number;
|
|
933
|
+
timing?: any;
|
|
934
|
+
connectionId?: number;
|
|
935
|
+
connectionReused?: boolean;
|
|
936
|
+
encodedDataLength?: number;
|
|
937
|
+
decodedBodyLength?: number;
|
|
938
|
+
initiator?: {type: string, url?: string, stack?: any};
|
|
939
|
+
protocol?: string;
|
|
940
|
+
finishTime?: number;
|
|
943
941
|
};
|
|
944
942
|
frame?: string;
|
|
945
943
|
name?: string;
|
package/types/gatherer.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import Config from './config.js';
|
|
|
17
17
|
import Result from './lhr/lhr.js';
|
|
18
18
|
import Protocol from './protocol.js';
|
|
19
19
|
import Puppeteer from './puppeteer.js';
|
|
20
|
-
import * as Lantern from '../core/lib/lantern/
|
|
20
|
+
import * as Lantern from '../core/lib/lantern/lantern.js';
|
|
21
21
|
|
|
22
22
|
type CrdpEvents = CrdpMappings.Events;
|
|
23
23
|
type CrdpCommands = CrdpMappings.Commands;
|
|
@@ -35,6 +35,7 @@ declare module Gatherer {
|
|
|
35
35
|
sendCommand<TMethod extends keyof CrdpCommands>(method: TMethod, ...params: CrdpCommands[TMethod]['paramsType']): Promise<CrdpCommands[TMethod]['returnType']>;
|
|
36
36
|
sendCommandAndIgnore<TMethod extends keyof CrdpCommands>(method: TMethod, ...params: CrdpCommands[TMethod]['paramsType']): Promise<void>;
|
|
37
37
|
dispose(): Promise<void>;
|
|
38
|
+
onCrashPromise(): Promise<never>;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
interface Driver {
|
|
@@ -49,8 +50,6 @@ declare module Gatherer {
|
|
|
49
50
|
off(event: 'protocolevent', callback: (payload: Protocol.RawEventMessage) => void): void
|
|
50
51
|
};
|
|
51
52
|
networkMonitor: NetworkMonitor;
|
|
52
|
-
listenForCrashes: (() => void);
|
|
53
|
-
fatalRejection: {promise: Promise<never>, rej: (reason: Error) => void}
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
interface Context<TDependencies extends DependencyKey = DefaultDependenciesKey> {
|
package/types/lhr/lhr.d.ts
CHANGED
|
@@ -103,6 +103,8 @@ declare module Result {
|
|
|
103
103
|
score: number|null;
|
|
104
104
|
/** An array of references to all the audit members of this category. */
|
|
105
105
|
auditRefs: AuditRef[];
|
|
106
|
+
/** An array of all the modes supported by the category. */
|
|
107
|
+
supportedModes?: Result.GatherMode[];
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
interface AuditRef {
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { FirstMeaningfulPaintComputed as FirstMeaningfulPaint };
|
|
2
|
-
declare const FirstMeaningfulPaintComputed: typeof FirstMeaningfulPaint & {
|
|
3
|
-
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
4
|
-
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
5
|
-
}>) => Promise<import("../../index.js").Artifacts.Metric | import("../../index.js").Artifacts.LanternMetric>;
|
|
6
|
-
};
|
|
7
|
-
declare class FirstMeaningfulPaint extends NavigationMetric {
|
|
8
|
-
/**
|
|
9
|
-
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
|
-
* @param {LH.Artifacts.ComputedContext} context
|
|
11
|
-
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
12
|
-
*/
|
|
13
|
-
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
14
|
-
/**
|
|
15
|
-
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
16
|
-
* @return {Promise<LH.Artifacts.Metric>}
|
|
17
|
-
*/
|
|
18
|
-
static computeObservedMetric(data: LH.Artifacts.NavigationMetricComputationData): Promise<LH.Artifacts.Metric>;
|
|
19
|
-
}
|
|
20
|
-
import { NavigationMetric } from './navigation-metric.js';
|
|
21
|
-
//# sourceMappingURL=first-meaningful-paint.d.ts.map
|