lighthouse 12.5.1-dev.20250417 → 12.5.1-dev.20250418
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.
|
@@ -34,11 +34,10 @@ declare class TraceElements extends BaseGatherer {
|
|
|
34
34
|
*
|
|
35
35
|
* @param {LH.Trace} trace
|
|
36
36
|
* @param {LH.Artifacts.TraceEngineResult['data']} traceEngineResult
|
|
37
|
-
* @param {LH.Artifacts.TraceEngineRootCauses} rootCauses
|
|
38
37
|
* @param {LH.Gatherer.Context} context
|
|
39
38
|
* @return {Promise<Array<{nodeId: number}>>}
|
|
40
39
|
*/
|
|
41
|
-
static getTopLayoutShifts(trace: LH.Trace, traceEngineResult: LH.Artifacts.TraceEngineResult["data"],
|
|
40
|
+
static getTopLayoutShifts(trace: LH.Trace, traceEngineResult: LH.Artifacts.TraceEngineResult["data"], context: LH.Gatherer.Context): Promise<Array<{
|
|
42
41
|
nodeId: number;
|
|
43
42
|
}>>;
|
|
44
43
|
/**
|
|
@@ -82,10 +81,10 @@ declare class TraceElements extends BaseGatherer {
|
|
|
82
81
|
*/
|
|
83
82
|
getNodeDetails(session: LH.Gatherer.ProtocolSession, backendNodeId: number): Promise<import("devtools-protocol").Protocol.Runtime.CallFunctionOnResponse | null>;
|
|
84
83
|
/**
|
|
85
|
-
* @param {LH.Gatherer.Context<'Trace'|'
|
|
84
|
+
* @param {LH.Gatherer.Context<'Trace'|'SourceMaps'>} context
|
|
86
85
|
* @return {Promise<LH.Artifacts.TraceElement[]>}
|
|
87
86
|
*/
|
|
88
|
-
getArtifact(context: LH.Gatherer.Context<"Trace" | "
|
|
87
|
+
getArtifact(context: LH.Gatherer.Context<"Trace" | "SourceMaps">): Promise<LH.Artifacts.TraceElement[]>;
|
|
89
88
|
}
|
|
90
89
|
import BaseGatherer from '../base-gatherer.js';
|
|
91
90
|
//# sourceMappingURL=trace-elements.d.ts.map
|
|
@@ -204,11 +204,10 @@ class TraceElements extends BaseGatherer {
|
|
|
204
204
|
*
|
|
205
205
|
* @param {LH.Trace} trace
|
|
206
206
|
* @param {LH.Artifacts.TraceEngineResult['data']} traceEngineResult
|
|
207
|
-
* @param {LH.Artifacts.TraceEngineRootCauses} rootCauses
|
|
208
207
|
* @param {LH.Gatherer.Context} context
|
|
209
208
|
* @return {Promise<Array<{nodeId: number}>>}
|
|
210
209
|
*/
|
|
211
|
-
static async getTopLayoutShifts(trace, traceEngineResult,
|
|
210
|
+
static async getTopLayoutShifts(trace, traceEngineResult, context) {
|
|
212
211
|
const {impactByNodeId} = await CumulativeLayoutShift.request(trace, context);
|
|
213
212
|
const clusters = traceEngineResult.LayoutShifts.clusters ?? [];
|
|
214
213
|
const layoutShiftEvents =
|
|
@@ -380,7 +379,7 @@ class TraceElements extends BaseGatherer {
|
|
|
380
379
|
}
|
|
381
380
|
|
|
382
381
|
/**
|
|
383
|
-
* @param {LH.Gatherer.Context<'Trace'|'
|
|
382
|
+
* @param {LH.Gatherer.Context<'Trace'|'SourceMaps'>} context
|
|
384
383
|
* @return {Promise<LH.Artifacts.TraceElement[]>}
|
|
385
384
|
*/
|
|
386
385
|
async getArtifact(context) {
|
|
@@ -391,7 +390,6 @@ class TraceElements extends BaseGatherer {
|
|
|
391
390
|
const settings = context.settings;
|
|
392
391
|
const traceEngineResult =
|
|
393
392
|
await TraceEngineResult.request({trace, settings, SourceMaps}, context);
|
|
394
|
-
const rootCauses = context.dependencies.RootCauses;
|
|
395
393
|
|
|
396
394
|
const processedTrace = await ProcessedTrace.request(trace, context);
|
|
397
395
|
const {mainThreadEvents} = processedTrace;
|
|
@@ -401,7 +399,7 @@ class TraceElements extends BaseGatherer {
|
|
|
401
399
|
traceEngineResult, navigationId);
|
|
402
400
|
const lcpNodeData = await TraceElements.getLcpElement(trace, context);
|
|
403
401
|
const shiftsData = await TraceElements.getTopLayoutShifts(
|
|
404
|
-
trace, traceEngineResult.data,
|
|
402
|
+
trace, traceEngineResult.data, context);
|
|
405
403
|
const animatedElementData = await this.getAnimatedElements(mainThreadEvents);
|
|
406
404
|
const responsivenessElementData = await TraceElements.getResponsivenessElement(trace, context);
|
|
407
405
|
|
|
@@ -56,9 +56,6 @@ class Trace extends BaseGatherer {
|
|
|
56
56
|
'disabled-by-default-devtools.timeline.frame',
|
|
57
57
|
'latencyInfo',
|
|
58
58
|
|
|
59
|
-
// For CLS root causes.
|
|
60
|
-
'disabled-by-default-devtools.timeline.invalidationTracking',
|
|
61
|
-
|
|
62
59
|
// Enhanced traces.
|
|
63
60
|
'disabled-by-default-devtools.target-rundown',
|
|
64
61
|
'disabled-by-default-devtools.v8-source-rundown-sources',
|
package/package.json
CHANGED
package/types/artifacts.d.ts
CHANGED
|
@@ -137,8 +137,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
|
|
|
137
137
|
ResponseCompression: {requestId: string, url: string, mimeType: string, transferSize: number, resourceSize: number, gzipSize?: number}[];
|
|
138
138
|
/** Information on fetching and the content of the /robots.txt file. */
|
|
139
139
|
RobotsTxt: {status: number|null, content: string|null, errorMessage?: string};
|
|
140
|
-
/** The result of calling the shared trace engine root cause analysis. */
|
|
141
|
-
RootCauses: Artifacts.TraceEngineRootCauses;
|
|
142
140
|
/** Source maps of scripts executed in the page. */
|
|
143
141
|
SourceMaps: Array<Artifacts.SourceMap>;
|
|
144
142
|
/** Information on detected tech stacks (e.g. JS libraries) used by the page. */
|