lighthouse 9.5.0-dev.20220410 → 9.5.0-dev.20220413

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.
@@ -97,6 +97,11 @@ const UIStrings = {
97
97
  'protocol-timeout': `Lighthouse could not determine if there was a service worker. Please try with a newer version of Chrome.`,
98
98
  /** Message logged when the web app has been uninstalled o desktop, signalling that the install banner state is being reset. */
99
99
  'pipeline-restarted': 'PWA has been uninstalled and installability checks resetting.',
100
+ /**
101
+ * @description Error message explaining that the URL of the manifest uses a scheme that is not supported on Android.
102
+ * @example {data:} scheme
103
+ */
104
+ 'scheme-not-supported-for-webapk': 'The manifest URL scheme ({scheme}) is not supported on Android.',
100
105
  };
101
106
  /* eslint-enable max-len */
102
107
 
@@ -156,6 +161,17 @@ class InstallableManifest extends Audit {
156
161
  // @ts-expect-error errorIds from protocol should match up against the strings dict
157
162
  const matchingString = UIStrings[err.errorId];
158
163
 
164
+ if (err.errorId === 'scheme-not-supported-for-webapk') {
165
+ // If there was no manifest, then there will be at lest one other installability error.
166
+ // We can ignore this error if that's the case.
167
+ const manifestUrl = artifacts.WebAppManifest?.url;
168
+ if (!manifestUrl) continue;
169
+
170
+ const scheme = new URL(manifestUrl).protocol;
171
+ i18nErrors.push(str_(matchingString, {scheme}));
172
+ continue;
173
+ }
174
+
159
175
  // Handle an errorId we don't recognize.
160
176
  if (matchingString === undefined) {
161
177
  i18nErrors.push(str_(UIStrings.noErrorId, {errorId: err.errorId}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lighthouse",
3
- "version": "9.5.0-dev.20220410",
3
+ "version": "9.5.0-dev.20220413",
4
4
  "description": "Automated auditing, performance metrics, and best practices for the web.",
5
5
  "main": "./lighthouse-core/index.js",
6
6
  "bin": {
@@ -1067,6 +1067,9 @@
1067
1067
  "lighthouse-core/audits/installable-manifest.js | protocol-timeout": {
1068
1068
  "message": "Lighthouse could not determine if there was a service worker. Please try with a newer version of Chrome."
1069
1069
  },
1070
+ "lighthouse-core/audits/installable-manifest.js | scheme-not-supported-for-webapk": {
1071
+ "message": "The manifest URL scheme ({scheme}) is not supported on Android."
1072
+ },
1070
1073
  "lighthouse-core/audits/installable-manifest.js | start-url-not-valid": {
1071
1074
  "message": "Manifest start URL is not valid"
1072
1075
  },
@@ -1067,6 +1067,9 @@
1067
1067
  "lighthouse-core/audits/installable-manifest.js | protocol-timeout": {
1068
1068
  "message": "L̂íĝh́t̂h́ôúŝé ĉóûĺd̂ ńôt́ d̂ét̂ér̂ḿîńê íf̂ t́ĥér̂é ŵáŝ á ŝér̂v́îćê ẃôŕk̂ér̂. Ṕl̂éâśê t́r̂ý ŵít̂h́ â ńêẃêŕ v̂ér̂śîón̂ óf̂ Ćĥŕôḿê."
1069
1069
  },
1070
+ "lighthouse-core/audits/installable-manifest.js | scheme-not-supported-for-webapk": {
1071
+ "message": "T̂h́ê ḿâńîf́êśt̂ ÚR̂Ĺ ŝćĥém̂é ({scheme}) îś n̂ót̂ śûṕp̂ór̂t́êd́ ôń Âńd̂ŕôíd̂."
1072
+ },
1070
1073
  "lighthouse-core/audits/installable-manifest.js | start-url-not-valid": {
1071
1074
  "message": "M̂án̂íf̂éŝt́ ŝt́âŕt̂ ÚR̂Ĺ îś n̂ót̂ v́âĺîd́"
1072
1075
  },
@@ -69,6 +69,7 @@ Array [
69
69
  "platform-not-supported-on-android",
70
70
  "prefer-related-applications",
71
71
  "prefer-related-applications-only-beta-stable",
72
+ "scheme-not-supported-for-webapk",
72
73
  "start-url-not-valid",
73
74
  "url-not-supported-for-webapk",
74
75
  "warn-not-offline-capable",