lighthouse 9.5.0-dev.20220322 → 9.5.0-dev.20220325

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.
@@ -125,7 +125,7 @@ class InstallableManifest extends Audit {
125
125
  failureTitle: str_(UIStrings.failureTitle),
126
126
  description: str_(UIStrings.description),
127
127
  supportedModes: ['navigation'],
128
- requiredArtifacts: ['URL', 'WebAppManifest', 'InstallabilityErrors'],
128
+ requiredArtifacts: ['WebAppManifest', 'InstallabilityErrors'],
129
129
  };
130
130
  }
131
131
 
@@ -195,7 +195,6 @@ class InstallableManifest extends Audit {
195
195
  *
196
196
  */
197
197
  static async audit(artifacts, context) {
198
- const manifestValues = await ManifestValues.request(artifacts, context);
199
198
  const {i18nErrors, warnings} = InstallableManifest.getInstallabilityErrors(artifacts);
200
199
 
201
200
  const manifestUrl = artifacts.WebAppManifest ? artifacts.WebAppManifest.url : null;
@@ -210,10 +209,16 @@ class InstallableManifest extends Audit {
210
209
  const errorReasons = i18nErrors.map(reason => {
211
210
  return {reason};
212
211
  });
213
- /** DevTools InstallabilityErrors does not emit an error unless there is a manifest, so include manifestValues's error */
214
- if (manifestValues.isParseFailure) {
215
- errorReasons.push({
216
- reason: manifestValues.parseFailureReason});
212
+
213
+ // If InstallabilityErrors is empty, double check ManifestValues to make sure nothing was missed.
214
+ // InstallabilityErrors can be empty erroneously in our DevTools web tests.
215
+ if (!errorReasons.length) {
216
+ const manifestValues = await ManifestValues.request(artifacts, context);
217
+ if (manifestValues.isParseFailure) {
218
+ errorReasons.push({
219
+ reason: manifestValues.parseFailureReason,
220
+ });
221
+ }
217
222
  }
218
223
 
219
224
  // Include the detailed pass/fail checklist as a diagnostic.
@@ -439,10 +439,8 @@ class GatherRunner {
439
439
  }
440
440
 
441
441
  try {
442
- if (baseArtifacts.WebAppManifest) {
443
- baseArtifacts.InstallabilityErrors = await InstallabilityErrors.getInstallabilityErrors(
444
- passContext.driver.defaultSession);
445
- }
442
+ baseArtifacts.InstallabilityErrors = await InstallabilityErrors.getInstallabilityErrors(
443
+ passContext.driver.defaultSession);
446
444
  } catch (err) {
447
445
  log.error('GatherRunner InstallabilityErrors', err);
448
446
  baseArtifacts.InstallabilityErrors = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lighthouse",
3
- "version": "9.5.0-dev.20220322",
3
+ "version": "9.5.0-dev.20220325",
4
4
  "description": "Automated auditing, performance metrics, and best practices for the web.",
5
5
  "main": "./lighthouse-core/index.js",
6
6
  "bin": {