lighthouse 12.6.1 → 12.7.0-dev.20250628
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/core-tests.js +2 -0
- package/cli/test/smokehouse/frontends/lib.js +0 -2
- package/cli/test/smokehouse/frontends/smokehouse-bin.js +1 -3
- package/cli/test/smokehouse/lighthouse-runners/cli.js +1 -1
- package/cli/test/smokehouse/smokehouse.js +0 -2
- package/core/audits/audit.d.ts +7 -0
- package/core/audits/audit.js +17 -2
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +6 -8
- package/core/audits/byte-efficiency/legacy-javascript.js +0 -1
- package/core/audits/byte-efficiency/render-blocking-resources.js +1 -1
- package/core/audits/deprecations.js +0 -2
- package/core/audits/insights/cache-insight.js +2 -1
- package/core/audits/insights/cls-culprits-insight.js +6 -7
- package/core/audits/insights/{interaction-to-next-paint-insight.d.ts → inp-breakdown-insight.d.ts} +3 -3
- package/core/audits/insights/{interaction-to-next-paint-insight.js → inp-breakdown-insight.js} +10 -10
- package/core/audits/insights/insight-audit.d.ts +7 -4
- package/core/audits/insights/insight-audit.js +48 -7
- package/core/audits/insights/lcp-breakdown-insight.d.ts +16 -0
- package/core/audits/insights/{lcp-phases-insight.js → lcp-breakdown-insight.js} +19 -19
- package/core/audits/insights/modern-http-insight.js +0 -2
- package/core/audits/insights/network-dependency-tree-insight.js +85 -8
- package/core/audits/insights/render-blocking-insight.js +1 -1
- package/core/audits/layout-shifts.js +5 -4
- package/core/audits/seo/crawlable-anchors.js +27 -0
- package/core/audits/seo/link-text.js +130 -83
- package/core/audits/third-party-cookies.js +0 -2
- package/core/audits/valid-source-maps.js +0 -2
- package/core/computed/js-bundles.js +0 -1
- package/core/computed/metrics/cumulative-layout-shift.js +1 -1
- package/core/computed/metrics/lantern-metric.js +4 -3
- package/core/computed/metrics/timing-summary.js +4 -1
- package/core/computed/page-dependency-graph.js +3 -3
- package/core/computed/trace-engine-result.js +1 -2
- package/core/config/config.js +1 -1
- package/core/config/default-config.js +4 -4
- package/core/config/experimental-config.js +2 -2
- package/core/config/filters.js +7 -0
- package/core/config/validation.js +4 -0
- package/core/gather/base-artifacts.js +3 -0
- package/core/gather/driver/environment.d.ts +6 -0
- package/core/gather/driver/environment.js +17 -0
- package/core/gather/driver/execution-context.d.ts +3 -1
- package/core/gather/driver/execution-context.js +3 -1
- package/core/gather/driver/navigation.js +1 -3
- package/core/gather/driver/wait-for-condition.js +0 -1
- package/core/gather/fetcher.js +0 -2
- package/core/gather/gatherers/accessibility.js +1 -1
- package/core/gather/gatherers/anchor-elements.js +61 -2
- package/core/gather/gatherers/cache-contents.js +0 -2
- package/core/gather/gatherers/css-usage.js +3 -1
- package/core/gather/gatherers/dobetterweb/doctype.js +0 -2
- package/core/gather/gatherers/dobetterweb/domstats.js +1 -1
- package/core/gather/gatherers/full-page-screenshot.js +1 -1
- package/core/gather/gatherers/image-elements.js +1 -1
- package/core/gather/gatherers/inspector-issues.js +1 -1
- package/core/gather/gatherers/link-elements.js +1 -1
- package/core/gather/gatherers/stacks.js +0 -1
- package/core/gather/gatherers/stylesheets.js +3 -1
- package/core/gather/gatherers/trace-elements.d.ts +3 -4
- package/core/gather/gatherers/trace-elements.js +13 -43
- package/core/gather/gatherers/viewport-dimensions.js +0 -2
- package/core/index.cjs +0 -1
- package/core/index.d.cts +5 -0
- package/core/lib/asset-saver.d.ts +1 -1
- package/core/lib/asset-saver.js +20 -8
- package/core/lib/bf-cache-strings.js +4 -1
- package/core/lib/deprecations-strings.d.ts +51 -47
- package/core/lib/deprecations-strings.js +14 -8
- package/core/lib/i18n/i18n.js +0 -2
- package/core/lib/lantern-trace-saver.js +1 -1
- package/core/lib/lh-error.js +0 -1
- package/core/lib/manifest-parser.js +0 -2
- package/core/lib/minify-devtoolslog.js +0 -2
- package/core/lib/sentry.d.ts +1 -1
- package/core/lib/sentry.js +2 -2
- package/core/runner.js +11 -8
- package/core/scoring.d.ts +186 -15
- package/core/scripts/manual-chrome-launcher.js +0 -1
- package/dist/report/bundle.esm.js +14 -12
- package/dist/report/flow.js +18 -16
- package/dist/report/standalone.js +15 -13
- package/eslint.config.mjs +242 -0
- package/flow-report/src/common.tsx +1 -0
- package/flow-report/src/i18n/i18n.tsx +1 -0
- package/flow-report/src/util.ts +2 -0
- package/package.json +23 -19
- package/readme.md +3 -2
- package/report/assets/styles.css +11 -9
- package/report/assets/templates.html +1 -1
- package/report/generator/file-namer.d.ts +5 -0
- package/report/generator/file-namer.js +1 -1
- package/report/generator/flow-report-assets.js +1 -1
- package/report/generator/report-assets.js +1 -1
- package/report/generator/report-generator.js +3 -3
- package/report/renderer/api.js +1 -0
- package/report/renderer/components.js +2 -2
- package/report/renderer/details-renderer.d.ts +5 -0
- package/report/renderer/details-renderer.js +35 -3
- package/report/renderer/dom.d.ts +2 -0
- package/report/renderer/dom.js +6 -0
- package/report/renderer/i18n-formatter.js +2 -1
- package/report/renderer/performance-category-renderer.js +2 -2
- package/report/renderer/report-renderer.js +1 -0
- package/report/renderer/report-ui-features.d.ts +1 -0
- package/report/renderer/report-ui-features.js +16 -0
- package/report/renderer/report-utils.js +3 -2
- package/report/renderer/text-encoding.js +0 -2
- package/report/renderer/topbar-features.js +1 -1
- package/report/types/report-renderer.d.ts +5 -0
- package/shared/localization/locales/ar-XB.json +57 -69
- package/shared/localization/locales/ar.json +57 -69
- package/shared/localization/locales/bg.json +57 -69
- package/shared/localization/locales/ca.json +57 -69
- package/shared/localization/locales/cs.json +57 -69
- package/shared/localization/locales/da.json +57 -69
- package/shared/localization/locales/de.json +57 -69
- package/shared/localization/locales/el.json +57 -69
- package/shared/localization/locales/en-GB.json +57 -69
- package/shared/localization/locales/en-US.json +73 -61
- package/shared/localization/locales/en-XL.json +73 -61
- package/shared/localization/locales/es-419.json +57 -69
- package/shared/localization/locales/es.json +56 -68
- package/shared/localization/locales/fi.json +57 -69
- package/shared/localization/locales/fil.json +57 -69
- package/shared/localization/locales/fr.json +57 -69
- package/shared/localization/locales/he.json +57 -69
- package/shared/localization/locales/hi.json +57 -69
- package/shared/localization/locales/hr.json +57 -69
- package/shared/localization/locales/hu.json +56 -68
- package/shared/localization/locales/id.json +57 -69
- package/shared/localization/locales/it.json +56 -68
- package/shared/localization/locales/ja.json +57 -69
- package/shared/localization/locales/ko.json +57 -69
- package/shared/localization/locales/lt.json +57 -69
- package/shared/localization/locales/lv.json +57 -69
- package/shared/localization/locales/nl.json +57 -69
- package/shared/localization/locales/no.json +57 -69
- package/shared/localization/locales/pl.json +56 -68
- package/shared/localization/locales/pt-PT.json +57 -69
- package/shared/localization/locales/pt.json +57 -69
- package/shared/localization/locales/ro.json +57 -69
- package/shared/localization/locales/ru.json +58 -70
- package/shared/localization/locales/sk.json +57 -69
- package/shared/localization/locales/sl.json +56 -68
- package/shared/localization/locales/sr-Latn.json +57 -69
- package/shared/localization/locales/sr.json +57 -69
- package/shared/localization/locales/sv.json +57 -69
- package/shared/localization/locales/ta.json +57 -69
- package/shared/localization/locales/te.json +57 -69
- package/shared/localization/locales/th.json +56 -68
- package/shared/localization/locales/tr.json +57 -69
- package/shared/localization/locales/uk.json +57 -69
- package/shared/localization/locales/vi.json +57 -69
- package/shared/localization/locales/zh-HK.json +57 -69
- package/shared/localization/locales/zh-TW.json +56 -68
- package/shared/localization/locales/zh.json +57 -69
- package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +1 -1
- package/types/artifacts.d.ts +8 -1
- package/types/internal/test.d.ts +1 -1
- package/types/lhr/audit-details.d.ts +13 -3
- package/types/lhr/lhr.d.ts +8 -1
- package/core/audits/insights/lcp-phases-insight.d.ts +0 -16
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import {fileURLToPath} from 'node:url';
|
|
3
|
+
|
|
4
|
+
import localRules from 'eslint-plugin-local-rules';
|
|
5
|
+
import _import from 'eslint-plugin-import';
|
|
6
|
+
import {fixupPluginRules} from '@eslint/compat';
|
|
7
|
+
import globals from 'globals';
|
|
8
|
+
import tsParser from '@typescript-eslint/parser';
|
|
9
|
+
import js from '@eslint/js';
|
|
10
|
+
import {FlatCompat} from '@eslint/eslintrc';
|
|
11
|
+
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = path.dirname(__filename);
|
|
14
|
+
const compat = new FlatCompat({
|
|
15
|
+
baseDirectory: __dirname,
|
|
16
|
+
recommendedConfig: js.configs.recommended,
|
|
17
|
+
allConfig: js.configs.all,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// See https://eslint.org/docs/latest/use/configure/configuration-files
|
|
21
|
+
export default [{
|
|
22
|
+
files: [
|
|
23
|
+
'**/*.cjs',
|
|
24
|
+
'**/*.js',
|
|
25
|
+
'**/*.mjs',
|
|
26
|
+
'**/*.ts',
|
|
27
|
+
'**/*.tsx',
|
|
28
|
+
],
|
|
29
|
+
}, {
|
|
30
|
+
// Global ignores.
|
|
31
|
+
ignores: [
|
|
32
|
+
'.cz-config.js',
|
|
33
|
+
'**/.tmp',
|
|
34
|
+
'**/*.d.cts', // ignore d.ts files until we can properly lint them
|
|
35
|
+
'**/*.d.ts',
|
|
36
|
+
'**/dist',
|
|
37
|
+
'**/fixtures/**',
|
|
38
|
+
'**/node_modules/**',
|
|
39
|
+
'**/source-maps/**',
|
|
40
|
+
'**/third_party/**',
|
|
41
|
+
'**/third-party/**',
|
|
42
|
+
'build/test/page-functions-test-case*out*.js',
|
|
43
|
+
'core/scripts/legacy-javascript/variants/**',
|
|
44
|
+
'coverage/**',
|
|
45
|
+
],
|
|
46
|
+
}, ...compat.extends('eslint:recommended', 'google'), {
|
|
47
|
+
plugins: {
|
|
48
|
+
'local-rules': localRules,
|
|
49
|
+
'import': fixupPluginRules(_import),
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
languageOptions: {
|
|
53
|
+
globals: {
|
|
54
|
+
...globals.node,
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
parser: tsParser,
|
|
58
|
+
ecmaVersion: 2020,
|
|
59
|
+
sourceType: 'module',
|
|
60
|
+
|
|
61
|
+
parserOptions: {
|
|
62
|
+
ecmaFeatures: {
|
|
63
|
+
globalReturn: true,
|
|
64
|
+
jsx: false,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
rules: {
|
|
70
|
+
'import/order': [2, {
|
|
71
|
+
'groups': ['builtin', 'external', ['sibling', 'parent'], 'index', 'object', 'type'],
|
|
72
|
+
'newlines-between': 'always',
|
|
73
|
+
}],
|
|
74
|
+
|
|
75
|
+
'import/group-exports': 2,
|
|
76
|
+
'import/exports-last': 2,
|
|
77
|
+
'eqeqeq': 2,
|
|
78
|
+
'no-console': 2,
|
|
79
|
+
|
|
80
|
+
'indent': [2, 2, {
|
|
81
|
+
SwitchCase: 1,
|
|
82
|
+
VariableDeclarator: 2,
|
|
83
|
+
|
|
84
|
+
CallExpression: {
|
|
85
|
+
arguments: 'off',
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
MemberExpression: 'off',
|
|
89
|
+
|
|
90
|
+
FunctionExpression: {
|
|
91
|
+
body: 1,
|
|
92
|
+
parameters: 2,
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
ignoredNodes: [
|
|
96
|
+
'ConditionalExpression > :matches(.consequent, .alternate)',
|
|
97
|
+
'VariableDeclarator > ArrowFunctionExpression > :expression.body',
|
|
98
|
+
'CallExpression > ArrowFunctionExpression > :expression.body',
|
|
99
|
+
],
|
|
100
|
+
}],
|
|
101
|
+
|
|
102
|
+
'no-floating-decimal': 2,
|
|
103
|
+
|
|
104
|
+
'max-len': [2, 100, {
|
|
105
|
+
ignorePattern: 'readJson\\(|^import ',
|
|
106
|
+
ignoreComments: true,
|
|
107
|
+
ignoreUrls: true,
|
|
108
|
+
tabWidth: 2,
|
|
109
|
+
}],
|
|
110
|
+
|
|
111
|
+
'no-empty': [2, {
|
|
112
|
+
allowEmptyCatch: true,
|
|
113
|
+
}],
|
|
114
|
+
|
|
115
|
+
'no-implicit-coercion': [2, {
|
|
116
|
+
boolean: false,
|
|
117
|
+
number: true,
|
|
118
|
+
string: true,
|
|
119
|
+
}],
|
|
120
|
+
|
|
121
|
+
'no-unused-expressions': [2, {
|
|
122
|
+
allowShortCircuit: true,
|
|
123
|
+
allowTernary: false,
|
|
124
|
+
}],
|
|
125
|
+
|
|
126
|
+
'no-unused-vars': [2, {
|
|
127
|
+
vars: 'all',
|
|
128
|
+
args: 'after-used',
|
|
129
|
+
caughtErrors: 'none', // TODO: remove for new "all" default.
|
|
130
|
+
argsIgnorePattern: '(^reject$|^_+$)',
|
|
131
|
+
varsIgnorePattern: '(^_$|^LH$|^Lantern$|^TraceEngine$|^Protocol$)',
|
|
132
|
+
}],
|
|
133
|
+
|
|
134
|
+
'no-cond-assign': 2,
|
|
135
|
+
'space-infix-ops': 2,
|
|
136
|
+
'strict': [2, 'global'],
|
|
137
|
+
'prefer-const': 2,
|
|
138
|
+
'curly': [2, 'multi-line'],
|
|
139
|
+
|
|
140
|
+
'comma-dangle': [2, {
|
|
141
|
+
arrays: 'always-multiline',
|
|
142
|
+
objects: 'always-multiline',
|
|
143
|
+
imports: 'always-multiline',
|
|
144
|
+
exports: 'always-multiline',
|
|
145
|
+
functions: 'never',
|
|
146
|
+
}],
|
|
147
|
+
|
|
148
|
+
'operator-linebreak': ['error', 'after', {
|
|
149
|
+
overrides: {
|
|
150
|
+
'?': 'ignore',
|
|
151
|
+
':': 'ignore',
|
|
152
|
+
},
|
|
153
|
+
}],
|
|
154
|
+
|
|
155
|
+
'local-rules/require-file-extension': 2,
|
|
156
|
+
'require-jsdoc': 0,
|
|
157
|
+
'valid-jsdoc': 0,
|
|
158
|
+
'arrow-parens': 0,
|
|
159
|
+
},
|
|
160
|
+
}, {
|
|
161
|
+
files: ['cli/test/smokehouse/test-definitions/**'],
|
|
162
|
+
|
|
163
|
+
rules: {
|
|
164
|
+
'max-len': 0,
|
|
165
|
+
},
|
|
166
|
+
}, {
|
|
167
|
+
files: [
|
|
168
|
+
'**/build/**',
|
|
169
|
+
'**/scripts/**',
|
|
170
|
+
'**/test/**',
|
|
171
|
+
],
|
|
172
|
+
|
|
173
|
+
rules: {
|
|
174
|
+
'no-console': 0,
|
|
175
|
+
},
|
|
176
|
+
}, {
|
|
177
|
+
files: [
|
|
178
|
+
'docs/recipes/auth/**',
|
|
179
|
+
],
|
|
180
|
+
|
|
181
|
+
rules: {
|
|
182
|
+
'new-cap': 0,
|
|
183
|
+
'no-console': 0,
|
|
184
|
+
'no-unused-vars': 0,
|
|
185
|
+
},
|
|
186
|
+
}, {
|
|
187
|
+
files: [
|
|
188
|
+
'**/test/**',
|
|
189
|
+
'docs/recipes/**',
|
|
190
|
+
],
|
|
191
|
+
|
|
192
|
+
languageOptions: {
|
|
193
|
+
globals: {
|
|
194
|
+
...globals.jest,
|
|
195
|
+
...globals.mocha,
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
}, {
|
|
199
|
+
files: [
|
|
200
|
+
'clients/**',
|
|
201
|
+
'core/gather/gatherers/**',
|
|
202
|
+
'docs/recipes/auth/**',
|
|
203
|
+
'flow-report/**',
|
|
204
|
+
'report/**',
|
|
205
|
+
'treemap/**',
|
|
206
|
+
'viewer/**',
|
|
207
|
+
],
|
|
208
|
+
ignores: [
|
|
209
|
+
'report/generator/**',
|
|
210
|
+
'report/test/generator/**',
|
|
211
|
+
],
|
|
212
|
+
|
|
213
|
+
languageOptions: {
|
|
214
|
+
globals: {
|
|
215
|
+
...globals.browser,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
}, {
|
|
219
|
+
files: [
|
|
220
|
+
'clients/**',
|
|
221
|
+
],
|
|
222
|
+
|
|
223
|
+
languageOptions: {
|
|
224
|
+
globals: {
|
|
225
|
+
chrome: true,
|
|
226
|
+
__lighthouse: true,
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
}, {
|
|
230
|
+
files: ['flow-report/**'],
|
|
231
|
+
|
|
232
|
+
languageOptions: {
|
|
233
|
+
globals: {
|
|
234
|
+
...globals.browser,
|
|
235
|
+
...globals.node,
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
rules: {
|
|
240
|
+
'no-undef': 'off',
|
|
241
|
+
},
|
|
242
|
+
}];
|
|
@@ -26,6 +26,7 @@ function useLhrLocale() {
|
|
|
26
26
|
const locale = firstLhr.configSettings.locale;
|
|
27
27
|
|
|
28
28
|
if (flowResult.steps.some(step => step.lhr.configSettings.locale !== locale)) {
|
|
29
|
+
// eslint-disable-next-line no-console
|
|
29
30
|
console.warn('LHRs have inconsistent locales');
|
|
30
31
|
}
|
|
31
32
|
|
package/flow-report/src/util.ts
CHANGED
|
@@ -97,12 +97,14 @@ function useHashState(): LH.HashState|null {
|
|
|
97
97
|
|
|
98
98
|
const index = Number(indexString);
|
|
99
99
|
if (!Number.isFinite(index)) {
|
|
100
|
+
// eslint-disable-next-line no-console
|
|
100
101
|
console.warn(`Invalid hash index: ${indexString}`);
|
|
101
102
|
return null;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
const step = flowResult.steps[index];
|
|
105
106
|
if (!step) {
|
|
107
|
+
// eslint-disable-next-line no-console
|
|
106
108
|
console.warn(`No flow step at index ${index}`);
|
|
107
109
|
return null;
|
|
108
110
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lighthouse",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "12.
|
|
4
|
+
"version": "12.7.0-dev.20250628",
|
|
5
5
|
"description": "Automated auditing, performance metrics, and best practices for the web.",
|
|
6
6
|
"main": "./core/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -105,16 +105,19 @@
|
|
|
105
105
|
"@build-tracker/cli": "^1.0.0-beta.15",
|
|
106
106
|
"@esbuild-kit/esm-loader": "^2.1.1",
|
|
107
107
|
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
|
|
108
|
+
"@eslint/compat": "^1.3.0",
|
|
109
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
110
|
+
"@eslint/js": "^9.28.0",
|
|
108
111
|
"@formatjs/icu-messageformat-parser": "^2.6.2",
|
|
109
|
-
"@jest/fake-timers": "^
|
|
112
|
+
"@jest/fake-timers": "^29.7.0",
|
|
110
113
|
"@testing-library/preact": "^3.1.1",
|
|
111
114
|
"@testing-library/preact-hooks": "^1.1.0",
|
|
112
115
|
"@types/archiver": "^2.1.2",
|
|
113
116
|
"@types/chrome": "^0.0.154",
|
|
114
|
-
"@types/configstore": "^
|
|
117
|
+
"@types/configstore": "^6.0.2",
|
|
115
118
|
"@types/cpy": "^5.1.0",
|
|
116
119
|
"@types/debug": "^4.1.7",
|
|
117
|
-
"@types/eslint": "^
|
|
120
|
+
"@types/eslint": "^9.6.1",
|
|
118
121
|
"@types/estree": "^0.0.50",
|
|
119
122
|
"@types/gh-pages": "^2.0.0",
|
|
120
123
|
"@types/google.analytics": "0.0.39",
|
|
@@ -131,15 +134,15 @@
|
|
|
131
134
|
"@types/ws": "^7.0.0",
|
|
132
135
|
"@types/yargs": "^17.0.8",
|
|
133
136
|
"@types/yargs-parser": "^20.2.1",
|
|
134
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
135
|
-
"@typescript-eslint/parser": "^
|
|
137
|
+
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
|
138
|
+
"@typescript-eslint/parser": "^8.34.0",
|
|
136
139
|
"acorn": "^8.5.0",
|
|
137
140
|
"angular": "^1.7.4",
|
|
138
141
|
"archiver": "^3.0.0",
|
|
139
142
|
"builtin-modules": "^3.3.0",
|
|
140
143
|
"c8": "^7.11.3",
|
|
141
144
|
"chalk": "^2.4.1",
|
|
142
|
-
"chrome-devtools-frontend": "1.0.
|
|
145
|
+
"chrome-devtools-frontend": "1.0.1473514",
|
|
143
146
|
"colors": "^1.4.0",
|
|
144
147
|
"concurrently": "^6.4.0",
|
|
145
148
|
"conventional-changelog-cli": "^2.1.1",
|
|
@@ -149,7 +152,7 @@
|
|
|
149
152
|
"csv-validator": "^0.0.3",
|
|
150
153
|
"es-main": "^1.2.0",
|
|
151
154
|
"esbuild": "0.19.11",
|
|
152
|
-
"eslint": "^
|
|
155
|
+
"eslint": "^9.28.0",
|
|
153
156
|
"eslint-config-google": "^0.14.0",
|
|
154
157
|
"eslint-formatter-codeframe": "^7.32.1",
|
|
155
158
|
"eslint-plugin-import": "^2.25.3",
|
|
@@ -159,9 +162,10 @@
|
|
|
159
162
|
"firebase": "^9.0.2",
|
|
160
163
|
"gh-pages": "^2.0.1",
|
|
161
164
|
"glob": "^7.1.3",
|
|
165
|
+
"globals": "^15.14.0",
|
|
162
166
|
"idb-keyval": "2.2.0",
|
|
163
|
-
"jest-mock": "^
|
|
164
|
-
"jest-snapshot": "^
|
|
167
|
+
"jest-mock": "^29.7.0",
|
|
168
|
+
"jest-snapshot": "^29.7.0",
|
|
165
169
|
"jsdom": "^12.2.0",
|
|
166
170
|
"lighthouse-plugin-soft-navigation": "^1.0.1",
|
|
167
171
|
"magic-string": "^0.25.7",
|
|
@@ -172,7 +176,7 @@
|
|
|
172
176
|
"pako": "^2.0.3",
|
|
173
177
|
"preact": "^10.7.2",
|
|
174
178
|
"pretty-json-stringify": "^0.0.2",
|
|
175
|
-
"puppeteer": "^24.10.
|
|
179
|
+
"puppeteer": "^24.10.2",
|
|
176
180
|
"resolve": "^1.22.1",
|
|
177
181
|
"rollup": "^2.52.7",
|
|
178
182
|
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
@@ -185,13 +189,13 @@
|
|
|
185
189
|
"webtreemap-cdt": "^3.2.1"
|
|
186
190
|
},
|
|
187
191
|
"dependencies": {
|
|
188
|
-
"@paulirish/trace_engine": "0.0.
|
|
189
|
-
"@sentry/node": "^
|
|
192
|
+
"@paulirish/trace_engine": "0.0.56",
|
|
193
|
+
"@sentry/node": "^9.28.1",
|
|
190
194
|
"axe-core": "^4.10.3",
|
|
191
195
|
"chrome-launcher": "^1.2.0",
|
|
192
|
-
"configstore": "^
|
|
196
|
+
"configstore": "^7.0.0",
|
|
193
197
|
"csp_evaluator": "1.1.5",
|
|
194
|
-
"devtools-protocol": "0.0.
|
|
198
|
+
"devtools-protocol": "0.0.1478340",
|
|
195
199
|
"enquirer": "^2.3.6",
|
|
196
200
|
"http-link-header": "^1.1.1",
|
|
197
201
|
"intl-messageformat": "^10.5.3",
|
|
@@ -204,19 +208,19 @@
|
|
|
204
208
|
"metaviewport-parser": "0.3.0",
|
|
205
209
|
"open": "^8.4.0",
|
|
206
210
|
"parse-cache-control": "1.0.1",
|
|
207
|
-
"puppeteer-core": "^24.10.
|
|
211
|
+
"puppeteer-core": "^24.10.2",
|
|
208
212
|
"robots-parser": "^3.0.1",
|
|
209
213
|
"semver": "^5.3.0",
|
|
210
214
|
"speedline-core": "^1.4.3",
|
|
211
|
-
"third-party-web": "^0.
|
|
215
|
+
"third-party-web": "^0.27.0",
|
|
212
216
|
"tldts-icann": "^6.1.16",
|
|
213
217
|
"ws": "^7.0.0",
|
|
214
218
|
"yargs": "^17.3.1",
|
|
215
219
|
"yargs-parser": "^21.0.0"
|
|
216
220
|
},
|
|
217
221
|
"resolutions": {
|
|
218
|
-
"puppeteer/**/devtools-protocol": "0.0.
|
|
219
|
-
"puppeteer-core/**/devtools-protocol": "0.0.
|
|
222
|
+
"puppeteer/**/devtools-protocol": "0.0.1478340",
|
|
223
|
+
"puppeteer-core/**/devtools-protocol": "0.0.1478340"
|
|
220
224
|
},
|
|
221
225
|
"repository": "GoogleChrome/lighthouse",
|
|
222
226
|
"keywords": [
|
package/readme.md
CHANGED
|
@@ -52,7 +52,7 @@ The Chrome extension was available prior to Lighthouse being available in Chrome
|
|
|
52
52
|
|
|
53
53
|
The Node CLI provides the most flexibility in how Lighthouse runs can be configured and reported. Users who want more advanced usage, or want to run Lighthouse in an automated fashion should use the Node CLI.
|
|
54
54
|
|
|
55
|
-
>
|
|
55
|
+
> [!NOTE]
|
|
56
56
|
> Lighthouse requires Node 18.20 or later.
|
|
57
57
|
|
|
58
58
|
**Installation**:
|
|
@@ -227,7 +227,8 @@ top of any Lighthouse HTML report and open the report in the
|
|
|
227
227
|
In the Viewer, reports can be shared by clicking the share icon in the top
|
|
228
228
|
right corner and signing in to GitHub.
|
|
229
229
|
|
|
230
|
-
>
|
|
230
|
+
> [!NOTE]
|
|
231
|
+
> shared reports are stashed as a secret Gist in GitHub, under your account.
|
|
231
232
|
|
|
232
233
|
## Docs & Recipes
|
|
233
234
|
|
package/report/assets/styles.css
CHANGED
|
@@ -353,14 +353,6 @@
|
|
|
353
353
|
color: var(--report-text-color);
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
.lh-root :focus-visible {
|
|
357
|
-
outline: -webkit-focus-ring-color auto 3px;
|
|
358
|
-
}
|
|
359
|
-
.lh-root summary:focus {
|
|
360
|
-
outline: none;
|
|
361
|
-
box-shadow: 0 0 0 1px hsl(217, 89%, 61%);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
356
|
.lh-root [hidden] {
|
|
365
357
|
display: none !important;
|
|
366
358
|
}
|
|
@@ -415,7 +407,7 @@
|
|
|
415
407
|
color: var(--link-color);
|
|
416
408
|
}
|
|
417
409
|
|
|
418
|
-
.lh-audit__description, .lh-audit__stackpack {
|
|
410
|
+
.lh-audit__description, .lh-audit__stackpack, .lh-list-section__description {
|
|
419
411
|
--inner-audit-padding-right: var(--stackpack-padding-horizontal);
|
|
420
412
|
padding-left: var(--audit-description-padding-left);
|
|
421
413
|
padding-right: var(--inner-audit-padding-right);
|
|
@@ -1132,6 +1124,12 @@
|
|
|
1132
1124
|
margin-bottom: calc(var(--default-padding) * 2);
|
|
1133
1125
|
border-bottom: 1px solid #A8C7FA;
|
|
1134
1126
|
}
|
|
1127
|
+
.lh-list-section {
|
|
1128
|
+
padding: calc(var(--default-padding) * 2) 0;
|
|
1129
|
+
}
|
|
1130
|
+
.lh-list-section__title {
|
|
1131
|
+
text-decoration: underline;
|
|
1132
|
+
}
|
|
1135
1133
|
|
|
1136
1134
|
.lh-header-container {
|
|
1137
1135
|
display: block;
|
|
@@ -1574,6 +1572,10 @@
|
|
|
1574
1572
|
.lh-categories {
|
|
1575
1573
|
margin-top: 0;
|
|
1576
1574
|
}
|
|
1575
|
+
.lh-buttons, .lh-highlighter {
|
|
1576
|
+
/* hide stickyheader marker when printing. crbug.com/41486992 */
|
|
1577
|
+
display: none;
|
|
1578
|
+
}
|
|
1577
1579
|
}
|
|
1578
1580
|
|
|
1579
1581
|
.lh-table {
|
|
@@ -293,7 +293,7 @@ SPDX-License-Identifier: Apache-2.0
|
|
|
293
293
|
}
|
|
294
294
|
.lh-tool-locale__button.lh-active + .lh-tools-locale__selector-wrapper {
|
|
295
295
|
opacity: 1;
|
|
296
|
-
clip: rect(-1px,
|
|
296
|
+
clip: rect(-1px, 255px, 242px, -3px);
|
|
297
297
|
visibility: visible;
|
|
298
298
|
margin: 0 4px;
|
|
299
299
|
}
|
|
@@ -7,6 +7,11 @@ export function getLhrFilenamePrefix(lhr: {
|
|
|
7
7
|
finalDisplayedUrl: string;
|
|
8
8
|
fetchTime: string;
|
|
9
9
|
}): string;
|
|
10
|
+
/**
|
|
11
|
+
* @license
|
|
12
|
+
* Copyright 2017 Google LLC
|
|
13
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
14
|
+
*/
|
|
10
15
|
/**
|
|
11
16
|
* @fileoverview
|
|
12
17
|
* @suppress {reportUnknownTypes}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
|
|
8
8
|
import {reportAssets} from './report-assets.js';
|
|
9
9
|
|
|
@@ -69,11 +69,11 @@ class ReportGenerator {
|
|
|
69
69
|
// we want to generate a report without minification.
|
|
70
70
|
const sanitizedJavascript = reportAssets.FLOW_REPORT_JAVASCRIPT.replace(/<\//g, '\\u003c/');
|
|
71
71
|
return ReportGenerator.replaceStrings(reportAssets.FLOW_REPORT_TEMPLATE, [
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
{search: '%%LIGHTHOUSE_FLOW_JSON%%', replacement: sanitizedJson},
|
|
74
74
|
{search: '%%LIGHTHOUSE_FLOW_JAVASCRIPT%%', replacement: sanitizedJavascript},
|
|
75
75
|
{search: '/*%%LIGHTHOUSE_FLOW_CSS%%*/', replacement: reportAssets.FLOW_REPORT_CSS},
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
]);
|
|
78
78
|
}
|
|
79
79
|
|
package/report/renderer/api.js
CHANGED