lighthouse 9.5.0-dev.20220824 → 9.5.0-dev.20220825
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.
|
@@ -259,6 +259,10 @@ function pruneExpectations(localConsole, lhr, expected, reportOptions) {
|
|
|
259
259
|
* @param {*} obj
|
|
260
260
|
*/
|
|
261
261
|
function failsChromeVersionCheck(obj) {
|
|
262
|
+
// LHR never actually run, so we can't know. Better to not prune
|
|
263
|
+
// things than to fail loudly when accessing lhr.environment.
|
|
264
|
+
if (!lhr.environment) return false;
|
|
265
|
+
|
|
262
266
|
return !chromiumVersionCheck({
|
|
263
267
|
version: getChromeVersionString(),
|
|
264
268
|
min: obj._minChromiumVersion,
|
|
@@ -123,54 +123,49 @@ const UIStrings = {
|
|
|
123
123
|
|
|
124
124
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
/** @type {Record<keyof LH.FRArtifacts, string>} */
|
|
126
|
+
/** @type {SelfMap<keyof LH.FRArtifacts>} */
|
|
128
127
|
const artifacts = {
|
|
129
|
-
DevtoolsLog: '',
|
|
130
|
-
Trace: '',
|
|
131
|
-
Accessibility: '',
|
|
132
|
-
AnchorElements: '',
|
|
133
|
-
CacheContents: '',
|
|
134
|
-
ConsoleMessages: '',
|
|
135
|
-
CSSUsage: '',
|
|
136
|
-
Doctype: '',
|
|
137
|
-
DOMStats: '',
|
|
138
|
-
EmbeddedContent: '',
|
|
139
|
-
FontSize: '',
|
|
140
|
-
Inputs: '',
|
|
141
|
-
FullPageScreenshot: '',
|
|
142
|
-
GlobalListeners: '',
|
|
143
|
-
IFrameElements: '',
|
|
144
|
-
ImageElements: '',
|
|
145
|
-
InstallabilityErrors: '',
|
|
146
|
-
InspectorIssues: '',
|
|
147
|
-
JsUsage: '',
|
|
148
|
-
LinkElements: '',
|
|
149
|
-
MainDocumentContent: '',
|
|
150
|
-
MetaElements: '',
|
|
151
|
-
NetworkUserAgent: '',
|
|
152
|
-
OptimizedImages: '',
|
|
153
|
-
PasswordInputsWithPreventedPaste: '',
|
|
154
|
-
ResponseCompression: '',
|
|
155
|
-
RobotsTxt: '',
|
|
156
|
-
ServiceWorker: '',
|
|
157
|
-
ScriptElements: '',
|
|
158
|
-
Scripts: '',
|
|
159
|
-
SourceMaps: '',
|
|
160
|
-
Stacks: '',
|
|
161
|
-
TagsBlockingFirstPaint: '',
|
|
162
|
-
TapTargets: '',
|
|
163
|
-
TraceElements: '',
|
|
164
|
-
ViewportDimensions: '',
|
|
165
|
-
WebAppManifest: '',
|
|
166
|
-
devtoolsLogs: '',
|
|
167
|
-
traces: '',
|
|
128
|
+
DevtoolsLog: 'DevtoolsLog',
|
|
129
|
+
Trace: 'Trace',
|
|
130
|
+
Accessibility: 'Accessibility',
|
|
131
|
+
AnchorElements: 'AnchorElements',
|
|
132
|
+
CacheContents: 'CacheContents',
|
|
133
|
+
ConsoleMessages: 'ConsoleMessages',
|
|
134
|
+
CSSUsage: 'CSSUsage',
|
|
135
|
+
Doctype: 'Doctype',
|
|
136
|
+
DOMStats: 'DOMStats',
|
|
137
|
+
EmbeddedContent: 'EmbeddedContent',
|
|
138
|
+
FontSize: 'FontSize',
|
|
139
|
+
Inputs: 'Inputs',
|
|
140
|
+
FullPageScreenshot: 'FullPageScreenshot',
|
|
141
|
+
GlobalListeners: 'GlobalListeners',
|
|
142
|
+
IFrameElements: 'IFrameElements',
|
|
143
|
+
ImageElements: 'ImageElements',
|
|
144
|
+
InstallabilityErrors: 'InstallabilityErrors',
|
|
145
|
+
InspectorIssues: 'InspectorIssues',
|
|
146
|
+
JsUsage: 'JsUsage',
|
|
147
|
+
LinkElements: 'LinkElements',
|
|
148
|
+
MainDocumentContent: 'MainDocumentContent',
|
|
149
|
+
MetaElements: 'MetaElements',
|
|
150
|
+
NetworkUserAgent: 'NetworkUserAgent',
|
|
151
|
+
OptimizedImages: 'OptimizedImages',
|
|
152
|
+
PasswordInputsWithPreventedPaste: 'PasswordInputsWithPreventedPaste',
|
|
153
|
+
ResponseCompression: 'ResponseCompression',
|
|
154
|
+
RobotsTxt: 'RobotsTxt',
|
|
155
|
+
ServiceWorker: 'ServiceWorker',
|
|
156
|
+
ScriptElements: 'ScriptElements',
|
|
157
|
+
Scripts: 'Scripts',
|
|
158
|
+
SourceMaps: 'SourceMaps',
|
|
159
|
+
Stacks: 'Stacks',
|
|
160
|
+
TagsBlockingFirstPaint: 'TagsBlockingFirstPaint',
|
|
161
|
+
TapTargets: 'TapTargets',
|
|
162
|
+
TraceElements: 'TraceElements',
|
|
163
|
+
ViewportDimensions: 'ViewportDimensions',
|
|
164
|
+
WebAppManifest: 'WebAppManifest',
|
|
165
|
+
devtoolsLogs: 'devtoolsLogs',
|
|
166
|
+
traces: 'traces',
|
|
168
167
|
};
|
|
169
168
|
|
|
170
|
-
for (const key of Object.keys(artifacts)) {
|
|
171
|
-
artifacts[/** @type {keyof typeof artifacts} */ (key)] = key;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
169
|
/** @type {LH.Config.Json} */
|
|
175
170
|
const defaultConfig = {
|
|
176
171
|
settings: constants.defaultSettings,
|
package/package.json
CHANGED