lighthouse 13.4.0 → 13.4.1
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 +25 -0
- package/core/audits/agentic/agent-accessibility-tree.js +3 -2
- package/core/audits/agentic/llms-txt.d.ts +1 -0
- package/core/audits/agentic/llms-txt.js +15 -1
- package/core/audits/baseline.d.ts +788 -0
- package/core/audits/baseline.js +117 -49
- package/core/audits/seo/robots-txt.d.ts +1 -0
- package/core/audits/seo/robots-txt.js +22 -8
- package/core/audits/webmcp-form-coverage.js +3 -3
- package/core/audits/webmcp-registered-tools.js +2 -2
- package/core/audits/webmcp-schema-validity.js +4 -4
- package/core/gather/gatherers/agentic/llms-txt.js +5 -1
- package/core/gather/gatherers/seo/robots-txt.js +6 -1
- package/core/gather/gatherers/webmcp-schema.js +1 -1
- package/core/gather/gatherers/webmcp.js +3 -3
- package/core/lib/baseline/web-features-data.json +21 -16
- package/core/lib/baseline/web-features-metadata.json +1 -1
- package/core/lib/deprecations-strings.d.ts +104 -96
- package/core/lib/deprecations-strings.js +8 -0
- package/package.json +18 -15
- package/shared/localization/locales/en-US.json +12 -6
- package/shared/localization/locales/en-XL.json +12 -6
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lighthouse-verification
|
|
3
|
+
description: Instructions for how to validate changes made to Lighthouse. Must invoke when making changes to Lighthouse.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lighthouse verification
|
|
7
|
+
|
|
8
|
+
Run a subset of the unit tests like this:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
yarn mocha test/files/to/run
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Don't run "yarn unit" - it takes too long.
|
|
15
|
+
|
|
16
|
+
Run typechecking and linter:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
yarn type-check
|
|
20
|
+
yarn lint --fix
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Make sure to run some unit tests and the type-checker / linter after making changes.
|
|
24
|
+
|
|
25
|
+
Always run `yarn update:sample-json` after making any change.
|
|
@@ -13,8 +13,9 @@ const UIStrings = {
|
|
|
13
13
|
/** Title shown when one or more agent accessibility checks fail. */
|
|
14
14
|
failureTitle: 'Accessibility tree is not well-formed',
|
|
15
15
|
/** Description of a Lighthouse audit that tells the user *why* they need a well-formed accessibility tree. */
|
|
16
|
-
description: 'A well-formed
|
|
17
|
-
|
|
16
|
+
description: 'A well-formed ' +
|
|
17
|
+
'[accessibility tree](https://developer.chrome.com/docs/lighthouse/agentic-browsing/accessibility-for-agents) ' +
|
|
18
|
+
'helps AI agents to navigate and interact with the page.',
|
|
18
19
|
/** Label of a table column that identifies the accessibility rule that failed. */
|
|
19
20
|
columnRule: 'Failing Rule',
|
|
20
21
|
/** Label of a table column that identifies the HTML element that failed the rule. */
|
|
@@ -19,12 +19,18 @@ const UIStrings = {
|
|
|
19
19
|
description: 'If your llms.txt file does not follow recommendations, ' +
|
|
20
20
|
'large language models may not be able to ' +
|
|
21
21
|
'understand how you want your website to be crawled or used for training. The ' +
|
|
22
|
-
'[llms.txt](https://llmstxt.org/) file should be a Markdown file containing at least one H1 header.'
|
|
22
|
+
'[llms.txt](https://llmstxt.org/) file should be a Markdown file containing at least one H1 header. ' +
|
|
23
|
+
'[Learn more about the llms.txt audit](https://developer.chrome.com/docs/lighthouse/agentic-browsing/llms-txt).',
|
|
23
24
|
/**
|
|
24
25
|
* @description Label for the audit identifying that the request failed with a specific HTTP status code.
|
|
25
26
|
* @example {500} statusCode
|
|
26
27
|
* */
|
|
27
28
|
displayValueHttpBadCode: 'Failed with HTTP status {statusCode}',
|
|
29
|
+
/**
|
|
30
|
+
* @description Explanatory message stating that there was a failure in an audit caused by Lighthouse not being able to download the llms.txt file for the site. Note: "llms.txt" is a canonical filename and should not be translated.
|
|
31
|
+
* @example {Timed out fetching resource} error
|
|
32
|
+
* */
|
|
33
|
+
explanationWithError: 'Fetch of llms.txt failed: {error}',
|
|
28
34
|
/** Explanatory message stating that there was a failure in an audit caused by Lighthouse not being able to download the llms.txt file for the site. Note: "llms.txt" is a canonical filename and should not be translated. */
|
|
29
35
|
explanation: 'Fetch of llms.txt failed',
|
|
30
36
|
/** Message indicating that the file is missing a required H1 header. */
|
|
@@ -59,8 +65,16 @@ class LlmsTxt extends Audit {
|
|
|
59
65
|
const {
|
|
60
66
|
status,
|
|
61
67
|
content,
|
|
68
|
+
errorMessage,
|
|
62
69
|
} = artifacts.LlmsTxt;
|
|
63
70
|
|
|
71
|
+
if (errorMessage) {
|
|
72
|
+
return {
|
|
73
|
+
score: 0,
|
|
74
|
+
explanation: str_(UIStrings.explanationWithError, {error: errorMessage}),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
64
78
|
if (!status) {
|
|
65
79
|
return {
|
|
66
80
|
score: 0,
|