lighthouse 9.5.0-dev.20220815 → 9.5.0-dev.20220818

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.
Files changed (101) hide show
  1. package/cli/commands/list-locales.js +1 -1
  2. package/core/config/config-helpers.js +0 -15
  3. package/core/config/config.js +1 -1
  4. package/core/config/constants.js +1 -0
  5. package/core/config/default-config.js +0 -2
  6. package/core/fraggle-rock/api.js +1 -1
  7. package/core/fraggle-rock/config/config.js +12 -13
  8. package/core/fraggle-rock/gather/navigation-runner.js +17 -26
  9. package/core/fraggle-rock/gather/snapshot-runner.js +4 -5
  10. package/core/fraggle-rock/gather/timespan-runner.js +4 -5
  11. package/core/fraggle-rock/replay/stringify-extension.js +105 -0
  12. package/core/fraggle-rock/user-flow.js +10 -12
  13. package/core/gather/driver/execution-context.js +19 -2
  14. package/core/gather/gather-runner.js +1 -1
  15. package/core/index.js +2 -5
  16. package/core/lib/asset-saver.js +2 -2
  17. package/core/lib/page-functions.js +15 -3
  18. package/core/lib/traces/{pwmetrics-events.js → metric-trace-events.js} +3 -4
  19. package/core/runner.js +2 -2
  20. package/dist/report/bundle.esm.js +1 -14
  21. package/dist/report/flow.js +28 -27
  22. package/dist/report/standalone.js +4 -4
  23. package/flow-report/test/flow-report-pptr-test.ts +1 -1
  24. package/package.json +2 -1
  25. package/report/generator/file-namer.js +5 -1
  26. package/report/generator/flow-report-assets.js +10 -6
  27. package/report/generator/report-assets.js +8 -5
  28. package/report/generator/report-generator.js +7 -7
  29. package/report/generator/tsconfig.json +1 -0
  30. package/report/test/generator/file-namer-test.js +2 -2
  31. package/report/test/generator/report-generator-test.js +8 -9
  32. package/report/test/renderer/report-renderer-axe-test.js +2 -2
  33. package/report/test/renderer/report-ui-features-test.js +1 -1
  34. package/shared/localization/format.js +11 -13
  35. package/shared/localization/i18n-module.js +7 -2
  36. package/shared/localization/locales/ar-XB.json +0 -21
  37. package/shared/localization/locales/ar.json +0 -21
  38. package/shared/localization/locales/bg.json +0 -21
  39. package/shared/localization/locales/ca.json +0 -21
  40. package/shared/localization/locales/cs.json +0 -21
  41. package/shared/localization/locales/da.json +0 -21
  42. package/shared/localization/locales/de.json +0 -21
  43. package/shared/localization/locales/el.json +0 -21
  44. package/shared/localization/locales/en-GB.json +0 -21
  45. package/shared/localization/locales/en-US.json +0 -21
  46. package/shared/localization/locales/en-XA.json +0 -21
  47. package/shared/localization/locales/en-XL.json +0 -21
  48. package/shared/localization/locales/es-419.json +0 -21
  49. package/shared/localization/locales/es.json +0 -21
  50. package/shared/localization/locales/fi.json +0 -21
  51. package/shared/localization/locales/fil.json +0 -21
  52. package/shared/localization/locales/fr.json +0 -21
  53. package/shared/localization/locales/he.json +0 -21
  54. package/shared/localization/locales/hi.json +0 -21
  55. package/shared/localization/locales/hr.json +0 -21
  56. package/shared/localization/locales/hu.json +0 -21
  57. package/shared/localization/locales/id.json +0 -21
  58. package/shared/localization/locales/it.json +0 -21
  59. package/shared/localization/locales/ja.json +0 -21
  60. package/shared/localization/locales/ko.json +0 -21
  61. package/shared/localization/locales/lt.json +0 -21
  62. package/shared/localization/locales/lv.json +0 -21
  63. package/shared/localization/locales/nl.json +0 -21
  64. package/shared/localization/locales/no.json +0 -21
  65. package/shared/localization/locales/pl.json +0 -21
  66. package/shared/localization/locales/pt-PT.json +0 -21
  67. package/shared/localization/locales/pt.json +0 -21
  68. package/shared/localization/locales/ro.json +0 -21
  69. package/shared/localization/locales/ru.json +0 -21
  70. package/shared/localization/locales/sk.json +0 -21
  71. package/shared/localization/locales/sl.json +0 -21
  72. package/shared/localization/locales/sr-Latn.json +0 -21
  73. package/shared/localization/locales/sr.json +0 -21
  74. package/shared/localization/locales/sv.json +0 -21
  75. package/shared/localization/locales/ta.json +0 -21
  76. package/shared/localization/locales/te.json +0 -21
  77. package/shared/localization/locales/th.json +0 -21
  78. package/shared/localization/locales/tr.json +0 -21
  79. package/shared/localization/locales/uk.json +0 -21
  80. package/shared/localization/locales/vi.json +0 -21
  81. package/shared/localization/locales/zh-HK.json +0 -21
  82. package/shared/localization/locales/zh-TW.json +0 -21
  83. package/shared/localization/locales/zh.json +0 -21
  84. package/shared/localization/locales.js +53 -50
  85. package/shared/localization/swap-flow-locale.js +6 -2
  86. package/shared/localization/swap-locale.js +4 -4
  87. package/shared/test/localization/format-test.js +17 -20
  88. package/shared/test/localization/locales-test.js +2 -2
  89. package/shared/test/localization/swap-locale-test.js +3 -2
  90. package/shared/tsconfig.json +1 -0
  91. package/shared/type-verifiers.js +1 -1
  92. package/tsconfig.json +1 -5
  93. package/types/config.d.ts +0 -13
  94. package/types/externs.d.ts +1 -1
  95. package/types/lhr/settings.d.ts +2 -0
  96. package/types/user-flow.d.ts +1 -1
  97. package/core/audits/dobetterweb/no-vulnerable-libraries.js +0 -229
  98. package/report/generator/package.json +0 -4
  99. package/report/test/generator/package.json +0 -4
  100. package/shared/package.json +0 -4
  101. package/third-party/snyk/snapshot.json +0 -182
