lighthouse 12.5.1-dev.20250415 → 12.5.1-dev.20250417
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 +1 -1
- package/core/audits/audit.js +3 -2
- package/core/audits/bootup-time.js +3 -3
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +1 -1
- package/core/audits/byte-efficiency/duplicated-javascript.js +1 -1
- package/core/audits/byte-efficiency/efficient-animated-content.js +1 -1
- package/core/audits/byte-efficiency/legacy-javascript.js +2 -3
- package/core/audits/byte-efficiency/modern-image-formats.js +1 -1
- package/core/audits/byte-efficiency/offscreen-images.js +4 -4
- package/core/audits/byte-efficiency/render-blocking-resources.js +4 -4
- package/core/audits/byte-efficiency/total-byte-weight.js +2 -2
- package/core/audits/byte-efficiency/unminified-css.js +1 -1
- package/core/audits/byte-efficiency/unminified-javascript.js +1 -1
- package/core/audits/byte-efficiency/unused-css-rules.js +2 -2
- package/core/audits/byte-efficiency/unused-javascript.js +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.js +2 -2
- package/core/audits/byte-efficiency/uses-optimized-images.js +2 -2
- package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
- package/core/audits/byte-efficiency/uses-text-compression.js +1 -1
- package/core/audits/clickjacking-mitigation.js +2 -2
- package/core/audits/critical-request-chains.js +3 -3
- package/core/audits/csp-xss.js +2 -2
- package/core/audits/diagnostics.js +3 -3
- package/core/audits/dobetterweb/charset.js +2 -2
- package/core/audits/dobetterweb/doctype.js +2 -2
- package/core/audits/dobetterweb/dom-size.js +3 -3
- package/core/audits/dobetterweb/uses-http2.js +2 -2
- package/core/audits/final-screenshot.js +2 -2
- package/core/audits/font-display.js +2 -2
- package/core/audits/has-hsts.js +2 -2
- package/core/audits/image-size-responsive.d.ts +3 -2
- package/core/audits/image-size-responsive.js +30 -4
- package/core/audits/insights/cache-insight.js +1 -1
- package/core/audits/insights/cls-culprits-insight.js +1 -1
- package/core/audits/insights/document-latency-insight.js +1 -1
- package/core/audits/insights/dom-size-insight.js +1 -1
- package/core/audits/insights/duplicated-javascript-insight.js +1 -1
- package/core/audits/insights/font-display-insight.js +1 -1
- package/core/audits/insights/forced-reflow-insight.js +1 -1
- package/core/audits/insights/image-delivery-insight.js +1 -1
- package/core/audits/insights/insight-audit.js +1 -1
- package/core/audits/insights/interaction-to-next-paint-insight.js +1 -1
- package/core/audits/insights/lcp-discovery-insight.js +1 -1
- package/core/audits/insights/lcp-phases-insight.js +1 -1
- package/core/audits/insights/legacy-javascript-insight.js +1 -1
- package/core/audits/insights/modern-http-insight.js +1 -1
- package/core/audits/insights/network-dependency-tree-insight.js +1 -1
- package/core/audits/insights/render-blocking-insight.js +1 -1
- package/core/audits/insights/slow-css-selector-insight.js +1 -1
- package/core/audits/insights/third-parties-insight.js +1 -1
- package/core/audits/insights/viewport-insight.js +1 -1
- package/core/audits/is-on-https.js +2 -2
- package/core/audits/largest-contentful-paint-element.js +3 -3
- package/core/audits/layout-shifts.js +2 -2
- package/core/audits/lcp-lazy-loaded.js +1 -1
- package/core/audits/long-tasks.js +3 -3
- package/core/audits/main-thread-tasks.js +2 -2
- package/core/audits/mainthread-work-breakdown.js +2 -2
- package/core/audits/metrics/cumulative-layout-shift.js +2 -2
- package/core/audits/metrics/first-contentful-paint.js +3 -3
- package/core/audits/metrics/first-meaningful-paint.js +1 -1
- package/core/audits/metrics/interaction-to-next-paint.js +2 -2
- package/core/audits/metrics/interactive.js +3 -3
- package/core/audits/metrics/largest-contentful-paint.js +3 -3
- package/core/audits/metrics/max-potential-fid.js +3 -3
- package/core/audits/metrics/speed-index.js +3 -3
- package/core/audits/metrics/total-blocking-time.js +3 -3
- package/core/audits/metrics.js +3 -3
- package/core/audits/network-requests.js +2 -2
- package/core/audits/network-rtt.js +2 -2
- package/core/audits/network-server-latency.js +2 -2
- package/core/audits/origin-isolation.js +2 -2
- package/core/audits/predictive-perf.js +3 -3
- package/core/audits/preload-fonts.js +2 -2
- package/core/audits/prioritize-lcp-image.js +3 -3
- package/core/audits/redirects.js +3 -3
- package/core/audits/resource-summary.js +2 -2
- package/core/audits/screenshot-thumbnails.js +2 -2
- package/core/audits/script-treemap-data.js +1 -1
- package/core/audits/seo/canonical.js +2 -2
- package/core/audits/seo/http-status-code.js +2 -2
- package/core/audits/seo/is-crawlable.js +2 -2
- package/core/audits/server-response-time.js +2 -2
- package/core/audits/third-party-facades.js +2 -2
- package/core/audits/third-party-summary.js +2 -2
- package/core/audits/user-timings.js +2 -2
- package/core/audits/uses-rel-preconnect.js +3 -3
- package/core/audits/uses-rel-preload.js +3 -3
- package/core/audits/valid-source-maps.js +2 -2
- package/core/audits/work-during-interaction.js +3 -3
- package/core/lib/asset-saver.js +1 -1
- package/core/runner.js +2 -1
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ class ResourceSummary extends Audit {
|
|
|
22
22
|
title: 'Resources Summary',
|
|
23
23
|
description: 'Aggregates all network requests and groups them by type',
|
|
24
24
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
25
|
-
requiredArtifacts: ['
|
|
25
|
+
requiredArtifacts: ['DevtoolsLog', 'URL'],
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -32,7 +32,7 @@ class ResourceSummary extends Audit {
|
|
|
32
32
|
* @return {Promise<LH.Audit.Product>}
|
|
33
33
|
*/
|
|
34
34
|
static async audit(artifacts, context) {
|
|
35
|
-
const devtoolsLog = artifacts.
|
|
35
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
36
36
|
const summary = await ComputedResourceSummary
|
|
37
37
|
.request({devtoolsLog, URL: artifacts.URL}, context);
|
|
38
38
|
|
|
@@ -24,7 +24,7 @@ class ScreenshotThumbnails extends Audit {
|
|
|
24
24
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
25
25
|
title: 'Screenshot Thumbnails',
|
|
26
26
|
description: 'This is what the load of your site looked like.',
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'GatherContext'],
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -70,7 +70,7 @@ class ScreenshotThumbnails extends Audit {
|
|
|
70
70
|
* @return {Promise<LH.Audit.Product>}
|
|
71
71
|
*/
|
|
72
72
|
static async _audit(artifacts, context) {
|
|
73
|
-
const trace = artifacts.
|
|
73
|
+
const trace = artifacts.Trace;
|
|
74
74
|
/** @type {Map<SpeedlineFrame, string>} */
|
|
75
75
|
const cachedThumbnails = new Map();
|
|
76
76
|
|
|
@@ -31,7 +31,7 @@ class ScriptTreemapDataAudit extends Audit {
|
|
|
31
31
|
title: 'Script Treemap Data',
|
|
32
32
|
description: 'Used for treemap app',
|
|
33
33
|
requiredArtifacts:
|
|
34
|
-
['
|
|
34
|
+
['Trace', 'DevtoolsLog', 'SourceMaps', 'Scripts', 'JsUsage', 'URL', 'SourceMaps'],
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -63,7 +63,7 @@ class Canonical extends Audit {
|
|
|
63
63
|
failureTitle: str_(UIStrings.failureTitle),
|
|
64
64
|
description: str_(UIStrings.description),
|
|
65
65
|
supportedModes: ['navigation'],
|
|
66
|
-
requiredArtifacts: ['LinkElements', 'URL', '
|
|
66
|
+
requiredArtifacts: ['LinkElements', 'URL', 'DevtoolsLog'],
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -187,7 +187,7 @@ class Canonical extends Audit {
|
|
|
187
187
|
* @return {Promise<LH.Audit.Product>}
|
|
188
188
|
*/
|
|
189
189
|
static async audit(artifacts, context) {
|
|
190
|
-
const devtoolsLog = artifacts.
|
|
190
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
191
191
|
|
|
192
192
|
const mainResource = await MainResource.request({devtoolsLog, URL: artifacts.URL}, context);
|
|
193
193
|
const baseURL = new URL(mainResource.url);
|
|
@@ -33,7 +33,7 @@ class HTTPStatusCode extends Audit {
|
|
|
33
33
|
title: str_(UIStrings.title),
|
|
34
34
|
failureTitle: str_(UIStrings.failureTitle),
|
|
35
35
|
description: str_(UIStrings.description),
|
|
36
|
-
requiredArtifacts: ['
|
|
36
|
+
requiredArtifacts: ['DevtoolsLog', 'URL', 'GatherContext'],
|
|
37
37
|
supportedModes: ['navigation'],
|
|
38
38
|
};
|
|
39
39
|
}
|
|
@@ -44,7 +44,7 @@ class HTTPStatusCode extends Audit {
|
|
|
44
44
|
* @return {Promise<LH.Audit.Product>}
|
|
45
45
|
*/
|
|
46
46
|
static async audit(artifacts, context) {
|
|
47
|
-
const devtoolsLog = artifacts.
|
|
47
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
48
48
|
const URL = artifacts.URL;
|
|
49
49
|
const mainResource = await MainResource.request({devtoolsLog, URL}, context);
|
|
50
50
|
|
|
@@ -91,7 +91,7 @@ class IsCrawlable extends Audit {
|
|
|
91
91
|
failureTitle: str_(UIStrings.failureTitle),
|
|
92
92
|
description: str_(UIStrings.description),
|
|
93
93
|
supportedModes: ['navigation'],
|
|
94
|
-
requiredArtifacts: ['MetaElements', 'RobotsTxt', 'URL', '
|
|
94
|
+
requiredArtifacts: ['MetaElements', 'RobotsTxt', 'URL', 'DevtoolsLog'],
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -169,7 +169,7 @@ class IsCrawlable extends Audit {
|
|
|
169
169
|
* @return {Promise<LH.Audit.Product>}
|
|
170
170
|
*/
|
|
171
171
|
static async audit(artifacts, context) {
|
|
172
|
-
const devtoolsLog = artifacts.
|
|
172
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
173
173
|
const mainResource = await MainResource.request({devtoolsLog, URL: artifacts.URL}, context);
|
|
174
174
|
|
|
175
175
|
const robotsTxtUrl = new URL('/robots.txt', mainResource.url);
|
|
@@ -38,7 +38,7 @@ class ServerResponseTime extends Audit {
|
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
39
|
supportedModes: ['navigation'],
|
|
40
40
|
guidanceLevel: 1,
|
|
41
|
-
requiredArtifacts: ['
|
|
41
|
+
requiredArtifacts: ['DevtoolsLog', 'URL', 'GatherContext'],
|
|
42
42
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -62,7 +62,7 @@ class ServerResponseTime extends Audit {
|
|
|
62
62
|
* @return {Promise<LH.Audit.Product>}
|
|
63
63
|
*/
|
|
64
64
|
static async audit(artifacts, context) {
|
|
65
|
-
const devtoolsLog = artifacts.
|
|
65
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
66
66
|
|
|
67
67
|
/** @type {LH.Artifacts.NetworkRequest} */
|
|
68
68
|
const mainResource = await MainResource.request({devtoolsLog, URL: artifacts.URL}, context);
|
|
@@ -87,7 +87,7 @@ class ThirdPartyFacades extends Audit {
|
|
|
87
87
|
description: str_(UIStrings.description),
|
|
88
88
|
supportedModes: ['navigation'],
|
|
89
89
|
guidanceLevel: 3,
|
|
90
|
-
requiredArtifacts: ['
|
|
90
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'URL', 'GatherContext', 'SourceMaps'],
|
|
91
91
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
92
92
|
};
|
|
93
93
|
}
|
|
@@ -150,7 +150,7 @@ class ThirdPartyFacades extends Audit {
|
|
|
150
150
|
*/
|
|
151
151
|
static async audit(artifacts, context) {
|
|
152
152
|
const settings = context.settings;
|
|
153
|
-
const devtoolsLog = artifacts.
|
|
153
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
154
154
|
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
|
|
155
155
|
const classifiedEntities = await EntityClassification.request(
|
|
156
156
|
{URL: artifacts.URL, devtoolsLog}, context);
|
|
@@ -67,7 +67,7 @@ class ThirdPartySummary extends Audit {
|
|
|
67
67
|
description: str_(UIStrings.description),
|
|
68
68
|
guidanceLevel: 1,
|
|
69
69
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
70
|
-
requiredArtifacts: ['
|
|
70
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'URL', 'GatherContext', 'SourceMaps'],
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -159,7 +159,7 @@ class ThirdPartySummary extends Audit {
|
|
|
159
159
|
*/
|
|
160
160
|
static async audit(artifacts, context) {
|
|
161
161
|
const settings = context.settings || {};
|
|
162
|
-
const devtoolsLog = artifacts.
|
|
162
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
163
163
|
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
|
|
164
164
|
const classifiedEntities = await EntityClassification.request(
|
|
165
165
|
{URL: artifacts.URL, devtoolsLog}, context);
|
|
@@ -40,7 +40,7 @@ class UserTimings extends Audit {
|
|
|
40
40
|
description: str_(UIStrings.description),
|
|
41
41
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
42
42
|
guidanceLevel: 2,
|
|
43
|
-
requiredArtifacts: ['
|
|
43
|
+
requiredArtifacts: ['Trace'],
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@ class UserTimings extends Audit {
|
|
|
66
66
|
* @return {Promise<LH.Audit.Product>}
|
|
67
67
|
*/
|
|
68
68
|
static async audit(artifacts, context) {
|
|
69
|
-
const trace = artifacts.
|
|
69
|
+
const trace = artifacts.Trace;
|
|
70
70
|
const computedUserTimings = await ComputedUserTimings.request(trace, context);
|
|
71
71
|
const userTimings = computedUserTimings.filter(UserTimings.excludeEvent);
|
|
72
72
|
const tableRows = userTimings.map(item => {
|
|
@@ -62,7 +62,7 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
62
62
|
description: str_(UIStrings.description),
|
|
63
63
|
supportedModes: ['navigation'],
|
|
64
64
|
guidanceLevel: 3,
|
|
65
|
-
requiredArtifacts: ['
|
|
65
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'URL', 'LinkElements', 'SourceMaps'],
|
|
66
66
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
67
67
|
};
|
|
68
68
|
}
|
|
@@ -122,8 +122,8 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
122
122
|
* @return {Promise<LH.Audit.Product>}
|
|
123
123
|
*/
|
|
124
124
|
static async audit(artifacts, context) {
|
|
125
|
-
const trace = artifacts.
|
|
126
|
-
const devtoolsLog = artifacts.
|
|
125
|
+
const trace = artifacts.Trace;
|
|
126
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
127
127
|
const {URL, SourceMaps} = artifacts;
|
|
128
128
|
const settings = context.settings;
|
|
129
129
|
|
|
@@ -44,7 +44,7 @@ class UsesRelPreloadAudit extends Audit {
|
|
|
44
44
|
description: str_(UIStrings.description),
|
|
45
45
|
supportedModes: ['navigation'],
|
|
46
46
|
guidanceLevel: 3,
|
|
47
|
-
requiredArtifacts: ['
|
|
47
|
+
requiredArtifacts: ['DevtoolsLog', 'Trace', 'URL', 'SourceMaps'],
|
|
48
48
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
49
49
|
};
|
|
50
50
|
}
|
|
@@ -213,8 +213,8 @@ class UsesRelPreloadAudit extends Audit {
|
|
|
213
213
|
*/
|
|
214
214
|
static async audit(artifacts, context) {
|
|
215
215
|
const settings = context.settings;
|
|
216
|
-
const trace = artifacts.
|
|
217
|
-
const devtoolsLog = artifacts.
|
|
216
|
+
const trace = artifacts.Trace;
|
|
217
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
218
218
|
const {URL, SourceMaps} = artifacts;
|
|
219
219
|
const simulatorOptions = {devtoolsLog, settings: context.settings};
|
|
220
220
|
|
|
@@ -44,7 +44,7 @@ class ValidSourceMaps extends Audit {
|
|
|
44
44
|
title: str_(UIStrings.title),
|
|
45
45
|
failureTitle: str_(UIStrings.failureTitle),
|
|
46
46
|
description: str_(UIStrings.description),
|
|
47
|
-
requiredArtifacts: ['Scripts', 'SourceMaps', 'URL', '
|
|
47
|
+
requiredArtifacts: ['Scripts', 'SourceMaps', 'URL', 'DevtoolsLog'],
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -70,7 +70,7 @@ class ValidSourceMaps extends Audit {
|
|
|
70
70
|
*/
|
|
71
71
|
static async audit(artifacts, context) {
|
|
72
72
|
const {SourceMaps} = artifacts;
|
|
73
|
-
const devtoolsLog = artifacts.
|
|
73
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
74
74
|
const classifiedEntities = await EntityClassification.request(
|
|
75
75
|
{URL: artifacts.URL, devtoolsLog}, context);
|
|
76
76
|
|
|
@@ -60,7 +60,7 @@ class WorkDuringInteraction extends Audit {
|
|
|
60
60
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
61
61
|
supportedModes: ['timespan'],
|
|
62
62
|
guidanceLevel: 1,
|
|
63
|
-
requiredArtifacts: ['
|
|
63
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'TraceElements'],
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -231,7 +231,7 @@ class WorkDuringInteraction extends Audit {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
const trace = artifacts.
|
|
234
|
+
const trace = artifacts.Trace;
|
|
235
235
|
const metricData = {trace, settings};
|
|
236
236
|
const interactionEvent = await Responsiveness.request(metricData, context);
|
|
237
237
|
// If no interaction, diagnostic audit is n/a.
|
|
@@ -248,7 +248,7 @@ class WorkDuringInteraction extends Audit {
|
|
|
248
248
|
const traceElementItem = WorkDuringInteraction.getTraceElementTable(artifacts.TraceElements);
|
|
249
249
|
if (traceElementItem) auditDetailsItems.push(traceElementItem);
|
|
250
250
|
|
|
251
|
-
const devtoolsLog = artifacts.
|
|
251
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
252
252
|
// Network records will usually be empty for timespans.
|
|
253
253
|
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
|
|
254
254
|
const processedTrace = await ProcessedTrace.request(trace, context);
|
package/core/lib/asset-saver.js
CHANGED
|
@@ -263,7 +263,7 @@ async function saveArtifacts(artifacts, basePath, options = {}) {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
// `devtoolsLogs` and `traces` are duplicate compat artifacts.
|
|
266
|
-
// We don't need to save them twice, so extract them here.
|
|
266
|
+
// We don't need to save them twice, so extract them here. TODO(v13): remove
|
|
267
267
|
const {
|
|
268
268
|
// eslint-disable-next-line no-unused-vars
|
|
269
269
|
traces,
|
package/core/runner.js
CHANGED
|
@@ -147,8 +147,9 @@ class Runner {
|
|
|
147
147
|
* @param {LH.Artifacts.ComputedContext} context
|
|
148
148
|
*/
|
|
149
149
|
static async getEntityClassification(artifacts, context) {
|
|
150
|
-
const devtoolsLog = artifacts.
|
|
150
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
151
151
|
if (!devtoolsLog) return;
|
|
152
|
+
|
|
152
153
|
const classifiedEntities = await EntityClassification.request(
|
|
153
154
|
{URL: artifacts.URL, devtoolsLog}, context);
|
|
154
155
|
|
package/package.json
CHANGED