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: ['
|
|
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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
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
|
-
|
|
443
|
-
|
|
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