lighthouse 13.3.0 → 13.4.0-dev.20260625
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/.agents/skills/lighthouse-verification/SKILL.md +23 -0
- package/cli/cli-flags.d.ts +8 -9
- package/cli/test/smokehouse/config/exclusions.js +2 -0
- package/cli/test/smokehouse/version-check.d.ts +1 -1
- package/core/audits/accessibility/accesskeys.js +1 -1
- package/core/audits/accessibility/aria-allowed-attr.js +1 -1
- package/core/audits/accessibility/aria-allowed-role.js +1 -1
- package/core/audits/accessibility/aria-command-name.js +1 -1
- package/core/audits/accessibility/aria-conditional-attr.js +1 -1
- package/core/audits/accessibility/aria-deprecated-role.js +1 -1
- package/core/audits/accessibility/aria-dialog-name.js +1 -1
- package/core/audits/accessibility/aria-hidden-body.js +1 -1
- package/core/audits/accessibility/aria-hidden-focus.js +1 -1
- package/core/audits/accessibility/aria-input-field-name.js +1 -1
- package/core/audits/accessibility/aria-meter-name.js +1 -1
- package/core/audits/accessibility/aria-progressbar-name.js +1 -1
- package/core/audits/accessibility/aria-prohibited-attr.js +1 -1
- package/core/audits/accessibility/aria-required-attr.js +1 -1
- package/core/audits/accessibility/aria-required-children.js +1 -1
- package/core/audits/accessibility/aria-required-parent.js +1 -1
- package/core/audits/accessibility/aria-roles.js +1 -1
- package/core/audits/accessibility/aria-text.js +1 -1
- package/core/audits/accessibility/aria-toggle-field-name.js +1 -1
- package/core/audits/accessibility/aria-tooltip-name.js +1 -1
- package/core/audits/accessibility/aria-treeitem-name.js +1 -1
- package/core/audits/accessibility/aria-valid-attr-value.js +1 -1
- package/core/audits/accessibility/aria-valid-attr.js +1 -1
- package/core/audits/accessibility/autocomplete-valid.js +1 -1
- package/core/audits/accessibility/button-name.js +1 -1
- package/core/audits/accessibility/bypass.js +1 -1
- package/core/audits/accessibility/color-contrast.js +1 -1
- package/core/audits/accessibility/definition-list.js +1 -1
- package/core/audits/accessibility/dlitem.js +1 -1
- package/core/audits/accessibility/document-title.js +1 -1
- package/core/audits/accessibility/duplicate-id-aria.js +1 -1
- package/core/audits/accessibility/empty-heading.js +1 -1
- package/core/audits/accessibility/form-field-multiple-labels.js +1 -1
- package/core/audits/accessibility/frame-title.js +1 -1
- package/core/audits/accessibility/heading-order.js +1 -1
- package/core/audits/accessibility/html-has-lang.js +1 -1
- package/core/audits/accessibility/html-lang-valid.js +1 -1
- package/core/audits/accessibility/html-xml-lang-mismatch.js +1 -1
- package/core/audits/accessibility/identical-links-same-purpose.js +1 -1
- package/core/audits/accessibility/image-alt.js +1 -1
- package/core/audits/accessibility/image-redundant-alt.js +1 -1
- package/core/audits/accessibility/input-button-name.js +1 -1
- package/core/audits/accessibility/input-image-alt.js +1 -1
- package/core/audits/accessibility/label-content-name-mismatch.js +1 -1
- package/core/audits/accessibility/label.js +1 -1
- package/core/audits/accessibility/landmark-one-main.js +1 -1
- package/core/audits/accessibility/link-in-text-block.js +1 -1
- package/core/audits/accessibility/link-name.js +1 -1
- package/core/audits/accessibility/list.js +1 -1
- package/core/audits/accessibility/listitem.js +1 -1
- package/core/audits/accessibility/meta-refresh.js +1 -1
- package/core/audits/accessibility/meta-viewport.js +1 -1
- package/core/audits/accessibility/object-alt.js +1 -1
- package/core/audits/accessibility/presentation-role-conflict.js +1 -1
- package/core/audits/accessibility/select-name.js +1 -1
- package/core/audits/accessibility/skip-link.js +1 -1
- package/core/audits/accessibility/svg-img-alt.js +1 -1
- package/core/audits/accessibility/tabindex.js +1 -1
- package/core/audits/accessibility/table-duplicate-name.js +1 -1
- package/core/audits/accessibility/table-fake-caption.js +1 -1
- package/core/audits/accessibility/target-size.js +1 -1
- package/core/audits/accessibility/td-has-header.js +1 -1
- package/core/audits/accessibility/td-headers-attr.js +1 -1
- package/core/audits/accessibility/th-has-data-cells.js +1 -1
- package/core/audits/accessibility/valid-lang.js +1 -1
- package/core/audits/accessibility/video-caption.js +1 -1
- package/core/audits/agentic/llms-txt.d.ts +1 -0
- package/core/audits/agentic/llms-txt.js +14 -1
- package/core/audits/baseline.js +10 -12
- package/core/audits/dobetterweb/geolocation-on-start.js +2 -1
- package/core/audits/network-requests.js +2 -0
- package/core/audits/seo/canonical.js +19 -7
- package/core/audits/seo/robots-txt.d.ts +1 -0
- package/core/audits/seo/robots-txt.js +22 -8
- package/core/computed/js-bundles.d.ts +1 -1
- package/core/computed/load-simulator.d.ts +1 -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-metric.d.ts +6 -6
- 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/max-potential-fid.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/total-blocking-time.d.ts +1 -1
- package/core/computed/module-duplication.d.ts +1 -1
- package/core/computed/page-dependency-graph.d.ts +1 -1
- package/core/computed/unused-css.d.ts +1 -1
- package/core/config/agentic-browsing-config.d.ts +1 -0
- package/core/config/agentic-browsing-config.js +1 -0
- package/core/config/config-helpers.d.ts +1 -0
- package/core/config/config-helpers.js +1 -1
- package/core/config/config-plugin.d.ts +1 -0
- package/core/config/config-plugin.js +1 -0
- package/core/config/config.d.ts +1 -0
- package/core/config/config.js +1 -0
- package/core/config/constants.d.ts +1 -0
- package/core/config/constants.js +1 -0
- package/core/config/experimental-config.d.ts +1 -9
- package/core/config/experimental-config.js +2 -0
- package/core/config/filters.d.ts +1 -0
- package/core/config/filters.js +1 -0
- package/core/config/full-config.d.ts +1 -5
- package/core/config/full-config.js +2 -0
- package/core/config/lr-desktop-config.d.ts +1 -0
- package/core/config/lr-desktop-config.js +1 -0
- package/core/config/lr-mobile-config.d.ts +1 -5
- package/core/config/lr-mobile-config.js +2 -0
- package/core/config/perf-config.d.ts +1 -5
- package/core/config/perf-config.js +2 -0
- package/core/config/validation.d.ts +1 -0
- package/core/config/validation.js +1 -0
- package/core/gather/driver/execution-context.d.ts +23 -0
- package/core/gather/driver/execution-context.js +86 -1
- package/core/gather/driver/storage.js +13 -0
- package/core/gather/driver.d.ts +1 -1
- package/core/gather/gatherers/accessibility.js +1 -0
- package/core/gather/gatherers/agentic/llms-txt.js +5 -1
- package/core/gather/gatherers/seo/robots-txt.js +6 -1
- package/core/gather/gatherers/trace-elements.d.ts +4 -1
- package/core/gather/gatherers/trace-elements.js +24 -28
- package/core/gather/gatherers/webmcp-schema.js +9 -16
- package/core/gather/gatherers/webmcp.d.ts +5 -0
- package/core/gather/gatherers/webmcp.js +34 -27
- package/core/lib/baseline/web-features-data.json +1179 -0
- package/core/lib/baseline/web-features-metadata.json +1 -1
- package/core/lib/deprecations-strings.d.ts +113 -89
- package/core/lib/deprecations-strings.js +24 -0
- package/core/lib/script-helpers.js +13 -1
- package/core/scoring.d.ts +58 -58
- package/dist/report/bundle.esm.js +4 -7
- package/dist/report/flow.js +6 -9
- package/dist/report/standalone.js +20 -12
- package/flow-report/types/flow-report.d.ts +2 -2
- package/package.json +28 -28
- package/report/assets/styles.css +1 -4
- package/report/renderer/components.js +1 -1
- package/report/renderer/details-renderer.d.ts +6 -1
- package/report/renderer/details-renderer.js +11 -3
- package/report/renderer/explodey-gauge.js +9 -7
- package/report/renderer/i18n-formatter.d.ts +1 -1
- package/report/renderer/logger.js +18 -4
- package/report/renderer/text-encoding.js +1 -1
- package/report/types/html-renderer.d.ts +2 -2
- package/shared/localization/locales/ar-XB.json +290 -65
- package/shared/localization/locales/ar.json +290 -65
- package/shared/localization/locales/bg.json +290 -65
- package/shared/localization/locales/ca.json +295 -70
- package/shared/localization/locales/cs.json +290 -65
- package/shared/localization/locales/da.json +294 -69
- package/shared/localization/locales/de.json +295 -70
- package/shared/localization/locales/el.json +290 -65
- package/shared/localization/locales/en-GB.json +290 -65
- package/shared/localization/locales/en-US.json +86 -68
- package/shared/localization/locales/en-XA.json +253 -64
- package/shared/localization/locales/en-XL.json +86 -68
- package/shared/localization/locales/es-419.json +290 -65
- package/shared/localization/locales/es.json +298 -73
- package/shared/localization/locales/fi.json +290 -65
- package/shared/localization/locales/fil.json +290 -65
- package/shared/localization/locales/fr.json +294 -69
- package/shared/localization/locales/he.json +293 -68
- package/shared/localization/locales/hi.json +291 -66
- package/shared/localization/locales/hr.json +290 -65
- package/shared/localization/locales/hu.json +290 -65
- package/shared/localization/locales/id.json +290 -65
- package/shared/localization/locales/it.json +294 -69
- package/shared/localization/locales/ja.json +290 -65
- package/shared/localization/locales/ko.json +290 -65
- package/shared/localization/locales/lt.json +290 -65
- package/shared/localization/locales/lv.json +290 -65
- package/shared/localization/locales/nl.json +290 -65
- package/shared/localization/locales/no.json +290 -65
- package/shared/localization/locales/pl.json +290 -65
- package/shared/localization/locales/pt-PT.json +291 -66
- package/shared/localization/locales/pt.json +290 -65
- package/shared/localization/locales/ro.json +290 -65
- package/shared/localization/locales/ru.json +301 -76
- package/shared/localization/locales/sk.json +291 -66
- package/shared/localization/locales/sl.json +290 -65
- package/shared/localization/locales/sr-Latn.json +290 -65
- package/shared/localization/locales/sr.json +290 -65
- package/shared/localization/locales/sv.json +297 -72
- package/shared/localization/locales/ta.json +291 -66
- package/shared/localization/locales/te.json +293 -68
- package/shared/localization/locales/th.json +291 -66
- package/shared/localization/locales/tr.json +290 -65
- package/shared/localization/locales/uk.json +290 -65
- package/shared/localization/locales/vi.json +291 -66
- package/shared/localization/locales/zh-HK.json +292 -67
- package/shared/localization/locales/zh-TW.json +291 -66
- package/shared/localization/locales/zh.json +291 -66
- package/shared/types/shared.d.ts +1 -1
- package/tsconfig-base.json +2 -1
- package/tsconfig.json +2 -0
- package/types/artifacts.d.ts +1 -1
- package/types/internal/rxjs.d.ts +1 -1
- package/types/internal/smokehouse.d.ts +1 -1
- package/types.d.ts +2 -0
- package/types.js +11 -0
|
@@ -48,6 +48,11 @@ declare class WebMCP extends BaseGatherer {
|
|
|
48
48
|
* @param {LH.Gatherer.Context} passContext
|
|
49
49
|
*/
|
|
50
50
|
stopInstrumentation(passContext: LH.Gatherer.Context): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* @param {LH.Gatherer.Context} context
|
|
53
|
+
* @param {WebMCPTool} tool
|
|
54
|
+
*/
|
|
55
|
+
_tryResolveToolNodeDetails(context: LH.Gatherer.Context, tool: WebMCPTool): Promise<void>;
|
|
51
56
|
/**
|
|
52
57
|
* @param {LH.Gatherer.Context} context
|
|
53
58
|
* @return {Promise<LH.Artifacts['WebMCP']>}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
import BaseGatherer from '../base-gatherer.js';
|
|
12
12
|
import {resolveNodeIdToObjectId} from '../driver/dom.js';
|
|
13
13
|
import {pageFunctions} from '../../lib/page-functions.js';
|
|
14
|
-
import {ExecutionContext} from '../driver/execution-context.js';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* @typedef {Object} WebMCPTool
|
|
@@ -99,6 +98,37 @@ class WebMCP extends BaseGatherer {
|
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
|
|
101
|
+
/**
|
|
102
|
+
* @param {LH.Gatherer.Context} context
|
|
103
|
+
* @param {WebMCPTool} tool
|
|
104
|
+
*/
|
|
105
|
+
async _tryResolveToolNodeDetails(context, tool) {
|
|
106
|
+
if (!tool.backendNodeId) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const session = context.driver.defaultSession;
|
|
111
|
+
|
|
112
|
+
try {
|
|
113
|
+
const objectId = await resolveNodeIdToObjectId(session, tool.backendNodeId);
|
|
114
|
+
if (!objectId) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const nodeDetails = await context.driver.executionContext.evaluateOnObject(
|
|
119
|
+
pageFunctions.getNodeDetails, {
|
|
120
|
+
objectId,
|
|
121
|
+
args: [],
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
if (nodeDetails) {
|
|
125
|
+
tool.nodeDetails = nodeDetails;
|
|
126
|
+
}
|
|
127
|
+
} catch (err) {
|
|
128
|
+
// Ignore error
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
102
132
|
/**
|
|
103
133
|
* @param {LH.Gatherer.Context} context
|
|
104
134
|
* @return {Promise<LH.Artifacts['WebMCP']>}
|
|
@@ -113,9 +143,8 @@ class WebMCP extends BaseGatherer {
|
|
|
113
143
|
return {isSupported: false, tools: []};
|
|
114
144
|
}
|
|
115
145
|
|
|
116
|
-
const session = context.driver.defaultSession;
|
|
117
|
-
|
|
118
146
|
// Remove duplicates based on name, keeping the latest occurrence.
|
|
147
|
+
/** @type {Map<string, WebMCPTool>} */
|
|
119
148
|
const toolMap = new Map();
|
|
120
149
|
for (const tool of this._tools) {
|
|
121
150
|
toolMap.set(tool.name, tool);
|
|
@@ -123,32 +152,10 @@ class WebMCP extends BaseGatherer {
|
|
|
123
152
|
|
|
124
153
|
const resolvedTools = [];
|
|
125
154
|
for (const tool of toolMap.values()) {
|
|
126
|
-
|
|
127
|
-
try {
|
|
128
|
-
const objectId = await resolveNodeIdToObjectId(session, tool.backendNodeId);
|
|
129
|
-
if (objectId) {
|
|
130
|
-
const deps = ExecutionContext.serializeDeps([
|
|
131
|
-
pageFunctions.getNodeDetails,
|
|
132
|
-
]);
|
|
133
|
-
const response = await session.sendCommand('Runtime.callFunctionOn', {
|
|
134
|
-
objectId,
|
|
135
|
-
functionDeclaration: `function () {
|
|
136
|
-
${deps}
|
|
137
|
-
return getNodeDetails(this);
|
|
138
|
-
}`,
|
|
139
|
-
returnByValue: true,
|
|
140
|
-
awaitPromise: true,
|
|
141
|
-
});
|
|
142
|
-
if (response && response.result && response.result.value) {
|
|
143
|
-
tool.nodeDetails = response.result.value;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
} catch (err) {
|
|
147
|
-
// Ignore error
|
|
148
|
-
}
|
|
149
|
-
}
|
|
155
|
+
await this._tryResolveToolNodeDetails(context, tool);
|
|
150
156
|
resolvedTools.push(tool);
|
|
151
157
|
}
|
|
158
|
+
|
|
152
159
|
return {
|
|
153
160
|
isSupported: true,
|
|
154
161
|
tools: resolvedTools,
|