@@ -182,7 +182,7 @@ class F{constructor(e){this._dom=e,this._toggleEl,this._menuEl,this.onDocumentKe
182
182
  * @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
183
183
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
184
184
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
185
- */function N(e,t){const n=t?new Date(t):new Date,r=n.toLocaleTimeString("en-US",{hour12:!1}),o=n.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).split("/");o.unshift(o.pop());return`${e}_${o.join("-")}_${r}`.replace(/[/?<>\\:*|"]/g,"-")}var D={getLhrFilenamePrefix:function(e){return N(new URL(e.finalUrl).hostname,e.fetchTime)},getFilenamePrefix:N,getFlowResultFilenamePrefix:function(e){const t=e.steps[0].lhr;return N(e.name.replace(/\s/g,"-"),t.fetchTime)}};
185
+ */function N(e){return function(e,t){const n=t?new Date(t):new Date,r=n.toLocaleTimeString("en-US",{hour12:!1}),o=n.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).split("/");return o.unshift(o.pop()),`${e}_${o.join("-")}_${r}`.replace(/[/?<>\\:*|"]/g,"-")}(new URL(e.finalUrl).hostname,e.fetchTime)}
186
186
  /**
187
187
  * @license
188
188
  * Copyright 2017 The Lighthouse Authors. All Rights Reserved.
@@ -198,7 +198,7 @@ class F{constructor(e){this._dom=e,this._toggleEl,this._menuEl,this.onDocumentKe
198
198
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
199
  * See the License for the specific language governing permissions and
200
200
  * limitations under the License.
201
- */class H{constructor(e,t={}){this.json,this._dom=e,this._opts=t,this._topbar=t.omitTopbar?null:new T(this,e),this.onMediaQueryChange=this.onMediaQueryChange.bind(this)}initFeatures(e){this.json=e,this._topbar&&(this._topbar.enable(e),this._topbar.resetUIState()),this._setupMediaQueryListeners(),this._setupThirdPartyFilter(),this._setupElementScreenshotOverlay(this._dom.rootEl);const t=this._dom.isDevTools()||this._opts.disableDarkMode||this._opts.disableAutoDarkModeAndFireworks;!t&&window.matchMedia("(prefers-color-scheme: dark)").matches&&k(this._dom,!0);const n=["performance","accessibility","best-practices","seo"].every((t=>{const n=e.categories[t];return n&&1===n.score})),r=this._opts.disableFireworks||this._opts.disableAutoDarkModeAndFireworks;n&&!r&&(this._enableFireworks(),t||k(this._dom,!0));if(e.categories.performance&&e.categories.performance.auditRefs.some((t=>Boolean("metrics"===t.group&&e.audits[t.id].errorMessage)))){this._dom.find("input.lh-metrics-toggle__input",this._dom.rootEl).checked=!0}this.json.audits["script-treemap-data"]&&this.json.audits["script-treemap-data"].details&&this.addButton({text:l.i18n.strings.viewTreemapLabel,icon:"treemap",onClick:()=>function(e){if(!e.audits["script-treemap-data"].details)throw new Error("no script treemap data found");L({lhr:{finalUrl:e.finalUrl,audits:{"script-treemap-data":e.audits["script-treemap-data"]},configSettings:{locale:e.configSettings.locale}}},S()+"/treemap/","treemap-"+C(e))}(this.json)}),this._opts.onViewTrace&&this.addButton({text:"simulate"===e.configSettings.throttlingMethod?l.i18n.strings.viewOriginalTraceLabel:l.i18n.strings.viewTraceLabel,onClick:()=>this._opts.onViewTrace?.()}),this._opts.getStandaloneReportHTML&&this._dom.find('a[data-action="save-html"]',this._dom.rootEl).classList.remove("lh-hidden");for(const e of this._dom.findAll("[data-i18n]",this._dom.rootEl)){const t=e.getAttribute("data-i18n");e.textContent=l.i18n.strings[t]}}addButton(e){const t=this._dom.rootEl.querySelector(".lh-audit-group--metrics");if(!t)return;let n=t.querySelector(".lh-buttons");n||(n=this._dom.createChildOf(t,"div","lh-buttons"));const r=["lh-button"];e.icon&&(r.push("lh-report-icon"),r.push(`lh-report-icon--${e.icon}`));const o=this._dom.createChildOf(n,"button",r.join(" "));return o.textContent=e.text,o.addEventListener("click",e.onClick),o}resetUIState(){this._topbar&&this._topbar.resetUIState()}getReportHtml(){if(!this._opts.getStandaloneReportHTML)throw new Error("`getStandaloneReportHTML` is not set");return this.resetUIState(),this._opts.getStandaloneReportHTML()}saveAsGist(){throw new Error("Cannot save as gist from base report")}_enableFireworks(){this._dom.find(".lh-scores-container",this._dom.rootEl).classList.add("lh-score100")}_setupMediaQueryListeners(){const e=self.matchMedia("(max-width: 500px)");e.addListener(this.onMediaQueryChange),this.onMediaQueryChange(e)}_resetUIState(){this._topbar&&this._topbar.resetUIState()}onMediaQueryChange(e){this._dom.rootEl.classList.toggle("lh-narrow",e.matches)}_setupThirdPartyFilter(){const e=["uses-rel-preconnect","third-party-facades"],t=["legacy-javascript"];Array.from(this._dom.rootEl.querySelectorAll("table.lh-table")).filter((e=>e.querySelector("td.lh-table-column--url, td.lh-table-column--source-location"))).filter((t=>{const n=t.closest(".lh-audit");if(!n)throw new Error(".lh-table not within audit");return!e.includes(n.id)})).forEach((e=>{const n=function(e){return Array.from(e.tBodies[0].rows)}(e),r=this._getThirdPartyRows(n,this.json.finalUrl),o=this._dom.createComponent("3pFilter"),i=this._dom.find("input",o);i.addEventListener("change",(e=>{const t=e.target instanceof HTMLInputElement&&!e.target.checked;let o=!0,i=n[0];for(;i;){const e=t&&r.includes(i);do{i.classList.toggle("lh-row--hidden",e),i.classList.toggle("lh-row--even",!e&&o),i.classList.toggle("lh-row--odd",!e&&!o),i=i.nextElementSibling}while(i&&i.classList.contains("lh-sub-item-row"));e||(o=!o)}})),this._dom.find(".lh-3p-filter-count",o).textContent=`${r.length}`,this._dom.find(".lh-3p-ui-string",o).textContent=l.i18n.strings.thirdPartyResourcesLabel;const a=r.length===n.length,s=!r.length;if((a||s)&&(this._dom.find("div.lh-3p-filter",o).hidden=!0),!e.parentNode)return;e.parentNode.insertBefore(o,e);const c=e.closest(".lh-audit");if(!c)throw new Error(".lh-table not within audit");t.includes(c.id)&&!a&&i.click()}))}_setupElementScreenshotOverlay(e){const t=this.json.audits["full-page-screenshot"]&&this.json.audits["full-page-screenshot"].details&&"full-page-screenshot"===this.json.audits["full-page-screenshot"].details.type&&this.json.audits["full-page-screenshot"].details;t&&g.installOverlayFeature({dom:this._dom,rootEl:e,overlayContainerEl:e,fullPageScreenshot:t})}_getThirdPartyRows(e,t){const n=[],r=l.getRootDomain(t);for(const t of e){if(t.classList.contains("lh-sub-item-row"))continue;const e=t.querySelector("div.lh-text__url");if(!e)continue;const o=e.dataset.url;if(!o)continue;l.getRootDomain(o)!==r&&n.push(t)}return n}_saveFile(e){const t=e.type.match("json")?".json":".html",n=D.getLhrFilenamePrefix(this.json)+t;this._opts.onSaveFileOverride?this._opts.onSaveFileOverride(e,n):this._dom.saveFile(e,n)}}
201
+ */class D{constructor(e,t={}){this.json,this._dom=e,this._opts=t,this._topbar=t.omitTopbar?null:new T(this,e),this.onMediaQueryChange=this.onMediaQueryChange.bind(this)}initFeatures(e){this.json=e,this._topbar&&(this._topbar.enable(e),this._topbar.resetUIState()),this._setupMediaQueryListeners(),this._setupThirdPartyFilter(),this._setupElementScreenshotOverlay(this._dom.rootEl);const t=this._dom.isDevTools()||this._opts.disableDarkMode||this._opts.disableAutoDarkModeAndFireworks;!t&&window.matchMedia("(prefers-color-scheme: dark)").matches&&k(this._dom,!0);const n=["performance","accessibility","best-practices","seo"].every((t=>{const n=e.categories[t];return n&&1===n.score})),r=this._opts.disableFireworks||this._opts.disableAutoDarkModeAndFireworks;n&&!r&&(this._enableFireworks(),t||k(this._dom,!0));if(e.categories.performance&&e.categories.performance.auditRefs.some((t=>Boolean("metrics"===t.group&&e.audits[t.id].errorMessage)))){this._dom.find("input.lh-metrics-toggle__input",this._dom.rootEl).checked=!0}this.json.audits["script-treemap-data"]&&this.json.audits["script-treemap-data"].details&&this.addButton({text:l.i18n.strings.viewTreemapLabel,icon:"treemap",onClick:()=>function(e){if(!e.audits["script-treemap-data"].details)throw new Error("no script treemap data found");L({lhr:{finalUrl:e.finalUrl,audits:{"script-treemap-data":e.audits["script-treemap-data"]},configSettings:{locale:e.configSettings.locale}}},S()+"/treemap/","treemap-"+C(e))}(this.json)}),this._opts.onViewTrace&&this.addButton({text:"simulate"===e.configSettings.throttlingMethod?l.i18n.strings.viewOriginalTraceLabel:l.i18n.strings.viewTraceLabel,onClick:()=>this._opts.onViewTrace?.()}),this._opts.getStandaloneReportHTML&&this._dom.find('a[data-action="save-html"]',this._dom.rootEl).classList.remove("lh-hidden");for(const e of this._dom.findAll("[data-i18n]",this._dom.rootEl)){const t=e.getAttribute("data-i18n");e.textContent=l.i18n.strings[t]}}addButton(e){const t=this._dom.rootEl.querySelector(".lh-audit-group--metrics");if(!t)return;let n=t.querySelector(".lh-buttons");n||(n=this._dom.createChildOf(t,"div","lh-buttons"));const r=["lh-button"];e.icon&&(r.push("lh-report-icon"),r.push(`lh-report-icon--${e.icon}`));const o=this._dom.createChildOf(n,"button",r.join(" "));return o.textContent=e.text,o.addEventListener("click",e.onClick),o}resetUIState(){this._topbar&&this._topbar.resetUIState()}getReportHtml(){if(!this._opts.getStandaloneReportHTML)throw new Error("`getStandaloneReportHTML` is not set");return this.resetUIState(),this._opts.getStandaloneReportHTML()}saveAsGist(){throw new Error("Cannot save as gist from base report")}_enableFireworks(){this._dom.find(".lh-scores-container",this._dom.rootEl).classList.add("lh-score100")}_setupMediaQueryListeners(){const e=self.matchMedia("(max-width: 500px)");e.addListener(this.onMediaQueryChange),this.onMediaQueryChange(e)}_resetUIState(){this._topbar&&this._topbar.resetUIState()}onMediaQueryChange(e){this._dom.rootEl.classList.toggle("lh-narrow",e.matches)}_setupThirdPartyFilter(){const e=["uses-rel-preconnect","third-party-facades"],t=["legacy-javascript"];Array.from(this._dom.rootEl.querySelectorAll("table.lh-table")).filter((e=>e.querySelector("td.lh-table-column--url, td.lh-table-column--source-location"))).filter((t=>{const n=t.closest(".lh-audit");if(!n)throw new Error(".lh-table not within audit");return!e.includes(n.id)})).forEach((e=>{const n=function(e){return Array.from(e.tBodies[0].rows)}(e),r=this._getThirdPartyRows(n,this.json.finalUrl),o=this._dom.createComponent("3pFilter"),i=this._dom.find("input",o);i.addEventListener("change",(e=>{const t=e.target instanceof HTMLInputElement&&!e.target.checked;let o=!0,i=n[0];for(;i;){const e=t&&r.includes(i);do{i.classList.toggle("lh-row--hidden",e),i.classList.toggle("lh-row--even",!e&&o),i.classList.toggle("lh-row--odd",!e&&!o),i=i.nextElementSibling}while(i&&i.classList.contains("lh-sub-item-row"));e||(o=!o)}})),this._dom.find(".lh-3p-filter-count",o).textContent=`${r.length}`,this._dom.find(".lh-3p-ui-string",o).textContent=l.i18n.strings.thirdPartyResourcesLabel;const a=r.length===n.length,s=!r.length;if((a||s)&&(this._dom.find("div.lh-3p-filter",o).hidden=!0),!e.parentNode)return;e.parentNode.insertBefore(o,e);const c=e.closest(".lh-audit");if(!c)throw new Error(".lh-table not within audit");t.includes(c.id)&&!a&&i.click()}))}_setupElementScreenshotOverlay(e){const t=this.json.audits["full-page-screenshot"]&&this.json.audits["full-page-screenshot"].details&&"full-page-screenshot"===this.json.audits["full-page-screenshot"].details.type&&this.json.audits["full-page-screenshot"].details;t&&g.installOverlayFeature({dom:this._dom,rootEl:e,overlayContainerEl:e,fullPageScreenshot:t})}_getThirdPartyRows(e,t){const n=[],r=l.getRootDomain(t);for(const t of e){if(t.classList.contains("lh-sub-item-row"))continue;const e=t.querySelector("div.lh-text__url");if(!e)continue;const o=e.dataset.url;if(!o)continue;l.getRootDomain(o)!==r&&n.push(t)}return n}_saveFile(e){const t=e.type.match("json")?".json":".html",n=N(this.json)+t;this._opts.onSaveFileOverride?this._opts.onSaveFileOverride(e,n):this._dom.saveFile(e,n)}}
202
202
  /**
203
203
  * @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
204
204
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -220,9 +220,9 @@ class F{constructor(e){this._dom=e,this._toggleEl,this._menuEl,this.onDocumentKe
220
220
  * See the License for the specific language governing permissions and
221
221
  * limitations under the License.
222
222
  */
223
- class R{constructor(e){this.el=e;const t=document.createElement("style");if(t.textContent="\n #lh-log {\n position: fixed;\n background-color: #323232;\n color: #fff;\n min-height: 48px;\n min-width: 288px;\n padding: 16px 24px;\n box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);\n border-radius: 2px;\n margin: 12px;\n font-size: 14px;\n cursor: default;\n transition: transform 0.3s, opacity 0.3s;\n transform: translateY(100px);\n opacity: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n }\n \n #lh-log.lh-show {\n opacity: 1;\n transform: translateY(0);\n }\n ",!this.el.parentNode)throw new Error("element needs to be in the DOM");this.el.parentNode.insertBefore(t,this.el),this._id=void 0}log(e,t=!0){this._id&&clearTimeout(this._id),this.el.textContent=e,this.el.classList.add("lh-show"),t&&(this._id=setTimeout((()=>{this.el.classList.remove("lh-show")}),7e3))}warn(e){this.log("Warning: "+e)}error(e){this.log(e),setTimeout((()=>{throw new Error(e)}),0)}hide(){this._id&&clearTimeout(this._id),this.el.classList.remove("lh-show")}}
223
+ class H{constructor(e){this.el=e;const t=document.createElement("style");if(t.textContent="\n #lh-log {\n position: fixed;\n background-color: #323232;\n color: #fff;\n min-height: 48px;\n min-width: 288px;\n padding: 16px 24px;\n box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);\n border-radius: 2px;\n margin: 12px;\n font-size: 14px;\n cursor: default;\n transition: transform 0.3s, opacity 0.3s;\n transform: translateY(100px);\n opacity: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n }\n \n #lh-log.lh-show {\n opacity: 1;\n transform: translateY(0);\n }\n ",!this.el.parentNode)throw new Error("element needs to be in the DOM");this.el.parentNode.insertBefore(t,this.el),this._id=void 0}log(e,t=!0){this._id&&clearTimeout(this._id),this.el.textContent=e,this.el.classList.add("lh-show"),t&&(this._id=setTimeout((()=>{this.el.classList.remove("lh-show")}),7e3))}warn(e){this.log("Warning: "+e)}error(e){this.log(e),setTimeout((()=>{throw new Error(e)}),0)}hide(){this._id&&clearTimeout(this._id),this.el.classList.remove("lh-show")}}
224
224
  /**
225
225
  * @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
226
226
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
227
227
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
228
- */window.__initLighthouseReport__=function(){const e=function(e,t={}){const n=document.createElement("article");n.classList.add("lh-root","lh-vars");const r=new c(n.ownerDocument,n);return new x(r).renderReport(e,n,t),new H(r,t).initFeatures(e),n}(window.__LIGHTHOUSE_JSON__,{getStandaloneReportHTML:()=>document.documentElement.outerHTML});document.body.append(e),document.addEventListener("lh-analytics",(e=>{window.ga&&ga(e.detail.cmd,e.detail.fields)})),document.addEventListener("lh-log",(e=>{const t=document.querySelector("div#lh-log");if(!t)return;const n=new R(t),r=e.detail;switch(r.cmd){case"log":n.log(r.msg);break;case"warn":n.warn(r.msg);break;case"error":n.error(r.msg);break;case"hide":n.hide()}}))}}();
228
+ */window.__initLighthouseReport__=function(){const e=function(e,t={}){const n=document.createElement("article");n.classList.add("lh-root","lh-vars");const r=new c(n.ownerDocument,n);return new x(r).renderReport(e,n,t),new D(r,t).initFeatures(e),n}(window.__LIGHTHOUSE_JSON__,{getStandaloneReportHTML:()=>document.documentElement.outerHTML});document.body.append(e),document.addEventListener("lh-analytics",(e=>{window.ga&&ga(e.detail.cmd,e.detail.fields)})),document.addEventListener("lh-log",(e=>{const t=document.querySelector("div#lh-log");if(!t)return;const n=new H(t),r=e.detail;switch(r.cmd){case"log":n.log(r.msg);break;case"warn":n.warn(r.msg);break;case"error":n.error(r.msg);break;case"hide":n.hide()}}))}}();
@@ -6,7 +6,7 @@
6
6
 
7
7
  import puppeteer, {Browser, Page} from 'puppeteer';
8
8
 
9
- import ReportGenerator from '../../report/generator/report-generator.js';
9
+ import {ReportGenerator} from '../../report/generator/report-generator.js';
10
10
  import {flowResult} from './sample-flow';
11
11
 
12
12
  describe('Lighthouse Flow Report', () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "9.5.0-dev.20220815",
4
+ "version": "9.5.0-dev.20220818",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -98,6 +98,7 @@
98
98
  "@build-tracker/cli": "^1.0.0-beta.15",
99
99
  "@esbuild-kit/esm-loader": "^2.1.1",
100
100
  "@jest/fake-timers": "^28.1.0",
101
+ "@puppeteer/replay": "^0.6.1",
101
102
  "@rollup/plugin-alias": "^3.1.2",
102
103
  "@rollup/plugin-commonjs": "^20.0.0",
103
104
  "@rollup/plugin-dynamic-import-vars": "^1.1.1",
@@ -54,4 +54,8 @@ function getFlowResultFilenamePrefix(flowResult) {
54
54
  return getFilenamePrefix(name, lhr.fetchTime);
55
55
  }
56
56
 
57
- module.exports = {getLhrFilenamePrefix, getFilenamePrefix, getFlowResultFilenamePrefix};
57
+ export {
58
+ getLhrFilenamePrefix,
59
+ getFilenamePrefix,
60
+ getFlowResultFilenamePrefix,
61
+ };
@@ -5,16 +5,20 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const fs = require('fs');
8
+ import fs from 'fs';
9
+
10
+ import {getModuleDirectory} from '../../esm-utils.js';
11
+
12
+ const moduleDir = getModuleDirectory(import.meta);
9
13
 
10
14
  /* eslint-disable max-len */
11
- const FLOW_REPORT_TEMPLATE = fs.readFileSync(`${__dirname}/../../flow-report/assets/standalone-flow-template.html`, 'utf8');
12
- const REGULAR_REPORT_CSS = fs.readFileSync(__dirname + '/../assets/styles.css', 'utf8');
13
- const FLOW_REPORT_CSS = fs.readFileSync(`${__dirname}/../../flow-report/assets/styles.css`, 'utf8');
14
- const FLOW_REPORT_JAVASCRIPT = fs.readFileSync(`${__dirname}/../../dist/report/flow.js`, 'utf8');
15
+ const FLOW_REPORT_TEMPLATE = fs.readFileSync(`${moduleDir}/../../flow-report/assets/standalone-flow-template.html`, 'utf8');
16
+ const REGULAR_REPORT_CSS = fs.readFileSync(moduleDir + '/../assets/styles.css', 'utf8');
17
+ const FLOW_REPORT_CSS = fs.readFileSync(`${moduleDir}/../../flow-report/assets/styles.css`, 'utf8');
18
+ const FLOW_REPORT_JAVASCRIPT = fs.readFileSync(`${moduleDir}/../../dist/report/flow.js`, 'utf8');
15
19
  /* eslint-enable max-len */
16
20
 
17
- module.exports = {
21
+ export const flowReportAssets = {
18
22
  FLOW_REPORT_TEMPLATE,
19
23
  FLOW_REPORT_CSS: [REGULAR_REPORT_CSS, FLOW_REPORT_CSS].join('\n'),
20
24
  FLOW_REPORT_JAVASCRIPT,
@@ -5,15 +5,18 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const fs = require('fs');
8
+ import fs from 'fs';
9
9
 
10
- const flowReportAssets = require('./flow-report-assets.js');
10
+ import {flowReportAssets} from './flow-report-assets.js';
11
+ import {getModuleDirectory} from '../../esm-utils.js';
11
12
 
12
- const REPORT_TEMPLATE = fs.readFileSync(__dirname + '/../assets/standalone-template.html',
13
+ const moduleDir = getModuleDirectory(import.meta);
14
+
15
+ const REPORT_TEMPLATE = fs.readFileSync(moduleDir + '/../assets/standalone-template.html',
13
16
  'utf8');
14
- const REPORT_JAVASCRIPT = fs.readFileSync(__dirname + '/../../dist/report/standalone.js', 'utf8');
17
+ const REPORT_JAVASCRIPT = fs.readFileSync(moduleDir + '/../../dist/report/standalone.js', 'utf8');
15
18
 
16
- module.exports = {
19
+ export const reportAssets = {
17
20
  REPORT_TEMPLATE,
18
21
  REPORT_JAVASCRIPT,
19
22
  // Flow report assets are not needed for every bundle.
@@ -5,7 +5,7 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const htmlReportAssets = require('./report-assets.js');
8
+ import {reportAssets} from './report-assets.js';
9
9
 
10
10
  /** @typedef {import('../../types/lhr/lhr').default} LHResult */
11
11
  /** @typedef {import('../../types/lhr/flow').default} FlowResult */
@@ -50,9 +50,9 @@ class ReportGenerator {
50
50
  const sanitizedJson = ReportGenerator.sanitizeJson(lhr);
51
51
  // terser does its own sanitization, but keep this basic replace for when
52
52
  // we want to generate a report without minification.
53
- const sanitizedJavascript = htmlReportAssets.REPORT_JAVASCRIPT.replace(/<\//g, '\\u003c/');
53
+ const sanitizedJavascript = reportAssets.REPORT_JAVASCRIPT.replace(/<\//g, '\\u003c/');
54
54
 
55
- return ReportGenerator.replaceStrings(htmlReportAssets.REPORT_TEMPLATE, [
55
+ return ReportGenerator.replaceStrings(reportAssets.REPORT_TEMPLATE, [
56
56
  {search: '%%LIGHTHOUSE_JSON%%', replacement: sanitizedJson},
57
57
  {search: '%%LIGHTHOUSE_JAVASCRIPT%%', replacement: sanitizedJavascript},
58
58
  ]);
@@ -65,11 +65,11 @@ class ReportGenerator {
65
65
  */
66
66
  static generateFlowReportHtml(flow) {
67
67
  const sanitizedJson = ReportGenerator.sanitizeJson(flow);
68
- return ReportGenerator.replaceStrings(htmlReportAssets.FLOW_REPORT_TEMPLATE, [
68
+ return ReportGenerator.replaceStrings(reportAssets.FLOW_REPORT_TEMPLATE, [
69
69
  /* eslint-disable max-len */
70
70
  {search: '%%LIGHTHOUSE_FLOW_JSON%%', replacement: sanitizedJson},
71
- {search: '%%LIGHTHOUSE_FLOW_JAVASCRIPT%%', replacement: htmlReportAssets.FLOW_REPORT_JAVASCRIPT},
72
- {search: '/*%%LIGHTHOUSE_FLOW_CSS%%*/', replacement: htmlReportAssets.FLOW_REPORT_CSS},
71
+ {search: '%%LIGHTHOUSE_FLOW_JAVASCRIPT%%', replacement: reportAssets.FLOW_REPORT_JAVASCRIPT},
72
+ {search: '/*%%LIGHTHOUSE_FLOW_CSS%%*/', replacement: reportAssets.FLOW_REPORT_CSS},
73
73
  /* eslint-enable max-len */
74
74
  ]);
75
75
  }
@@ -174,4 +174,4 @@ class ReportGenerator {
174
174
  }
175
175
  }
176
176
 
177
- module.exports = ReportGenerator;
177
+ export {ReportGenerator};
@@ -11,5 +11,6 @@
11
11
  ],
12
12
  "include": [
13
13
  "**/*.js",
14
+ "../../esm-utils.js",
14
15
  ],
15
16
  }
@@ -5,9 +5,9 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const assert = require('assert').strict;
8
+ import {strict as assert} from 'assert';
9
9
 
10
- const getLhrFilenamePrefix = require('../../generator/file-namer.js').getLhrFilenamePrefix;
10
+ import {getLhrFilenamePrefix} from '../../generator/file-namer.js';
11
11
 
12
12
  describe('file-namer helper', () => {
13
13
  it('generates filename prefixes', () => {
@@ -7,16 +7,15 @@
7
7
 
8
8
  /* eslint-disable no-irregular-whitespace */
9
9
 
10
- const assert = require('assert').strict;
11
- const fs = require('fs');
10
+ import {strict as assert} from 'assert';
11
+ import fs from 'fs';
12
12
 
13
- const csvValidator = require('csv-validator');
13
+ import csvValidator from 'csv-validator';
14
14
 
15
- const ReportGenerator = require('../../generator/report-generator.js');
16
- // const {readJson} = require('../../../root.js');
17
- // TODO(esmodules): remove when this folder is esm
18
- // const sampleResults = readJson('core/test/results/sample_v2.json');
19
- const sampleResults = require('../../../core/test/results/sample_v2.json');
15
+ import {ReportGenerator} from '../../generator/report-generator.js';
16
+ import {readJson} from '../../../core/test/test-utils.js';
17
+
18
+ const sampleResults = readJson('core/test/results/sample_v2.json');
20
19
 
21
20
  describe('ReportGenerator', () => {
22
21
  describe('#replaceStrings', () => {
@@ -97,7 +96,7 @@ describe('ReportGenerator', () => {
97
96
  category,score
98
97
  \\"performance\\",\\"0.26\\"
99
98
  \\"accessibility\\",\\"0.78\\"
100
- \\"best-practices\\",\\"0.25\\"
99
+ \\"best-practices\\",\\"0.27\\"
101
100
  \\"seo\\",\\"0.67\\"
102
101
  \\"pwa\\",\\"0.33\\"
103
102
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  import puppeteer from 'puppeteer';
8
8
 
9
- import reportGenerator from '../../generator/report-generator.js';
9
+ import {ReportGenerator} from '../../generator/report-generator.js';
10
10
  import {axeSource} from '../../../core/lib/axe.js';
11
11
  import {readJson} from '../../../core/test/test-utils.js';
12
12
 
@@ -28,7 +28,7 @@ describe('ReportRendererAxe', () => {
28
28
  // https://github.com/dequelabs/axe-core/tree/b573b1c1/doc/examples/jest_react#timeout-issues
29
29
  it('renders without axe violations', async () => {
30
30
  const page = await browser.newPage();
31
- const htmlReport = reportGenerator.generateReportHtml(sampleResults);
31
+ const htmlReport = ReportGenerator.generateReportHtml(sampleResults);
32
32
  await page.setContent(htmlReport);
33
33
 
34
34
  // Superset of Lighthouse's aXe config
@@ -9,7 +9,7 @@ import {strict as assert} from 'assert';
9
9
  import jsdom from 'jsdom';
10
10
  import jestMock from 'jest-mock';
11
11
 
12
- import reportAssets from '../../generator/report-assets.js';
12
+ import {reportAssets} from '../../generator/report-assets.js';
13
13
  import {Util} from '../../renderer/util.js';
14
14
  import {DOM} from '../../renderer/dom.js';
15
15
  import {DetailsRenderer} from '../../renderer/details-renderer.js';
@@ -5,15 +5,16 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const fs = require('fs');
8
+ import fs from 'fs';
9
+ import IntlMessageFormat from 'intl-messageformat';
10
+ import {getModuleDirectory} from '../../esm-utils.js';
11
+ import {isObjectOfUnknownValues, isObjectOrArrayOfUnknownValues} from '../type-verifiers.js';
12
+ import {locales} from './locales.js';
9
13
 
10
- const MessageFormat = require('intl-messageformat');
11
- const {isObjectOfUnknownValues, isObjectOrArrayOfUnknownValues} = require('../type-verifiers.js');
14
+ const moduleDir = getModuleDirectory(import.meta);
12
15
 
13
16
  /** Contains available locales with messages. May be an empty object if bundled. */
14
- /** @type {import('./locales')} */
15
- // @ts-expect-error TODO(esmodules): remove when file is es modules.
16
- const LOCALE_MESSAGES = require('./locales.js').default || require('./locales.js');
17
+ const LOCALE_MESSAGES = locales;
17
18
 
18
19
  const DEFAULT_LOCALE = 'en-US';
19
20
 
@@ -23,7 +24,7 @@ const DEFAULT_LOCALE = 'en-US';
23
24
  * These locales are considered the "canonical" locales. We support other locales which
24
25
  * are simply aliases to one of these. ex: es-AR (alias) -> es-419 (canonical)
25
26
  */
26
- const CANONICAL_LOCALES = fs.readdirSync(__dirname + '/locales/')
27
+ const CANONICAL_LOCALES = fs.readdirSync(moduleDir + '/locales/')
27
28
  .filter(basename => basename.endsWith('.json') && !basename.endsWith('.ctc.json'))
28
29
  .map(locale => locale.replace('.json', ''))
29
30
  .sort();
@@ -95,7 +96,7 @@ function collectAllCustomElementsFromICU(icuElements, seenElementsById = new Map
95
96
  * Returns a copy of the `values` object, with the values formatted based on how
96
97
  * they will be used in their icuMessage, e.g. KB or milliseconds. The original
97
98
  * object is unchanged.
98
- * @param {MessageFormat.IntlMessageFormat} messageFormatter
99
+ * @param {IntlMessageFormat} messageFormatter
99
100
  * @param {Readonly<Record<string, string | number>>} values
100
101
  * @param {string} lhlMessage Used for clear error logging.
101
102
  * @return {Record<string, string | number>}
@@ -177,10 +178,7 @@ function formatMessage(message, values, locale) {
177
178
  // When using accented english, force the use of a different locale for number formatting.
178
179
  const localeForMessageFormat = (locale === 'en-XA' || locale === 'en-XL') ? 'de-DE' : locale;
179
180
 
180
- // This package is not correctly bundled by Rollup.
181
- /** @type {typeof MessageFormat.IntlMessageFormat} */
182
- const MessageFormatCtor = MessageFormat.IntlMessageFormat || MessageFormat;
183
- const formatter = new MessageFormatCtor(message, localeForMessageFormat, formats);
181
+ const formatter = new IntlMessageFormat(message, localeForMessageFormat, formats);
184
182
 
185
183
  // Preformat values for the message format like KB and milliseconds.
186
184
  const valuesForMessageFormat = _preformatValues(formatter, values, message);
@@ -443,7 +441,7 @@ function getIcuMessageIdParts(i18nMessageId) {
443
441
  return {filename, key};
444
442
  }
445
443
 
446
- module.exports = {
444
+ export {
447
445
  DEFAULT_LOCALE,
448
446
  _formatPathAsString,
449
447
  collectAllCustomElementsFromICU,
@@ -5,5 +5,10 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- module.exports.swapLocale = require('./swap-locale.js');
9
- module.exports.format = require('./format.js');
8
+ import * as format from './format.js';
9
+ import {swapLocale} from './swap-locale.js';
10
+
11
+ export {
12
+ swapLocale,
13
+ format,
14
+ };
@@ -854,27 +854,6 @@
854
854
  "core/audits/dobetterweb/no-document-write.js | title": {
855
855
  "message": "‏‮Avoids‬‏ `document.write()`"
856
856
  },
857
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnSeverity": {
858
- "message": "‏‮Highest‬‏ ‏‮Severity‬‏"
859
- },
860
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVersion": {
861
- "message": "‏‮Library‬‏ ‏‮Version‬‏"
862
- },
863
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVuln": {
864
- "message": "‏‮Vulnerability‬‏ ‏‮Count‬‏"
865
- },
866
- "core/audits/dobetterweb/no-vulnerable-libraries.js | description": {
867
- "message": "‏‮Some‬‏ ‏‮third‬‏-‏‮party‬‏ ‏‮scripts‬‏ ‏‮may‬‏ ‏‮contain‬‏ ‏‮known‬‏ ‏‮security‬‏ ‏‮vulnerabilities‬‏ ‏‮that‬‏ ‏‮are‬‏ ‏‮easily‬‏ ‏‮identified‬‏ ‏‮and‬‏ ‏‮exploited‬‏ ‏‮by‬‏ ‏‮attackers‬‏. [‏‮Learn‬‏ ‏‮more‬‏](https://web.dev/no-vulnerable-libraries/)."
868
- },
869
- "core/audits/dobetterweb/no-vulnerable-libraries.js | displayValue": {
870
- "message": "{itemCount,plural, =1{1 ‏‮vulnerability‬‏ ‏‮detected‬‏}zero{# ‏‮vulnerabilities‬‏ ‏‮detected‬‏}two{# ‏‮vulnerabilities‬‏ ‏‮detected‬‏}few{# ‏‮vulnerabilities‬‏ ‏‮detected‬‏}many{# ‏‮vulnerabilities‬‏ ‏‮detected‬‏}other{# ‏‮vulnerabilities‬‏ ‏‮detected‬‏}}"
871
- },
872
- "core/audits/dobetterweb/no-vulnerable-libraries.js | failureTitle": {
873
- "message": "‏‮Includes‬‏ ‏‮front‬‏-‏‮end‬‏ ‏‮JavaScript‬‏ ‏‮libraries‬‏ ‏‮with‬‏ ‏‮known‬‏ ‏‮security‬‏ ‏‮vulnerabilities‬‏"
874
- },
875
- "core/audits/dobetterweb/no-vulnerable-libraries.js | title": {
876
- "message": "‏‮Avoids‬‏ ‏‮front‬‏-‏‮end‬‏ ‏‮JavaScript‬‏ ‏‮libraries‬‏ ‏‮with‬‏ ‏‮known‬‏ ‏‮security‬‏ ‏‮vulnerabilities‬‏"
877
- },
878
857
  "core/audits/dobetterweb/notification-on-start.js | description": {
879
858
  "message": "‏‮Users‬‏ ‏‮are‬‏ ‏‮mistrustful‬‏ ‏‮of‬‏ ‏‮or‬‏ ‏‮confused‬‏ ‏‮by‬‏ ‏‮sites‬‏ ‏‮that‬‏ ‏‮request‬‏ ‏‮to‬‏ ‏‮send‬‏ ‏‮notifications‬‏ ‏‮without‬‏ ‏‮context‬‏. ‏‮Consider‬‏ ‏‮tying‬‏ ‏‮the‬‏ ‏‮request‬‏ ‏‮to‬‏ ‏‮user‬‏ ‏‮gestures‬‏ ‏‮instead‬‏. [‏‮Learn‬‏ ‏‮more‬‏](https://web.dev/notification-on-start/)."
880
859
  },
@@ -854,27 +854,6 @@
854
854
  "core/audits/dobetterweb/no-document-write.js | title": {
855
855
  "message": "يتم تجنُب `document.write()`"
856
856
  },
857
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnSeverity": {
858
- "message": "أعلى نسبة خطورة"
859
- },
860
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVersion": {
861
- "message": "إصدار المكتبة"
862
- },
863
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVuln": {
864
- "message": "عدد الثغرات"
865
- },
866
- "core/audits/dobetterweb/no-vulnerable-libraries.js | description": {
867
- "message": "قد تحتوي بعض البرامج النصية للجهات الخارجية على ثغرات أمنية معروفة يمكن للمهاجمين تحديدها واستغلالها بسهولة. [مزيد من المعلومات](https://web.dev/no-vulnerable-libraries/)"
868
- },
869
- "core/audits/dobetterweb/no-vulnerable-libraries.js | displayValue": {
870
- "message": "{itemCount,plural, =1{تم رصد ثغرة واحدة}zero{تم رصد # ثغرة}two{تم رصد ثغرتين (#)}few{تم رصد # ثغرات}many{تم رصد # ثغرةً}other{تم رصد # ثغرة}}"
871
- },
872
- "core/audits/dobetterweb/no-vulnerable-libraries.js | failureTitle": {
873
- "message": "يتم تضمين مكتبات الواجهة الأمامية JavaScript ذات الثغرات الأمنية المعروفة"
874
- },
875
- "core/audits/dobetterweb/no-vulnerable-libraries.js | title": {
876
- "message": "يتم تجنُب مكتبات الواجهة الأمامية JavaScript ذات الثغرات الأمنية المعروفة"
877
- },
878
857
  "core/audits/dobetterweb/notification-on-start.js | description": {
879
858
  "message": "لا يثق المستخدمون في المواقع الإلكترونية التي تطلب إرسال الإشعارات بدون سياق أو قد يؤدي ذلك إلى إرباكهم. يمكنك ربط الطلب بإيماءات المستخدم بدلاً من ذلك. [مزيد من المعلومات](https://web.dev/notification-on-start/)"
880
859
  },
@@ -854,27 +854,6 @@
854
854
  "core/audits/dobetterweb/no-document-write.js | title": {
855
855
  "message": "Избягва `document.write()`"
856
856
  },
857
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnSeverity": {
858
- "message": "Най-високо ниво на сериозност"
859
- },
860
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVersion": {
861
- "message": "Версия на библиотеката"
862
- },
863
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVuln": {
864
- "message": "Брой уязвимости"
865
- },
866
- "core/audits/dobetterweb/no-vulnerable-libraries.js | description": {
867
- "message": "Някои скриптове на трети страни може да съдържат известни уязвимости в сигурността, които лесно се откриват и използват от атакуващите. [Научете повече](https://web.dev/no-vulnerable-libraries/)."
868
- },
869
- "core/audits/dobetterweb/no-vulnerable-libraries.js | displayValue": {
870
- "message": "{itemCount,plural, =1{Открита е 1 уязвимост}other{Открити са # уязвимости}}"
871
- },
872
- "core/audits/dobetterweb/no-vulnerable-libraries.js | failureTitle": {
873
- "message": "Включва библиотеки на JavaScript за предния слой, съдържащи известни уязвимости в сигурността"
874
- },
875
- "core/audits/dobetterweb/no-vulnerable-libraries.js | title": {
876
- "message": "Избягва библиотеки на JavaScript за предния слой, съдържащи известни уязвимости в сигурността"
877
- },
878
857
  "core/audits/dobetterweb/notification-on-start.js | description": {
879
858
  "message": "Потребителите се объркват или нямат доверие на сайтове, които искат да изпращат известия без контекст. Вместо това бихте могли да обвържете заявката към жестове на потребителя. [Научете повече](https://web.dev/notification-on-start/)."
880
859
  },
@@ -854,27 +854,6 @@
854
854
  "core/audits/dobetterweb/no-document-write.js | title": {
855
855
  "message": "Evita `document.write()`"
856
856
  },
857
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnSeverity": {
858
- "message": "Gravetat més alta"
859
- },
860
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVersion": {
861
- "message": "Versió de la biblioteca"
862
- },
863
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVuln": {
864
- "message": "Recompte de vulnerabilitats"
865
- },
866
- "core/audits/dobetterweb/no-vulnerable-libraries.js | description": {
867
- "message": "Alguns scripts de tercers poden contenir vulnerabilitats de seguretat que els atacants identifiquen i exploten fàcilment. [Obtén més informació](https://web.dev/no-vulnerable-libraries/)."
868
- },
869
- "core/audits/dobetterweb/no-vulnerable-libraries.js | displayValue": {
870
- "message": "{itemCount,plural, =1{S'ha detectat 1 vulnerabilitat}other{S'han detectat # vulnerabilitats}}"
871
- },
872
- "core/audits/dobetterweb/no-vulnerable-libraries.js | failureTitle": {
873
- "message": "Inclou biblioteques de JavaScript d'interfície amb vulnerabilitats de seguretat conegudes"
874
- },
875
- "core/audits/dobetterweb/no-vulnerable-libraries.js | title": {
876
- "message": "Evita les biblioteques de JavaScript d'interfície amb vulnerabilitats de seguretat conegudes"
877
- },
878
857
  "core/audits/dobetterweb/notification-on-start.js | description": {
879
858
  "message": "Els usuaris reaccionen amb desconfiança i desconcert davant dels llocs web que sol·liciten enviar notificacions sense context. Et recomanem que vinculis la sol·licitud als gestos de l'usuari. [Obtén més informació](https://web.dev/notification-on-start/)."
880
859
  },
@@ -854,27 +854,6 @@
854
854
  "core/audits/dobetterweb/no-document-write.js | title": {
855
855
  "message": "Nepoužívá metodu `document.write()`"
856
856
  },
857
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnSeverity": {
858
- "message": "Největší závažnost"
859
- },
860
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVersion": {
861
- "message": "Verze knihovny"
862
- },
863
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVuln": {
864
- "message": "Počet chyb zabezpečení"
865
- },
866
- "core/audits/dobetterweb/no-vulnerable-libraries.js | description": {
867
- "message": "Některé skripty třetích stran mohou obsahovat známé chyby zabezpečení, které útočníci mohou snadno odhalit a zneužít. [Další informace](https://web.dev/no-vulnerable-libraries/)"
868
- },
869
- "core/audits/dobetterweb/no-vulnerable-libraries.js | displayValue": {
870
- "message": "{itemCount,plural, =1{Byla zjištěna jedna chyba zabezpečení}few{Byly zjištěny # chyby zabezpečení}many{Bylo zjištěno # chyby zabezpečení}other{Bylo zjištěno # chyb zabezpečení}}"
871
- },
872
- "core/audits/dobetterweb/no-vulnerable-libraries.js | failureTitle": {
873
- "message": "Zahrnuje frontendové javascriptové knihovny se známými chybami zabezpečení"
874
- },
875
- "core/audits/dobetterweb/no-vulnerable-libraries.js | title": {
876
- "message": "Nepoužívá frontendové javascriptové knihovny se známými chybami zabezpečení"
877
- },
878
857
  "core/audits/dobetterweb/notification-on-start.js | description": {
879
858
  "message": "Vůči webům, které bez kontextu žádají o oprávnění odesílat oznámení, mohou být uživatelé nedůvěřiví nebo z nich mohou být zmateni. Zvažte možnost spojit tuto žádost s gesty uživatele. [Další informace](https://web.dev/notification-on-start/)"
880
859
  },
@@ -854,27 +854,6 @@
854
854
  "core/audits/dobetterweb/no-document-write.js | title": {
855
855
  "message": "Undgår `document.write()`"
856
856
  },
857
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnSeverity": {
858
- "message": "Størst omfang"
859
- },
860
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVersion": {
861
- "message": "Biblioteksversion"
862
- },
863
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVuln": {
864
- "message": "Antal sårbarheder"
865
- },
866
- "core/audits/dobetterweb/no-vulnerable-libraries.js | description": {
867
- "message": "Nogle scripts fra tredjeparter kan indeholde kendte sikkerhedssårbarheder, som let kan identificeres og udnyttes af hackere. [Få flere oplysninger](https://web.dev/no-vulnerable-libraries/)."
868
- },
869
- "core/audits/dobetterweb/no-vulnerable-libraries.js | displayValue": {
870
- "message": "{itemCount,plural, =1{1 sårbarhed blev registreret}one{# sårbarhed blev registreret}other{# sårbarheder blev registreret}}"
871
- },
872
- "core/audits/dobetterweb/no-vulnerable-libraries.js | failureTitle": {
873
- "message": "Indeholder JavaScript-biblioteker i frontend med kendte sikkerhedssårbarheder"
874
- },
875
- "core/audits/dobetterweb/no-vulnerable-libraries.js | title": {
876
- "message": "Undgår frontend JavaScript-biblioteker med kendte sikkerhedssårbarheder"
877
- },
878
857
  "core/audits/dobetterweb/notification-on-start.js | description": {
879
858
  "message": "Brugere er mistænksomme over for eller forvirres af websites, der anmoder om at sende notifikationer uden sammenhæng. Overvej at knytte anmodningen til brugerbevægelser i stedet for. [Få flere oplysninger](https://web.dev/notification-on-start/)."
880
859
  },
@@ -854,27 +854,6 @@
854
854
  "core/audits/dobetterweb/no-document-write.js | title": {
855
855
  "message": "Verwendet kein `document.write()`"
856
856
  },
857
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnSeverity": {
858
- "message": "Höchster Schweregrad"
859
- },
860
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVersion": {
861
- "message": "Bibliotheksversion"
862
- },
863
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVuln": {
864
- "message": "Anzahl der Sicherheitslücken"
865
- },
866
- "core/audits/dobetterweb/no-vulnerable-libraries.js | description": {
867
- "message": "Einige Skripts von Drittanbietern können bekannte Sicherheitslücken enthalten, die von Angreifern leicht zu identifizieren und zu missbrauchen sind. [Weitere Informationen.](https://web.dev/no-vulnerable-libraries/)"
868
- },
869
- "core/audits/dobetterweb/no-vulnerable-libraries.js | displayValue": {
870
- "message": "{itemCount,plural, =1{1 Sicherheitslücke erkannt}other{# Sicherheitslücken erkannt}}"
871
- },
872
- "core/audits/dobetterweb/no-vulnerable-libraries.js | failureTitle": {
873
- "message": "Enthält Front-End-JavaScript-Bibliotheken mit bekannten Sicherheitslücken"
874
- },
875
- "core/audits/dobetterweb/no-vulnerable-libraries.js | title": {
876
- "message": "Vermeidet Front-End-JavaScript-Bibliotheken mit bekannten Sicherheitslücken"
877
- },
878
857
  "core/audits/dobetterweb/notification-on-start.js | description": {
879
858
  "message": "Nutzer sind misstrauisch oder verwirrt, wenn Websites die Berechtigung zum Senden von Benachrichtigungen ohne Begründung anfordern. Versuchen Sie stattdessen, die Anforderung mit Touch-Gesten zu verbinden. [Weitere Informationen.](https://web.dev/notification-on-start/)"
880
859
  },
@@ -854,27 +854,6 @@
854
854
  "core/audits/dobetterweb/no-document-write.js | title": {
855
855
  "message": "Αποφυγή `document.write()`"
856
856
  },
857
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnSeverity": {
858
- "message": "Υψηλότερη σοβαρότητα"
859
- },
860
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVersion": {
861
- "message": "Έκδοση βιβλιοθήκης"
862
- },
863
- "core/audits/dobetterweb/no-vulnerable-libraries.js | columnVuln": {
864
- "message": "Πλήθος ευπαθειών"
865
- },
866
- "core/audits/dobetterweb/no-vulnerable-libraries.js | description": {
867
- "message": "Ορισμένα σενάρια τρίτων μπορεί να έχουν γνωστές ευπάθειες ασφάλειας τις οποίες μπορούν εύκολα να εντοπίσουν και να εκμεταλλευτούν οι επίδοξοι εισβολείς. [Μάθετε περισσότερα](https://web.dev/no-vulnerable-libraries/)."
868
- },
869
- "core/audits/dobetterweb/no-vulnerable-libraries.js | displayValue": {
870
- "message": "{itemCount,plural, =1{Εντοπίστηκε 1 ευπάθεια}other{Εντοπίστηκαν # ευπάθειες}}"
871
- },
872
- "core/audits/dobetterweb/no-vulnerable-libraries.js | failureTitle": {
873
- "message": "Συμπερίληψη βιβλιοθηκών JavaScript διεπαφής με γνωστές ευπάθειες ασφάλειας"
874
- },
875
- "core/audits/dobetterweb/no-vulnerable-libraries.js | title": {
876
- "message": "Αποφυγή όλων των βιβλιοθηκών JavaScript διεπαφής με γνωστές ευπάθειες ασφάλειας"
877
- },
878
857
  "core/audits/dobetterweb/notification-on-start.js | description": {
879
858
  "message": "Οι ιστότοποι που απαιτούν την αποστολή ειδοποιήσεων χωρίς προφανή αιτία προκαλούν σύγχυση ή φαίνονται ύποπτοι στους χρήστες. Συνιστάται τα αιτήματα να συνδέονται με τις κινήσεις των χρηστών. [Μάθετε περισσότερα](https://web.dev/notification-on-start/)."
880
859
  },