lighthouse 12.5.0 → 12.5.1-dev.20250327
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/test/smokehouse/lib/concurrent-mapper.d.ts +3 -3
- package/core/audits/audit.d.ts +1 -1
- package/core/audits/bootup-time.d.ts +1 -1
- package/core/audits/byte-efficiency/total-byte-weight.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images.d.ts +1 -1
- package/core/audits/dobetterweb/dom-size.d.ts +1 -1
- package/core/audits/long-tasks.d.ts +1 -1
- package/core/audits/mainthread-work-breakdown.d.ts +1 -1
- package/core/audits/manual/manual-audit.d.ts +1 -1
- package/core/audits/metrics/cumulative-layout-shift.d.ts +1 -1
- package/core/audits/metrics/interaction-to-next-paint.d.ts +1 -1
- package/core/audits/metrics/max-potential-fid.d.ts +1 -1
- package/core/audits/user-timings.d.ts +1 -1
- package/core/computed/critical-request-chains.d.ts +1 -1
- package/core/computed/document-urls.d.ts +4 -1
- package/core/computed/entity-classification.d.ts +1 -1
- package/core/computed/image-records.d.ts +1 -1
- package/core/computed/js-bundles.d.ts +1 -1
- package/core/computed/lcp-image-record.d.ts +1 -1
- package/core/computed/load-simulator.d.ts +1 -1
- package/core/computed/main-resource.d.ts +1 -1
- package/core/computed/main-thread-tasks.d.ts +1 -1
- package/core/computed/metrics/cumulative-layout-shift.d.ts +10 -1
- package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/first-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/interactive.d.ts +1 -1
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-interactive.d.ts +1 -1
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +1 -1
- package/core/computed/metrics/lantern-speed-index.d.ts +1 -1
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +1 -1
- package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/largest-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lcp-breakdown.d.ts +5 -1
- package/core/computed/metrics/max-potential-fid.d.ts +1 -1
- package/core/computed/metrics/responsiveness.d.ts +1 -1
- package/core/computed/metrics/speed-index.d.ts +1 -1
- package/core/computed/metrics/time-to-first-byte.d.ts +1 -1
- package/core/computed/metrics/timing-summary.d.ts +4 -1
- package/core/computed/metrics/total-blocking-time.d.ts +1 -1
- package/core/computed/module-duplication.d.ts +5 -1
- package/core/computed/navigation-insights.d.ts +1 -1
- package/core/computed/network-analysis.d.ts +1 -1
- package/core/computed/network-records.d.ts +1 -1
- package/core/computed/page-dependency-graph.d.ts +1 -1
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/computed/processed-trace.d.ts +1 -1
- package/core/computed/resource-summary.d.ts +1 -1
- package/core/computed/screenshots.d.ts +4 -1
- package/core/computed/speedline.d.ts +1 -1
- package/core/computed/tbt-impact-tasks.d.ts +1 -1
- package/core/computed/trace-engine-result.d.ts +1 -1
- package/core/computed/trace-engine-result.js +1 -1
- package/core/computed/unused-css.d.ts +1 -1
- package/core/computed/unused-javascript-summary.d.ts +1 -1
- package/core/computed/user-timings.d.ts +1 -1
- package/core/computed/viewport-meta.d.ts +1 -1
- package/core/gather/driver/network-monitor.d.ts +1 -1
- package/core/gather/driver/network.d.ts +1 -1
- package/core/gather/driver.d.ts +1 -1
- package/core/gather/gatherers/devtools-log.d.ts +1 -1
- package/core/gather/navigation-runner.d.ts +1 -1
- package/core/gather/snapshot-runner.d.ts +1 -1
- package/core/gather/timespan-runner.d.ts +1 -1
- package/core/index.d.ts +6 -6
- package/core/lib/asset-saver.d.ts +1 -1
- package/core/lib/cdt/generated/SourceMap.d.ts +6 -3
- package/core/lib/cdt/generated/SourceMap.js +3 -0
- package/core/lib/i18n/i18n.d.ts +1 -1
- package/core/lib/page-functions.d.ts +1 -1
- package/core/lib/tracehouse/cpu-profile-model.d.ts +1 -1
- package/core/lib/tracehouse/main-thread-tasks.d.ts +3 -3
- package/core/lib/tracehouse/trace-processor.d.ts +1 -1
- package/core/lib/traces/metric-trace-events.d.ts +2 -2
- package/core/scoring.d.ts +492 -3
- package/core/user-flow.d.ts +6 -6
- package/package.json +2 -2
- package/report/renderer/category-renderer.d.ts +2 -2
- package/report/renderer/details-renderer.d.ts +1 -1
- package/report/renderer/features-util.d.ts +1 -1
- package/report/renderer/performance-category-renderer.d.ts +2 -2
- package/shared/localization/format.d.ts +1 -1
- package/types/internal/node.d.ts +0 -16
|
@@ -20,7 +20,7 @@ export type Summary = {
|
|
|
20
20
|
sourcesWastedBytes?: Record<string, number> | undefined;
|
|
21
21
|
};
|
|
22
22
|
declare const UnusedJavascriptSummaryComputed: typeof UnusedJavascriptSummary & {
|
|
23
|
-
request: (dependencies: ComputeInput, context: LH.Artifacts.ComputedContext) =>
|
|
23
|
+
request: (dependencies: ComputeInput, context: LH.Artifacts.ComputedContext) => Promise<Summary>;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* @typedef WasteData
|
|
@@ -14,7 +14,7 @@ export type MeasureEvent = {
|
|
|
14
14
|
duration: number;
|
|
15
15
|
};
|
|
16
16
|
declare const UserTimingsComputed: typeof UserTimings & {
|
|
17
|
-
request: (dependencies: import("../index.js").Trace, context: LH.Artifacts.ComputedContext) =>
|
|
17
|
+
request: (dependencies: import("../index.js").Trace, context: LH.Artifacts.ComputedContext) => Promise<(MarkEvent | MeasureEvent)[]>;
|
|
18
18
|
};
|
|
19
19
|
/** @typedef {{name: string, isMark: true, args: LH.TraceEvent['args'], startTime: number}} MarkEvent */
|
|
20
20
|
/** @typedef {{name: string, isMark: false, args: LH.TraceEvent['args'], startTime: number, endTime: number, duration: number}} MeasureEvent */
|
|
@@ -25,7 +25,7 @@ declare const ViewportMetaComputed: typeof ViewportMeta & {
|
|
|
25
25
|
httpEquiv?: string;
|
|
26
26
|
charset?: string;
|
|
27
27
|
node: import("../index.js").Artifacts.NodeDetails;
|
|
28
|
-
}[], context: LH.Artifacts.ComputedContext) =>
|
|
28
|
+
}[], context: LH.Artifacts.ComputedContext) => Promise<ViewportMetaResult>;
|
|
29
29
|
};
|
|
30
30
|
declare class ViewportMeta {
|
|
31
31
|
/**
|
|
@@ -71,7 +71,7 @@ export class NetworkMonitor extends NetworkMonitor_base {
|
|
|
71
71
|
* @param {(request: NetworkRequest) => boolean} [requestFilter]
|
|
72
72
|
* @return {boolean}
|
|
73
73
|
*/
|
|
74
|
-
_isIdlePeriod(allowedRequests: number, requestFilter?: (
|
|
74
|
+
_isIdlePeriod(allowedRequests: number, requestFilter?: (request: NetworkRequest) => boolean): boolean;
|
|
75
75
|
/**
|
|
76
76
|
* Emits the appropriate network status event.
|
|
77
77
|
*/
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* @param {number} [timeout]
|
|
7
7
|
* @return {Promise<string>}
|
|
8
8
|
*/
|
|
9
|
-
export function fetchResponseBodyFromCache(session: LH.Gatherer.ProtocolSession, requestId: string, timeout?: number
|
|
9
|
+
export function fetchResponseBodyFromCache(session: LH.Gatherer.ProtocolSession, requestId: string, timeout?: number): Promise<string>;
|
|
10
10
|
//# sourceMappingURL=network.d.ts.map
|
package/core/gather/driver.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export class Driver implements LH.Gatherer.Driver {
|
|
|
15
15
|
_fetcher: Fetcher | undefined;
|
|
16
16
|
defaultSession: import("../../types/gatherer.js").default.ProtocolSession;
|
|
17
17
|
/** @return {LH.Gatherer.Driver['executionContext']} */
|
|
18
|
-
get executionContext():
|
|
18
|
+
get executionContext(): LH.Gatherer.Driver["executionContext"];
|
|
19
19
|
get fetcher(): any;
|
|
20
20
|
get targetManager(): any;
|
|
21
21
|
get networkMonitor(): any;
|
|
@@ -16,7 +16,7 @@ export type PhaseState = Omit<Parameters<typeof collectPhaseArtifacts>[0], "phas
|
|
|
16
16
|
export function navigationGather(page: LH.Puppeteer.Page | undefined, requestor: LH.NavigationRequestor | undefined, options?: {
|
|
17
17
|
config?: LH.Config;
|
|
18
18
|
flags?: LH.Flags;
|
|
19
|
-
}
|
|
19
|
+
}): Promise<LH.Gatherer.GatherResult>;
|
|
20
20
|
/**
|
|
21
21
|
* @param {{driver: Driver, resolvedConfig: LH.Config.ResolvedConfig, requestor: LH.NavigationRequestor}} args
|
|
22
22
|
* @return {Promise<{baseArtifacts: LH.BaseArtifacts}>}
|
package/core/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare function lighthouse(url?: string | undefined, flags?: LH.Flags | undefin
|
|
|
20
20
|
* @param {LH.Puppeteer.Page} page
|
|
21
21
|
* @param {LH.UserFlow.Options} [options]
|
|
22
22
|
*/
|
|
23
|
-
export function startFlow(page: LH.Puppeteer.Page, options?: LH.UserFlow.Options
|
|
23
|
+
export function startFlow(page: LH.Puppeteer.Page, options?: LH.UserFlow.Options): Promise<UserFlow>;
|
|
24
24
|
/**
|
|
25
25
|
* @param {LH.Puppeteer.Page|undefined} page
|
|
26
26
|
* @param {LH.NavigationRequestor|undefined} requestor
|
|
@@ -30,7 +30,7 @@ export function startFlow(page: LH.Puppeteer.Page, options?: LH.UserFlow.Options
|
|
|
30
30
|
export function navigation(page: LH.Puppeteer.Page | undefined, requestor: LH.NavigationRequestor | undefined, options?: {
|
|
31
31
|
config?: LH.Config;
|
|
32
32
|
flags?: LH.Flags;
|
|
33
|
-
}
|
|
33
|
+
}): Promise<LH.RunnerResult | undefined>;
|
|
34
34
|
/**
|
|
35
35
|
* @param {LH.Puppeteer.Page} page
|
|
36
36
|
* @param {{config?: LH.Config, flags?: LH.Flags}} [options]
|
|
@@ -39,7 +39,7 @@ export function navigation(page: LH.Puppeteer.Page | undefined, requestor: LH.Na
|
|
|
39
39
|
export function startTimespan(page: LH.Puppeteer.Page, options?: {
|
|
40
40
|
config?: LH.Config;
|
|
41
41
|
flags?: LH.Flags;
|
|
42
|
-
}
|
|
42
|
+
}): Promise<{
|
|
43
43
|
endTimespan: () => Promise<LH.RunnerResult | undefined>;
|
|
44
44
|
}>;
|
|
45
45
|
/**
|
|
@@ -50,19 +50,19 @@ export function startTimespan(page: LH.Puppeteer.Page, options?: {
|
|
|
50
50
|
export function snapshot(page: LH.Puppeteer.Page, options?: {
|
|
51
51
|
config?: LH.Config;
|
|
52
52
|
flags?: LH.Flags;
|
|
53
|
-
}
|
|
53
|
+
}): Promise<LH.RunnerResult | undefined>;
|
|
54
54
|
/**
|
|
55
55
|
* @template {LH.Result|LH.FlowResult} R
|
|
56
56
|
* @param {R} result
|
|
57
57
|
* @param {[R] extends [LH.Result] ? LH.OutputMode : Exclude<LH.OutputMode, 'csv'>} [format]
|
|
58
58
|
* @return {string}
|
|
59
59
|
*/
|
|
60
|
-
export function generateReport<R extends LH.Result | LH.FlowResult>(result: R, format?:
|
|
60
|
+
export function generateReport<R extends LH.Result | LH.FlowResult>(result: R, format?: [R] extends [LH.Result] ? LH.OutputMode : Exclude<LH.OutputMode, "csv">): string;
|
|
61
61
|
/**
|
|
62
62
|
* @param {LH.UserFlow.FlowArtifacts} flowArtifacts
|
|
63
63
|
* @param {LH.Config} [config]
|
|
64
64
|
*/
|
|
65
|
-
export function auditFlowArtifacts(flowArtifacts: LH.UserFlow.FlowArtifacts, config?: LH.Config
|
|
65
|
+
export function auditFlowArtifacts(flowArtifacts: LH.UserFlow.FlowArtifacts, config?: LH.Config): Promise<{
|
|
66
66
|
steps: LH.FlowResult.Step[];
|
|
67
67
|
name: string;
|
|
68
68
|
}>;
|
|
@@ -60,7 +60,7 @@ export function saveAssets(artifacts: LH.Artifacts, audits: LH.Result["audits"],
|
|
|
60
60
|
* @param {LH.Result['audits']} [audits]
|
|
61
61
|
* @return {Promise<Array<PreparedAssets>>}
|
|
62
62
|
*/
|
|
63
|
-
export function prepareAssets(artifacts: LH.Artifacts, audits?:
|
|
63
|
+
export function prepareAssets(artifacts: LH.Artifacts, audits?: LH.Result["audits"]): Promise<Array<PreparedAssets>>;
|
|
64
64
|
/**
|
|
65
65
|
* Save a trace as JSON by streaming to disk at traceFilename.
|
|
66
66
|
* @param {LH.Trace} traceData
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export = SourceMap;
|
|
2
2
|
declare class SourceMap {
|
|
3
3
|
/**
|
|
4
|
+
* @param {string} compiledURL
|
|
5
|
+
* @param {string} sourceMappingURL
|
|
6
|
+
* @param {object} payload
|
|
4
7
|
* Implements Source Map V3 model. See https://github.com/google/closure-compiler/wiki/Source-Maps
|
|
5
8
|
* for format description.
|
|
6
9
|
*/
|
|
7
|
-
constructor(compiledURL:
|
|
8
|
-
compiledURL():
|
|
9
|
-
url():
|
|
10
|
+
constructor(compiledURL: string, sourceMappingURL: string, payload: object);
|
|
11
|
+
compiledURL(): string;
|
|
12
|
+
url(): string;
|
|
10
13
|
sourceURLs(): any[];
|
|
11
14
|
embeddedContentByURL(sourceURL: any): any;
|
|
12
15
|
hasScopeInfo(): boolean;
|
|
@@ -104,6 +104,9 @@ class SourceMap {
|
|
|
104
104
|
#sourceInfoByURL = new Map();
|
|
105
105
|
#scopesInfo = null;
|
|
106
106
|
/**
|
|
107
|
+
* @param {string} compiledURL
|
|
108
|
+
* @param {string} sourceMappingURL
|
|
109
|
+
* @param {object} payload
|
|
107
110
|
* Implements Source Map V3 model. See https://github.com/google/closure-compiler/wiki/Source-Maps
|
|
108
111
|
* for format description.
|
|
109
112
|
*/
|
package/core/lib/i18n/i18n.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export function lookupLocale(locales?: (string | string[]) | undefined, possible
|
|
|
71
71
|
* @param {string} filename
|
|
72
72
|
* @param {Record<string, string>=} fileStrings
|
|
73
73
|
*/
|
|
74
|
-
export function createIcuMessageFn(filename: string, fileStrings?: Record<string, string> | undefined): (message: string, values?: Record<string, string | number>
|
|
74
|
+
export function createIcuMessageFn(filename: string, fileStrings?: Record<string, string> | undefined): (message: string, values?: Record<string, string | number>) => LH.IcuMessage;
|
|
75
75
|
/**
|
|
76
76
|
* Returns true if the given value is a string or an LH.IcuMessage.
|
|
77
77
|
* @param {unknown} value
|
|
@@ -43,7 +43,7 @@ export type ParseSelector<T extends string> = import("typed-query-selector/parse
|
|
|
43
43
|
* @param {string|Error} [err] The error to convert
|
|
44
44
|
* @return {{__failedInBrowser: boolean, name: string, message: string, stack: string|undefined}}
|
|
45
45
|
*/
|
|
46
|
-
declare function wrapRuntimeEvalErrorInBrowser(err?: string | Error
|
|
46
|
+
declare function wrapRuntimeEvalErrorInBrowser(err?: string | Error): {
|
|
47
47
|
__failedInBrowser: boolean;
|
|
48
48
|
name: string;
|
|
49
49
|
message: string;
|
|
@@ -223,6 +223,6 @@ export class CpuProfileModel {
|
|
|
223
223
|
* @param {Array<LH.Artifacts.TaskNode>} [knownTaskNodes]
|
|
224
224
|
* @return {Array<LH.TraceEvent>}
|
|
225
225
|
*/
|
|
226
|
-
synthesizeTraceEvents(knownTaskNodes?:
|
|
226
|
+
synthesizeTraceEvents(knownTaskNodes?: Array<LH.Artifacts.TaskNode>): Array<LH.TraceEvent>;
|
|
227
227
|
}
|
|
228
228
|
//# sourceMappingURL=cpu-profile-model.d.ts.map
|
|
@@ -59,7 +59,7 @@ export class MainThreadTasks {
|
|
|
59
59
|
* @param {LH.TraceEvent} [endEvent]
|
|
60
60
|
* @return {TaskNode}
|
|
61
61
|
*/
|
|
62
|
-
static _createNewTaskNode(event: LH.TraceEvent, endEvent?: LH.TraceEvent
|
|
62
|
+
static _createNewTaskNode(event: LH.TraceEvent, endEvent?: LH.TraceEvent): TaskNode;
|
|
63
63
|
/**
|
|
64
64
|
*
|
|
65
65
|
* @param {TaskNode} currentTask
|
|
@@ -132,7 +132,7 @@ export class MainThreadTasks {
|
|
|
132
132
|
* @param {TaskNode} task
|
|
133
133
|
* @param {TaskGroup} [parentGroup]
|
|
134
134
|
*/
|
|
135
|
-
static _computeRecursiveTaskGroup(task: TaskNode, parentGroup?:
|
|
135
|
+
static _computeRecursiveTaskGroup(task: TaskNode, parentGroup?: TaskGroup): void;
|
|
136
136
|
/**
|
|
137
137
|
* @param {LH.TraceEvent[]} mainThreadEvents
|
|
138
138
|
* @param {Array<{id: string, url: string}>} frames
|
|
@@ -143,7 +143,7 @@ export class MainThreadTasks {
|
|
|
143
143
|
static getMainThreadTasks(mainThreadEvents: LH.TraceEvent[], frames: Array<{
|
|
144
144
|
id: string;
|
|
145
145
|
url: string;
|
|
146
|
-
}>, traceEndTs: number, traceStartTs?: number
|
|
146
|
+
}>, traceEndTs: number, traceStartTs?: number): TaskNode[];
|
|
147
147
|
/**
|
|
148
148
|
* Prints an artistic rendering of the task tree for easier debugability.
|
|
149
149
|
*
|
|
@@ -220,7 +220,7 @@ export class TraceProcessor {
|
|
|
220
220
|
*/
|
|
221
221
|
static processTrace(trace: LH.Trace, options?: {
|
|
222
222
|
timeOriginDeterminationMethod?: TimeOriginDeterminationMethod;
|
|
223
|
-
}
|
|
223
|
+
}): LH.Artifacts.ProcessedTrace;
|
|
224
224
|
/**
|
|
225
225
|
* Finds key navigation trace events and computes timings of events in milliseconds since the time
|
|
226
226
|
* origin in addition to the standard microsecond monotonic timestamps.
|
|
@@ -3,11 +3,11 @@ export class MetricTraceEvents {
|
|
|
3
3
|
* Returns simplified representation of all metrics
|
|
4
4
|
* @return {Array<{id: string, name: string, tsKey: keyof LH.Artifacts.TimingSummary}>} metrics to consider
|
|
5
5
|
*/
|
|
6
|
-
static get metricsDefinitions(): {
|
|
6
|
+
static get metricsDefinitions(): Array<{
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
tsKey: keyof LH.Artifacts.TimingSummary;
|
|
10
|
-
}
|
|
10
|
+
}>;
|
|
11
11
|
/**
|
|
12
12
|
* @param {Array<LH.TraceEvent>} traceEvents
|
|
13
13
|
* @param {LH.Result['audits']} auditResults
|