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
|
@@ -26,7 +26,7 @@ class DuplicatedJavaScriptInsight extends Audit {
|
|
|
26
26
|
failureTitle: str_(UIStrings.title),
|
|
27
27
|
description: str_(UIStrings.description),
|
|
28
28
|
guidanceLevel: 2,
|
|
29
|
-
requiredArtifacts: ['
|
|
29
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
30
30
|
// TODO: enable when implemented.
|
|
31
31
|
// replacesAudits: ['duplicated-javascript'],
|
|
32
32
|
};
|
|
@@ -24,7 +24,7 @@ class FontDisplayInsight extends Audit {
|
|
|
24
24
|
failureTitle: str_(UIStrings.title),
|
|
25
25
|
description: str_(UIStrings.description),
|
|
26
26
|
guidanceLevel: 3,
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
28
28
|
replacesAudits: ['font-display'],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -24,7 +24,7 @@ class ForcedReflowInsight extends Audit {
|
|
|
24
24
|
failureTitle: str_(UIStrings.title),
|
|
25
25
|
description: str_(UIStrings.description),
|
|
26
26
|
guidanceLevel: 3,
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -29,7 +29,7 @@ class ImageDeliveryInsight extends Audit {
|
|
|
29
29
|
failureTitle: str_(UIStrings.title),
|
|
30
30
|
description: str_(UIStrings.description),
|
|
31
31
|
guidanceLevel: 3,
|
|
32
|
-
requiredArtifacts: ['
|
|
32
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
33
33
|
replacesAudits: [
|
|
34
34
|
'modern-image-formats',
|
|
35
35
|
'uses-optimized-images',
|
|
@@ -17,7 +17,7 @@ import {Audit} from '../audit.js';
|
|
|
17
17
|
*/
|
|
18
18
|
async function getInsightSet(artifacts, context) {
|
|
19
19
|
const settings = context.settings;
|
|
20
|
-
const trace = artifacts.
|
|
20
|
+
const trace = artifacts.Trace;
|
|
21
21
|
const processedTrace = await ProcessedTrace.request(trace, context);
|
|
22
22
|
const SourceMaps = artifacts.SourceMaps;
|
|
23
23
|
const traceEngineResult = await TraceEngineResult.request({trace, settings, SourceMaps}, context);
|
|
@@ -24,7 +24,7 @@ class InteractionToNextPaintInsight extends Audit {
|
|
|
24
24
|
failureTitle: str_(UIStrings.title),
|
|
25
25
|
description: str_(UIStrings.description),
|
|
26
26
|
guidanceLevel: 3,
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
28
28
|
replacesAudits: ['work-during-interaction'],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -24,7 +24,7 @@ class LCPDiscoveryInsight extends Audit {
|
|
|
24
24
|
failureTitle: str_(UIStrings.title),
|
|
25
25
|
description: str_(UIStrings.description),
|
|
26
26
|
guidanceLevel: 3,
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
28
28
|
replacesAudits: ['prioritize-lcp-image', 'lcp-lazy-loaded'],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -24,7 +24,7 @@ class LCPPhasesInsight extends Audit {
|
|
|
24
24
|
failureTitle: str_(UIStrings.title),
|
|
25
25
|
description: str_(UIStrings.description),
|
|
26
26
|
guidanceLevel: 3,
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
28
28
|
replacesAudits: ['largest-contentful-paint-element'],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -28,7 +28,7 @@ class LegacyJavaScriptInsight extends Audit {
|
|
|
28
28
|
failureTitle: str_(UIStrings.title),
|
|
29
29
|
description: str_(UIStrings.description),
|
|
30
30
|
guidanceLevel: 2,
|
|
31
|
-
requiredArtifacts: ['
|
|
31
|
+
requiredArtifacts: ['Trace', 'Scripts', 'SourceMaps'],
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -24,7 +24,7 @@ class NetworkDependencyTreeInsight extends Audit {
|
|
|
24
24
|
failureTitle: str_(UIStrings.title),
|
|
25
25
|
description: str_(UIStrings.description),
|
|
26
26
|
guidanceLevel: 1,
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'SourceMaps'],
|
|
28
28
|
replacesAudits: ['critical-request-chains'],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -24,7 +24,7 @@ class RenderBlockingInsight extends Audit {
|
|
|
24
24
|
failureTitle: str_(UIStrings.title),
|
|
25
25
|
description: str_(UIStrings.description),
|
|
26
26
|
guidanceLevel: 3,
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
28
28
|
replacesAudits: ['render-blocking-resources'],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -26,7 +26,7 @@ class SlowCSSSelectorInsight extends Audit {
|
|
|
26
26
|
failureTitle: str_(UIStrings.title),
|
|
27
27
|
description: str_(UIStrings.description),
|
|
28
28
|
guidanceLevel: 3,
|
|
29
|
-
requiredArtifacts: ['
|
|
29
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -31,7 +31,7 @@ class ThirdPartiesInsight extends Audit {
|
|
|
31
31
|
failureTitle: str_(UIStrings.title),
|
|
32
32
|
description: str_(UIStrings.description),
|
|
33
33
|
guidanceLevel: 3,
|
|
34
|
-
requiredArtifacts: ['
|
|
34
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
35
35
|
replacesAudits: ['third-party-summary'],
|
|
36
36
|
};
|
|
37
37
|
}
|
|
@@ -24,7 +24,7 @@ class ViewportInsight extends Audit {
|
|
|
24
24
|
failureTitle: str_(UIStrings.title),
|
|
25
25
|
description: str_(UIStrings.description),
|
|
26
26
|
guidanceLevel: 3,
|
|
27
|
-
requiredArtifacts: ['
|
|
27
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
28
28
|
replacesAudits: ['viewport'],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -61,7 +61,7 @@ class HTTPS extends Audit {
|
|
|
61
61
|
title: str_(UIStrings.title),
|
|
62
62
|
failureTitle: str_(UIStrings.failureTitle),
|
|
63
63
|
description: str_(UIStrings.description),
|
|
64
|
-
requiredArtifacts: ['
|
|
64
|
+
requiredArtifacts: ['DevtoolsLog', 'InspectorIssues'],
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -71,7 +71,7 @@ class HTTPS extends Audit {
|
|
|
71
71
|
* @return {Promise<LH.Audit.Product>}
|
|
72
72
|
*/
|
|
73
73
|
static async audit(artifacts, context) {
|
|
74
|
-
const devtoolsLogs = artifacts.
|
|
74
|
+
const devtoolsLogs = artifacts.DevtoolsLog;
|
|
75
75
|
const networkRecords = await NetworkRecords.request(devtoolsLogs, context);
|
|
76
76
|
const insecureURLs = networkRecords
|
|
77
77
|
.filter(record => !NetworkRequest.isSecureRequest(record))
|
|
@@ -50,7 +50,7 @@ class LargestContentfulPaintElement extends Audit {
|
|
|
50
50
|
guidanceLevel: 1,
|
|
51
51
|
supportedModes: ['navigation'],
|
|
52
52
|
requiredArtifacts:
|
|
53
|
-
['
|
|
53
|
+
['Trace', 'TraceElements', 'DevtoolsLog', 'GatherContext', 'settings', 'URL',
|
|
54
54
|
'SourceMaps'],
|
|
55
55
|
};
|
|
56
56
|
}
|
|
@@ -120,8 +120,8 @@ class LargestContentfulPaintElement extends Audit {
|
|
|
120
120
|
* @return {Promise<LH.Audit.Product>}
|
|
121
121
|
*/
|
|
122
122
|
static async audit(artifacts, context) {
|
|
123
|
-
const trace = artifacts.
|
|
124
|
-
const devtoolsLog = artifacts.
|
|
123
|
+
const trace = artifacts.Trace;
|
|
124
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
125
125
|
const gatherContext = artifacts.GatherContext;
|
|
126
126
|
const metricComputationData = {
|
|
127
127
|
trace, devtoolsLog, gatherContext,
|
|
@@ -47,7 +47,7 @@ class LayoutShifts extends Audit {
|
|
|
47
47
|
description: str_(UIStrings.description),
|
|
48
48
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
49
49
|
guidanceLevel: 2,
|
|
50
|
-
requiredArtifacts: ['
|
|
50
|
+
requiredArtifacts: ['Trace', 'TraceElements', 'SourceMaps'],
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -58,7 +58,7 @@ class LayoutShifts extends Audit {
|
|
|
58
58
|
*/
|
|
59
59
|
static async audit(artifacts, context) {
|
|
60
60
|
const settings = context.settings;
|
|
61
|
-
const trace = artifacts.
|
|
61
|
+
const trace = artifacts.Trace;
|
|
62
62
|
const SourceMaps = artifacts.SourceMaps;
|
|
63
63
|
const traceEngineResult =
|
|
64
64
|
await TraceEngineResult.request({trace, settings, SourceMaps}, context);
|
|
@@ -36,7 +36,7 @@ class LargestContentfulPaintLazyLoaded extends Audit {
|
|
|
36
36
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
37
37
|
guidanceLevel: 3,
|
|
38
38
|
requiredArtifacts: ['TraceElements', 'ViewportDimensions', 'ImageElements',
|
|
39
|
-
'
|
|
39
|
+
'Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -68,7 +68,7 @@ class LongTasks extends Audit {
|
|
|
68
68
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
69
69
|
title: str_(UIStrings.title),
|
|
70
70
|
description: str_(UIStrings.description),
|
|
71
|
-
requiredArtifacts: ['
|
|
71
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'URL', 'GatherContext', 'SourceMaps'],
|
|
72
72
|
guidanceLevel: 1,
|
|
73
73
|
};
|
|
74
74
|
}
|
|
@@ -177,9 +177,9 @@ class LongTasks extends Audit {
|
|
|
177
177
|
static async audit(artifacts, context) {
|
|
178
178
|
const settings = context.settings || {};
|
|
179
179
|
const {URL, SourceMaps} = artifacts;
|
|
180
|
-
const trace = artifacts.
|
|
180
|
+
const trace = artifacts.Trace;
|
|
181
181
|
const tasks = await MainThreadTasks.request(trace, context);
|
|
182
|
-
const devtoolsLog = artifacts.
|
|
182
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
183
183
|
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
|
|
184
184
|
|
|
185
185
|
const metricComputationData = Audit.makeMetricComputationDataInput(artifacts, context);
|
|
@@ -17,7 +17,7 @@ class MainThreadTasks extends Audit {
|
|
|
17
17
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
18
18
|
title: 'Tasks',
|
|
19
19
|
description: 'Lists the toplevel main thread tasks that executed during page load.',
|
|
20
|
-
requiredArtifacts: ['
|
|
20
|
+
requiredArtifacts: ['Trace'],
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -27,7 +27,7 @@ class MainThreadTasks extends Audit {
|
|
|
27
27
|
* @return {Promise<LH.Audit.Product>}
|
|
28
28
|
*/
|
|
29
29
|
static async audit(artifacts, context) {
|
|
30
|
-
const trace = artifacts.
|
|
30
|
+
const trace = artifacts.Trace;
|
|
31
31
|
const tasks = await MainThreadTasksComputed.request(trace, context);
|
|
32
32
|
|
|
33
33
|
const results = tasks
|
|
@@ -46,7 +46,7 @@ class MainThreadWorkBreakdown extends Audit {
|
|
|
46
46
|
description: str_(UIStrings.description),
|
|
47
47
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
48
48
|
guidanceLevel: 1,
|
|
49
|
-
requiredArtifacts: ['
|
|
49
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'URL', 'GatherContext', 'SourceMaps'],
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -84,7 +84,7 @@ class MainThreadWorkBreakdown extends Audit {
|
|
|
84
84
|
*/
|
|
85
85
|
static async audit(artifacts, context) {
|
|
86
86
|
const settings = context.settings || {};
|
|
87
|
-
const trace = artifacts.
|
|
87
|
+
const trace = artifacts.Trace;
|
|
88
88
|
|
|
89
89
|
let tbtSavings = 0;
|
|
90
90
|
try {
|
|
@@ -30,7 +30,7 @@ class CumulativeLayoutShift extends Audit {
|
|
|
30
30
|
title: str_(i18n.UIStrings.cumulativeLayoutShiftMetric),
|
|
31
31
|
description: str_(UIStrings.description),
|
|
32
32
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
33
|
-
requiredArtifacts: ['
|
|
33
|
+
requiredArtifacts: ['Trace'],
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -53,7 +53,7 @@ class CumulativeLayoutShift extends Audit {
|
|
|
53
53
|
* @return {Promise<LH.Audit.Product>}
|
|
54
54
|
*/
|
|
55
55
|
static async audit(artifacts, context) {
|
|
56
|
-
const trace = artifacts.
|
|
56
|
+
const trace = artifacts.Trace;
|
|
57
57
|
|
|
58
58
|
// impactByNodeId is unused but we don't want it on debug data
|
|
59
59
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -27,7 +27,7 @@ class FirstContentfulPaint extends Audit {
|
|
|
27
27
|
description: str_(UIStrings.description),
|
|
28
28
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
29
29
|
supportedModes: ['navigation'],
|
|
30
|
-
requiredArtifacts: ['
|
|
30
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -61,8 +61,8 @@ class FirstContentfulPaint extends Audit {
|
|
|
61
61
|
* @return {Promise<LH.Audit.Product>}
|
|
62
62
|
*/
|
|
63
63
|
static async audit(artifacts, context) {
|
|
64
|
-
const trace = artifacts.
|
|
65
|
-
const devtoolsLog = artifacts.
|
|
64
|
+
const trace = artifacts.Trace;
|
|
65
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
66
66
|
const gatherContext = artifacts.GatherContext;
|
|
67
67
|
const metricComputationData = {trace, devtoolsLog, gatherContext,
|
|
68
68
|
settings: context.settings, URL: artifacts.URL,
|
|
@@ -28,7 +28,7 @@ class FirstMeaningfulPaint extends Audit {
|
|
|
28
28
|
description: str_(UIStrings.description),
|
|
29
29
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
30
30
|
supportedModes: ['navigation'],
|
|
31
|
-
requiredArtifacts: ['
|
|
31
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL'],
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -31,7 +31,7 @@ class InteractionToNextPaint extends Audit {
|
|
|
31
31
|
description: str_(UIStrings.description),
|
|
32
32
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
33
33
|
supportedModes: ['timespan'],
|
|
34
|
-
requiredArtifacts: ['
|
|
34
|
+
requiredArtifacts: ['Trace'],
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -61,7 +61,7 @@ class InteractionToNextPaint extends Audit {
|
|
|
61
61
|
return {score: null, notApplicable: true};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
const trace = artifacts.
|
|
64
|
+
const trace = artifacts.Trace;
|
|
65
65
|
const metricData = {trace, settings};
|
|
66
66
|
const interactionEvent = await ComputedResponsivenes.request(metricData, context);
|
|
67
67
|
|
|
@@ -33,7 +33,7 @@ class InteractiveMetric extends Audit {
|
|
|
33
33
|
description: str_(UIStrings.description),
|
|
34
34
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
35
35
|
supportedModes: ['navigation'],
|
|
36
|
-
requiredArtifacts: ['
|
|
36
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -67,8 +67,8 @@ class InteractiveMetric extends Audit {
|
|
|
67
67
|
* @return {Promise<LH.Audit.Product>}
|
|
68
68
|
*/
|
|
69
69
|
static async audit(artifacts, context) {
|
|
70
|
-
const trace = artifacts.
|
|
71
|
-
const devtoolsLog = artifacts.
|
|
70
|
+
const trace = artifacts.Trace;
|
|
71
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
72
72
|
const gatherContext = artifacts.GatherContext;
|
|
73
73
|
const metricComputationData = {
|
|
74
74
|
trace, devtoolsLog, gatherContext,
|
|
@@ -27,7 +27,7 @@ class LargestContentfulPaint extends Audit {
|
|
|
27
27
|
description: str_(UIStrings.description),
|
|
28
28
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
29
29
|
supportedModes: ['navigation'],
|
|
30
|
-
requiredArtifacts: ['HostUserAgent', '
|
|
30
|
+
requiredArtifacts: ['HostUserAgent', 'Trace', 'DevtoolsLog', 'GatherContext', 'URL',
|
|
31
31
|
'SourceMaps'],
|
|
32
32
|
};
|
|
33
33
|
}
|
|
@@ -70,8 +70,8 @@ class LargestContentfulPaint extends Audit {
|
|
|
70
70
|
* @return {Promise<LH.Audit.Product>}
|
|
71
71
|
*/
|
|
72
72
|
static async audit(artifacts, context) {
|
|
73
|
-
const trace = artifacts.
|
|
74
|
-
const devtoolsLog = artifacts.
|
|
73
|
+
const trace = artifacts.Trace;
|
|
74
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
75
75
|
const gatherContext = artifacts.GatherContext;
|
|
76
76
|
const metricComputationData = {
|
|
77
77
|
trace, devtoolsLog, gatherContext,
|
|
@@ -43,7 +43,7 @@ class MaxPotentialFID extends Audit {
|
|
|
43
43
|
description: str_(UIStrings.description),
|
|
44
44
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
45
45
|
supportedModes: ['navigation'],
|
|
46
|
-
requiredArtifacts: ['
|
|
46
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -117,8 +117,8 @@ class MaxPotentialFID extends Audit {
|
|
|
117
117
|
* @return {Promise<LH.Audit.Product>}
|
|
118
118
|
*/
|
|
119
119
|
static async audit(artifacts, context) {
|
|
120
|
-
const trace = artifacts.
|
|
121
|
-
const devtoolsLog = artifacts.
|
|
120
|
+
const trace = artifacts.Trace;
|
|
121
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
122
122
|
const gatherContext = artifacts.GatherContext;
|
|
123
123
|
const metricComputationData = {
|
|
124
124
|
trace, devtoolsLog, gatherContext,
|
|
@@ -27,7 +27,7 @@ class SpeedIndex extends Audit {
|
|
|
27
27
|
description: str_(UIStrings.description),
|
|
28
28
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
29
29
|
supportedModes: ['navigation'],
|
|
30
|
-
requiredArtifacts: ['
|
|
30
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -63,8 +63,8 @@ class SpeedIndex extends Audit {
|
|
|
63
63
|
* @return {Promise<LH.Audit.Product>}
|
|
64
64
|
*/
|
|
65
65
|
static async audit(artifacts, context) {
|
|
66
|
-
const trace = artifacts.
|
|
67
|
-
const devtoolsLog = artifacts.
|
|
66
|
+
const trace = artifacts.Trace;
|
|
67
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
68
68
|
const gatherContext = artifacts.GatherContext;
|
|
69
69
|
const metricComputationData = {
|
|
70
70
|
trace, devtoolsLog, gatherContext,
|
|
@@ -27,7 +27,7 @@ class TotalBlockingTime extends Audit {
|
|
|
27
27
|
title: str_(i18n.UIStrings.totalBlockingTimeMetric),
|
|
28
28
|
description: str_(UIStrings.description),
|
|
29
29
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
30
|
-
requiredArtifacts: ['
|
|
30
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -85,8 +85,8 @@ class TotalBlockingTime extends Audit {
|
|
|
85
85
|
* @return {Promise<LH.Audit.Product>}
|
|
86
86
|
*/
|
|
87
87
|
static async audit(artifacts, context) {
|
|
88
|
-
const trace = artifacts.
|
|
89
|
-
const devtoolsLog = artifacts.
|
|
88
|
+
const trace = artifacts.Trace;
|
|
89
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
90
90
|
const gatherContext = artifacts.GatherContext;
|
|
91
91
|
const metricComputationData = {
|
|
92
92
|
trace, devtoolsLog, gatherContext,
|
package/core/audits/metrics.js
CHANGED
|
@@ -26,7 +26,7 @@ class Metrics extends Audit {
|
|
|
26
26
|
title: 'Metrics',
|
|
27
27
|
description: 'Collects all available metrics.',
|
|
28
28
|
supportedModes: ['navigation'],
|
|
29
|
-
requiredArtifacts: ['
|
|
29
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -38,8 +38,8 @@ class Metrics extends Audit {
|
|
|
38
38
|
static async audit(artifacts, context) {
|
|
39
39
|
const settings = context.settings;
|
|
40
40
|
const gatherContext = artifacts.GatherContext;
|
|
41
|
-
const trace = artifacts.
|
|
42
|
-
const devtoolsLog = artifacts.
|
|
41
|
+
const trace = artifacts.Trace;
|
|
42
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
43
43
|
const {URL, SourceMaps} = artifacts;
|
|
44
44
|
const summary = await TimingSummary
|
|
45
45
|
.request({trace, devtoolsLog, gatherContext, settings, URL, SourceMaps}, context);
|
|
@@ -20,7 +20,7 @@ class NetworkRequests extends Audit {
|
|
|
20
20
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
21
21
|
title: 'Network Requests',
|
|
22
22
|
description: 'Lists the network requests that were made during page load.',
|
|
23
|
-
requiredArtifacts: ['
|
|
23
|
+
requiredArtifacts: ['DevtoolsLog', 'URL', 'GatherContext'],
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ class NetworkRequests extends Audit {
|
|
|
30
30
|
* @return {Promise<LH.Audit.Product>}
|
|
31
31
|
*/
|
|
32
32
|
static async audit(artifacts, context) {
|
|
33
|
-
const devtoolsLog = artifacts.
|
|
33
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
34
34
|
const records = await NetworkRecords.request(devtoolsLog, context);
|
|
35
35
|
const classifiedEntities = await EntityClassification.request(
|
|
36
36
|
{URL: artifacts.URL, devtoolsLog}, context);
|
|
@@ -30,7 +30,7 @@ class NetworkRTT extends Audit {
|
|
|
30
30
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
31
31
|
title: str_(UIStrings.title),
|
|
32
32
|
description: str_(UIStrings.description),
|
|
33
|
-
requiredArtifacts: ['
|
|
33
|
+
requiredArtifacts: ['DevtoolsLog'],
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -40,7 +40,7 @@ class NetworkRTT extends Audit {
|
|
|
40
40
|
* @return {Promise<LH.Audit.Product>}
|
|
41
41
|
*/
|
|
42
42
|
static async audit(artifacts, context) {
|
|
43
|
-
const devtoolsLog = artifacts.
|
|
43
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
44
44
|
const records = await NetworkRecords.request(devtoolsLog, context);
|
|
45
45
|
if (!records.length) {
|
|
46
46
|
return {
|
|
@@ -30,7 +30,7 @@ class NetworkServerLatency extends Audit {
|
|
|
30
30
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
31
31
|
title: str_(UIStrings.title),
|
|
32
32
|
description: str_(UIStrings.description),
|
|
33
|
-
requiredArtifacts: ['
|
|
33
|
+
requiredArtifacts: ['DevtoolsLog'],
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -40,7 +40,7 @@ class NetworkServerLatency extends Audit {
|
|
|
40
40
|
* @return {Promise<LH.Audit.Product>}
|
|
41
41
|
*/
|
|
42
42
|
static async audit(artifacts, context) {
|
|
43
|
-
const devtoolsLog = artifacts.
|
|
43
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
44
44
|
const records = await NetworkRecords.request(devtoolsLog, context);
|
|
45
45
|
if (!records.length) {
|
|
46
46
|
return {
|
|
@@ -35,7 +35,7 @@ class OriginIsolation extends Audit {
|
|
|
35
35
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
36
36
|
title: str_(UIStrings.title),
|
|
37
37
|
description: str_(UIStrings.description),
|
|
38
|
-
requiredArtifacts: ['
|
|
38
|
+
requiredArtifacts: ['DevtoolsLog', 'URL'],
|
|
39
39
|
supportedModes: ['navigation'],
|
|
40
40
|
};
|
|
41
41
|
}
|
|
@@ -47,7 +47,7 @@ class OriginIsolation extends Audit {
|
|
|
47
47
|
* @return {Promise<string[]>}
|
|
48
48
|
*/
|
|
49
49
|
static async getRawCoop(artifacts, context) {
|
|
50
|
-
const devtoolsLog = artifacts.
|
|
50
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
51
51
|
const mainResource =
|
|
52
52
|
await MainResource.request({devtoolsLog, URL: artifacts.URL}, context);
|
|
53
53
|
|
|
@@ -33,7 +33,7 @@ class PredictivePerf extends Audit {
|
|
|
33
33
|
'a cellular connection on a mobile device.',
|
|
34
34
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
35
35
|
supportedModes: ['navigation'],
|
|
36
|
-
requiredArtifacts: ['
|
|
36
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -44,8 +44,8 @@ class PredictivePerf extends Audit {
|
|
|
44
44
|
*/
|
|
45
45
|
static async audit(artifacts, context) {
|
|
46
46
|
const gatherContext = artifacts.GatherContext;
|
|
47
|
-
const trace = artifacts.
|
|
48
|
-
const devtoolsLog = artifacts.
|
|
47
|
+
const trace = artifacts.Trace;
|
|
48
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
49
49
|
const {URL, SourceMaps} = artifacts;
|
|
50
50
|
/** @type {LH.Config.Settings} */
|
|
51
51
|
const settings = JSON.parse(JSON.stringify(defaultSettings)); // Use default settings.
|
|
@@ -36,7 +36,7 @@ class PreloadFontsAudit extends Audit {
|
|
|
36
36
|
title: str_(UIStrings.title),
|
|
37
37
|
failureTitle: str_(UIStrings.failureTitle),
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
|
-
requiredArtifacts: ['
|
|
39
|
+
requiredArtifacts: ['DevtoolsLog', 'URL', 'CSSUsage', 'Stylesheets'],
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -63,7 +63,7 @@ class PreloadFontsAudit extends Audit {
|
|
|
63
63
|
* @return {Promise<LH.Audit.Product>}
|
|
64
64
|
*/
|
|
65
65
|
static async audit(artifacts, context) {
|
|
66
|
-
const devtoolsLog = artifacts.
|
|
66
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
67
67
|
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
|
|
68
68
|
|
|
69
69
|
// Gets the URLs of fonts where font-display: optional.
|
|
@@ -38,7 +38,7 @@ class PrioritizeLcpImage extends Audit {
|
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
39
|
supportedModes: ['navigation'],
|
|
40
40
|
guidanceLevel: 4,
|
|
41
|
-
requiredArtifacts: ['
|
|
41
|
+
requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'TraceElements',
|
|
42
42
|
'SourceMaps'],
|
|
43
43
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
44
44
|
};
|
|
@@ -236,8 +236,8 @@ class PrioritizeLcpImage extends Audit {
|
|
|
236
236
|
*/
|
|
237
237
|
static async audit(artifacts, context) {
|
|
238
238
|
const gatherContext = artifacts.GatherContext;
|
|
239
|
-
const trace = artifacts.
|
|
240
|
-
const devtoolsLog = artifacts.
|
|
239
|
+
const trace = artifacts.Trace;
|
|
240
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
241
241
|
const {URL, SourceMaps} = artifacts;
|
|
242
242
|
const settings = context.settings;
|
|
243
243
|
const metricData =
|
package/core/audits/redirects.js
CHANGED
|
@@ -31,7 +31,7 @@ class Redirects extends Audit {
|
|
|
31
31
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
32
32
|
supportedModes: ['navigation'],
|
|
33
33
|
guidanceLevel: 2,
|
|
34
|
-
requiredArtifacts: ['URL', 'GatherContext', '
|
|
34
|
+
requiredArtifacts: ['URL', 'GatherContext', 'DevtoolsLog', 'Trace', 'SourceMaps'],
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -84,8 +84,8 @@ class Redirects extends Audit {
|
|
|
84
84
|
*/
|
|
85
85
|
static async audit(artifacts, context) {
|
|
86
86
|
const settings = context.settings;
|
|
87
|
-
const trace = artifacts.
|
|
88
|
-
const devtoolsLog = artifacts.
|
|
87
|
+
const trace = artifacts.Trace;
|
|
88
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
89
89
|
const gatherContext = artifacts.GatherContext;
|
|
90
90
|
const {URL, SourceMaps} = artifacts;
|
|
91
91
|
|