lighthouse 13.0.3 → 13.2.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/CONTRIBUTING.md +1 -1
- package/cli/bin.js +5 -0
- package/cli/test/smokehouse/__snapshots__/report-assert-test.js.snap +10 -10
- package/cli/test/smokehouse/config/exclusions.js +44 -0
- package/cli/test/smokehouse/frontends/smokehouse-bin.js +5 -4
- package/cli/test/smokehouse/lighthouse-runners/devtools-mcp.d.ts +14 -0
- package/cli/test/smokehouse/lighthouse-runners/devtools-mcp.js +141 -0
- package/core/audits/accessibility/autocomplete-valid.d.ts +10 -0
- package/core/audits/accessibility/autocomplete-valid.js +44 -0
- package/core/audits/accessibility/presentation-role-conflict.d.ts +10 -0
- package/core/audits/accessibility/presentation-role-conflict.js +46 -0
- package/core/audits/accessibility/svg-img-alt.d.ts +10 -0
- package/core/audits/accessibility/svg-img-alt.js +44 -0
- package/core/audits/agentic/agent-accessibility-tree.d.ts +19 -0
- package/core/audits/agentic/agent-accessibility-tree.js +115 -0
- package/core/audits/agentic/llms-txt.d.ts +20 -0
- package/core/audits/agentic/llms-txt.js +111 -0
- package/core/audits/baseline.d.ts +25 -0
- package/core/audits/baseline.js +190 -0
- package/core/audits/insights/insight-audit.d.ts +2 -2
- package/core/audits/insights/insight-audit.js +16 -6
- package/core/audits/layout-shifts.js +1 -1
- package/core/audits/server-response-time.js +3 -3
- package/core/audits/webmcp-form-coverage.d.ts +16 -0
- package/core/audits/webmcp-form-coverage.js +90 -0
- package/core/audits/webmcp-registered-tools.d.ts +21 -0
- package/core/audits/webmcp-registered-tools.js +149 -0
- package/core/audits/webmcp-schema-validity.d.ts +22 -0
- package/core/audits/webmcp-schema-validity.js +141 -0
- package/core/computed/document-urls.js +4 -2
- package/core/computed/main-resource.js +5 -3
- package/core/computed/metrics/lantern-metric.js +4 -4
- package/core/computed/metrics/lcp-breakdown.js +1 -1
- package/core/computed/metrics/time-to-first-byte.js +1 -1
- package/core/computed/navigation-insights.js +2 -1
- package/core/computed/network-analysis.js +3 -1
- package/core/config/agentic-browsing-config.d.ts +12 -0
- package/core/config/agentic-browsing-config.js +73 -0
- package/core/config/default-config.js +8 -0
- package/core/gather/driver/wait-for-condition.js +11 -1
- package/core/gather/gatherers/accessibility.js +5 -1
- package/core/gather/gatherers/agentic/llms-txt.d.ts +10 -0
- package/core/gather/gatherers/agentic/llms-txt.js +28 -0
- package/core/gather/gatherers/inputs.js +2 -0
- package/core/gather/gatherers/meta-elements.js +1 -1
- package/core/gather/gatherers/trace-elements.js +1 -1
- package/core/gather/gatherers/trace.js +3 -0
- package/core/gather/gatherers/webmcp-schema.d.ts +25 -0
- package/core/gather/gatherers/webmcp-schema.js +105 -0
- package/core/gather/gatherers/webmcp.d.ts +58 -0
- package/core/gather/gatherers/webmcp.js +159 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/lib/baseline/web-features-metadata.json +3 -0
- package/core/lib/cdt/generated/SourceMap.js +2 -2
- package/core/lib/deprecations-strings.d.ts +169 -89
- package/core/lib/deprecations-strings.js +119 -24
- package/core/lib/navigation-error.js +5 -2
- package/core/lib/network-recorder.js +2 -1
- package/core/lib/page-functions.d.ts +3 -3
- package/core/lib/page-functions.js +11 -4
- package/core/lib/tracehouse/trace-processor.d.ts +5 -4
- package/core/lib/tracehouse/trace-processor.js +85 -19
- package/core/runner.js +3 -0
- package/core/scoring.d.ts +25 -0
- package/dist/report/bundle.esm.js +31 -3
- package/dist/report/flow.js +32 -4
- package/dist/report/standalone.js +32 -4
- package/flow-report/src/summary/category.tsx +1 -1
- package/package.json +12 -11
- package/report/assets/styles.css +28 -0
- package/report/renderer/category-renderer.js +1 -1
- package/report/renderer/components.js +1 -1
- package/report/renderer/details-renderer.d.ts +5 -0
- package/report/renderer/details-renderer.js +16 -0
- package/report/renderer/report-utils.d.ts +2 -1
- package/report/renderer/report-utils.js +7 -2
- package/report/types/report-renderer.d.ts +1 -1
- package/report/types/report-result.d.ts +1 -1
- package/shared/localization/locales/ar-XB.json +72 -36
- package/shared/localization/locales/ar.json +72 -36
- package/shared/localization/locales/bg.json +72 -36
- package/shared/localization/locales/ca.json +72 -36
- package/shared/localization/locales/cs.json +72 -36
- package/shared/localization/locales/da.json +74 -38
- package/shared/localization/locales/de.json +72 -36
- package/shared/localization/locales/el.json +73 -37
- package/shared/localization/locales/en-GB.json +74 -38
- package/shared/localization/locales/en-US.json +257 -17
- package/shared/localization/locales/en-XL.json +257 -17
- package/shared/localization/locales/es-419.json +72 -36
- package/shared/localization/locales/es.json +73 -37
- package/shared/localization/locales/fi.json +72 -36
- package/shared/localization/locales/fil.json +74 -38
- package/shared/localization/locales/fr.json +162 -126
- package/shared/localization/locales/he.json +74 -38
- package/shared/localization/locales/hi.json +73 -37
- package/shared/localization/locales/hr.json +72 -36
- package/shared/localization/locales/hu.json +73 -37
- package/shared/localization/locales/id.json +74 -38
- package/shared/localization/locales/it.json +72 -36
- package/shared/localization/locales/ja.json +72 -36
- package/shared/localization/locales/ko.json +72 -36
- package/shared/localization/locales/lt.json +72 -36
- package/shared/localization/locales/lv.json +72 -36
- package/shared/localization/locales/nl.json +73 -37
- package/shared/localization/locales/no.json +72 -36
- package/shared/localization/locales/pl.json +72 -36
- package/shared/localization/locales/pt-PT.json +72 -36
- package/shared/localization/locales/pt.json +74 -38
- package/shared/localization/locales/ro.json +72 -36
- package/shared/localization/locales/ru.json +72 -36
- package/shared/localization/locales/sk.json +72 -36
- package/shared/localization/locales/sl.json +72 -36
- package/shared/localization/locales/sr-Latn.json +73 -37
- package/shared/localization/locales/sr.json +73 -37
- package/shared/localization/locales/sv.json +75 -39
- package/shared/localization/locales/ta.json +73 -37
- package/shared/localization/locales/te.json +72 -36
- package/shared/localization/locales/th.json +73 -37
- package/shared/localization/locales/tr.json +72 -36
- package/shared/localization/locales/uk.json +72 -36
- package/shared/localization/locales/vi.json +74 -38
- package/shared/localization/locales/zh-HK.json +72 -36
- package/shared/localization/locales/zh-TW.json +74 -38
- package/shared/localization/locales/zh.json +75 -39
- package/tsconfig.json +2 -0
- package/types/artifacts.d.ts +66 -30
- package/types/audit.d.ts +1 -1
- package/types/config.d.ts +2 -1
- package/types/gatherer.d.ts +1 -1
- package/types/lhr/audit-details.d.ts +10 -4
- package/types/lhr/flow-result.d.ts +1 -1
- package/types/lhr/lhr.d.ts +12 -1
- package/types/lhr/treemap.d.ts +1 -1
- package/types/protocol.d.ts +1 -1
- package/types/puppeteer.d.ts +1 -1
- package/types/user-flow.d.ts +1 -1
- package/types/utility-types.d.ts +1 -1
package/types/config.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ interface Config {
|
|
|
28
28
|
plugins?: Array<string>;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
declare
|
|
31
|
+
declare namespace Config {
|
|
32
32
|
/**
|
|
33
33
|
* The normalized and fully resolved config.
|
|
34
34
|
*/
|
|
@@ -59,6 +59,7 @@ declare module Config {
|
|
|
59
59
|
description?: string | IcuMessage;
|
|
60
60
|
manualDescription?: string | IcuMessage;
|
|
61
61
|
supportedModes?: Gatherer.GatherMode[];
|
|
62
|
+
categoryScoreDisplayMode?: Result.CategoryScoreDisplayMode;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
interface GroupJson {
|
package/types/gatherer.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import * as Lantern from '../core/lib/lantern/lantern.js';
|
|
|
22
22
|
type CrdpEvents = CrdpMappings.Events;
|
|
23
23
|
type CrdpCommands = CrdpMappings.Commands;
|
|
24
24
|
|
|
25
|
-
declare
|
|
25
|
+
declare namespace Gatherer {
|
|
26
26
|
/** The Lighthouse wrapper around a raw CDP session. */
|
|
27
27
|
interface ProtocolSession {
|
|
28
28
|
setTargetInfo(targetInfo: Crdp.Target.TargetInfo): void;
|
|
@@ -26,7 +26,7 @@ type Details =
|
|
|
26
26
|
Details.Table;
|
|
27
27
|
|
|
28
28
|
// Details namespace.
|
|
29
|
-
declare
|
|
29
|
+
declare namespace Details {
|
|
30
30
|
type NetworkNode = {
|
|
31
31
|
[id: string]: {
|
|
32
32
|
url: string;
|
|
@@ -97,7 +97,7 @@ declare module Details {
|
|
|
97
97
|
// NOTE: any `Details` type *should* be usable in `items`, but check
|
|
98
98
|
// styles/report-ui-features are good before adding.
|
|
99
99
|
type ListableDetail = Table | Checklist | NetworkTree | NodeValue | TextValue | DebugData;
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
interface ListSectionItem {
|
|
102
102
|
type: 'list-section';
|
|
103
103
|
title?: IcuMessage | string;
|
|
@@ -195,10 +195,10 @@ declare module Details {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/** String enum of possible types of values found within table items. */
|
|
198
|
-
type ItemValueType = 'bytes' | 'code' | 'link' | 'ms' | 'multi' | 'node' | 'source-location' | 'numeric' | 'text' | 'thumbnail' | 'timespanMs' | 'url';
|
|
198
|
+
type ItemValueType = 'bytes' | 'code' | 'link' | 'ms' | 'multi' | 'node' | 'source-location' | 'numeric' | 'text' | 'thumbnail' | 'timespanMs' | 'url' | 'baseline-status';
|
|
199
199
|
|
|
200
200
|
/** Possible types of values found within table items. */
|
|
201
|
-
type ItemValue = string | number | boolean | DebugData | NodeValue | SourceLocationValue | LinkValue | UrlValue | CodeValue | NumericValue | TextValue | IcuMessage | TableSubItems;
|
|
201
|
+
type ItemValue = string | number | boolean | DebugData | NodeValue | SourceLocationValue | LinkValue | UrlValue | CodeValue | NumericValue | TextValue | IcuMessage | TableSubItems | BaselineStatusValue;
|
|
202
202
|
|
|
203
203
|
interface TableColumnHeading {
|
|
204
204
|
/**
|
|
@@ -363,6 +363,12 @@ declare module Details {
|
|
|
363
363
|
type: 'text',
|
|
364
364
|
value: IcuMessage | string,
|
|
365
365
|
}
|
|
366
|
+
|
|
367
|
+
interface BaselineStatusValue {
|
|
368
|
+
type: 'baseline-status',
|
|
369
|
+
status: 'high' | 'low' | 'limited' | string,
|
|
370
|
+
displayString: IcuMessage | string,
|
|
371
|
+
}
|
|
366
372
|
}
|
|
367
373
|
|
|
368
374
|
export default Details;
|
package/types/lhr/lhr.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ interface Result {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// Result namespace
|
|
73
|
-
declare
|
|
73
|
+
declare namespace Result {
|
|
74
74
|
interface Environment {
|
|
75
75
|
/** The user agent string of the version of Chrome used. */
|
|
76
76
|
hostUserAgent: string;
|
|
@@ -97,6 +97,15 @@ declare module Result {
|
|
|
97
97
|
gather?: boolean;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
interface CategoryScoreDisplayModes {
|
|
101
|
+
/** Scores of 0-1 (map to displayed scores of 0-100). */
|
|
102
|
+
GAUGE: 'gauge';
|
|
103
|
+
/** Display as a fraction (x/y). */
|
|
104
|
+
FRACTION: 'fraction';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
type CategoryScoreDisplayMode = CategoryScoreDisplayModes[keyof CategoryScoreDisplayModes];
|
|
108
|
+
|
|
100
109
|
interface Category {
|
|
101
110
|
/** The string identifier of the category. */
|
|
102
111
|
id: string;
|
|
@@ -112,6 +121,8 @@ declare module Result {
|
|
|
112
121
|
auditRefs: AuditRef[];
|
|
113
122
|
/** An array of all the modes supported by the category. */
|
|
114
123
|
supportedModes?: Result.GatherMode[];
|
|
124
|
+
/** How to display the category score. */
|
|
125
|
+
categoryScoreDisplayMode?: CategoryScoreDisplayMode;
|
|
115
126
|
}
|
|
116
127
|
|
|
117
128
|
interface AuditRef {
|
package/types/lhr/treemap.d.ts
CHANGED
package/types/protocol.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {ProtocolMapping as CrdpMappings} from 'devtools-protocol/types/protocol-
|
|
|
9
9
|
type CrdpEvents = CrdpMappings.Events;
|
|
10
10
|
type CrdpCommands = CrdpMappings.Commands;
|
|
11
11
|
|
|
12
|
-
declare
|
|
12
|
+
declare namespace Protocol {
|
|
13
13
|
type TargetType = 'page' | 'iframe' | 'worker';
|
|
14
14
|
|
|
15
15
|
/**
|
package/types/puppeteer.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import * as puppeteerCore from 'puppeteer-core';
|
|
|
13
13
|
|
|
14
14
|
type IfNotAny<T> = [T & 0] extends [1] ? never : T;
|
|
15
15
|
|
|
16
|
-
declare
|
|
16
|
+
declare namespace Puppeteer {
|
|
17
17
|
// @ts-ignore Puppeteer is an optional dependency. `IfNotAny` will handle the `any` type if it's not installed.
|
|
18
18
|
export type Browser = puppeteerCore.Browser | IfNotAny<import('puppeteer').Browser>;
|
|
19
19
|
// @ts-ignore Puppeteer is an optional dependency. `IfNotAny` will handle the `any` type if it's not installed.
|
package/types/user-flow.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import Config from './config.js';
|
|
|
9
9
|
import {Flags} from './externs.js';
|
|
10
10
|
import {Artifacts} from './artifacts.js';
|
|
11
11
|
|
|
12
|
-
declare
|
|
12
|
+
declare namespace UserFlow {
|
|
13
13
|
export interface FlowArtifacts {
|
|
14
14
|
gatherSteps: GatherStep[];
|
|
15
15
|
name?: string;
|