lighthouse 9.5.0-dev.20220825 → 9.5.0-dev.20220826

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.
@@ -123,49 +123,54 @@ const UIStrings = {
123
123
 
124
124
  const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
125
125
 
126
- /** @type {SelfMap<keyof LH.FRArtifacts>} */
126
+ // Ensure all artifact IDs match the typedefs.
127
+ /** @type {Record<keyof LH.FRArtifacts, string>} */
127
128
  const artifacts = {
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',
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: '',
167
168
  };
168
169
 
170
+ for (const key of Object.keys(artifacts)) {
171
+ artifacts[/** @type {keyof typeof artifacts} */ (key)] = key;
172
+ }
173
+
169
174
  /** @type {LH.Config.Json} */
170
175
  const defaultConfig = {
171
176
  settings: constants.defaultSettings,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "9.5.0-dev.20220825",
4
+ "version": "9.5.0-dev.20220826",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {