lighthouse 12.8.2 → 13.0.0-dev.20251010
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.
- package/cli/cli-flags.js +1 -1
- package/cli/test/smokehouse/config/exclusions.js +0 -2
- package/cli/test/smokehouse/version-check.d.ts +1 -1
- package/core/audits/accessibility/accesskeys.js +3 -3
- package/core/audits/accessibility/aria-allowed-attr.js +3 -3
- package/core/audits/accessibility/aria-allowed-role.js +2 -1
- package/core/audits/accessibility/aria-command-name.js +1 -1
- package/core/audits/accessibility/aria-conditional-attr.js +1 -1
- package/core/audits/accessibility/aria-deprecated-role.js +1 -1
- package/core/audits/accessibility/aria-dialog-name.js +1 -1
- package/core/audits/accessibility/aria-hidden-body.js +3 -3
- package/core/audits/accessibility/aria-hidden-focus.js +3 -3
- package/core/audits/accessibility/aria-input-field-name.js +3 -3
- package/core/audits/accessibility/aria-meter-name.js +1 -1
- package/core/audits/accessibility/aria-progressbar-name.js +1 -1
- package/core/audits/accessibility/aria-prohibited-attr.js +1 -1
- package/core/audits/accessibility/aria-required-attr.js +3 -3
- package/core/audits/accessibility/aria-required-children.js +3 -3
- package/core/audits/accessibility/aria-required-parent.js +3 -3
- package/core/audits/accessibility/aria-roles.js +3 -3
- package/core/audits/accessibility/aria-text.js +3 -3
- package/core/audits/accessibility/aria-toggle-field-name.js +3 -3
- package/core/audits/accessibility/aria-tooltip-name.js +1 -1
- package/core/audits/accessibility/aria-treeitem-name.js +1 -1
- package/core/audits/accessibility/aria-valid-attr-value.js +3 -3
- package/core/audits/accessibility/aria-valid-attr.js +3 -3
- package/core/audits/accessibility/button-name.js +3 -3
- package/core/audits/accessibility/bypass.js +3 -3
- package/core/audits/accessibility/color-contrast.js +3 -3
- package/core/audits/accessibility/definition-list.js +3 -3
- package/core/audits/accessibility/dlitem.js +3 -3
- package/core/audits/accessibility/document-title.js +3 -3
- package/core/audits/accessibility/duplicate-id-aria.js +3 -3
- package/core/audits/accessibility/empty-heading.js +3 -3
- package/core/audits/accessibility/form-field-multiple-labels.js +3 -3
- package/core/audits/accessibility/frame-title.js +3 -3
- package/core/audits/accessibility/heading-order.js +3 -3
- package/core/audits/accessibility/html-has-lang.js +3 -3
- package/core/audits/accessibility/html-lang-valid.js +3 -3
- package/core/audits/accessibility/html-xml-lang-mismatch.js +3 -3
- package/core/audits/accessibility/identical-links-same-purpose.js +3 -3
- package/core/audits/accessibility/image-alt.js +3 -3
- package/core/audits/accessibility/image-redundant-alt.js +4 -3
- package/core/audits/accessibility/input-button-name.js +3 -3
- package/core/audits/accessibility/input-image-alt.js +3 -3
- package/core/audits/accessibility/label-content-name-mismatch.js +3 -3
- package/core/audits/accessibility/label.js +3 -3
- package/core/audits/accessibility/landmark-one-main.js +3 -4
- package/core/audits/accessibility/link-in-text-block.js +3 -3
- package/core/audits/accessibility/link-name.js +3 -3
- package/core/audits/accessibility/list.js +3 -3
- package/core/audits/accessibility/listitem.js +3 -3
- package/core/audits/accessibility/meta-refresh.js +3 -3
- package/core/audits/accessibility/meta-viewport.js +3 -3
- package/core/audits/accessibility/object-alt.js +3 -3
- package/core/audits/accessibility/select-name.js +3 -3
- package/core/audits/accessibility/skip-link.js +3 -3
- package/core/audits/accessibility/tabindex.js +3 -3
- package/core/audits/accessibility/table-duplicate-name.js +4 -3
- package/core/audits/accessibility/table-fake-caption.js +3 -3
- package/core/audits/accessibility/target-size.js +3 -3
- package/core/audits/accessibility/td-has-header.js +3 -3
- package/core/audits/accessibility/td-headers-attr.js +3 -3
- package/core/audits/accessibility/th-has-data-cells.js +3 -3
- package/core/audits/accessibility/valid-lang.js +3 -3
- package/core/audits/accessibility/video-caption.js +3 -3
- package/core/audits/audit.d.ts +0 -4
- package/core/audits/audit.js +2 -13
- package/core/audits/insights/cls-culprits-insight.js +1 -1
- package/core/audits/insights/dom-size-insight.js +11 -7
- package/core/audits/insights/font-display-insight.js +3 -1
- package/core/audits/insights/image-delivery-insight.js +4 -1
- package/core/audits/insights/insight-audit.d.ts +6 -4
- package/core/audits/insights/insight-audit.js +27 -8
- package/core/audits/insights/third-parties-insight.js +1 -1
- package/core/audits/layout-shifts.js +1 -1
- package/core/audits/predictive-perf.js +2 -2
- package/core/audits/seo/crawlable-anchors.js +2 -3
- package/core/audits/seo/manual/structured-data.js +1 -1
- package/core/audits/server-response-time.d.ts +0 -5
- package/core/audits/server-response-time.js +12 -26
- package/core/computed/metrics/cumulative-layout-shift.js +2 -2
- package/core/computed/metrics/lantern-metric.js +3 -3
- package/core/computed/metrics/lcp-breakdown.d.ts +10 -5
- package/core/computed/metrics/lcp-breakdown.js +50 -22
- package/core/computed/metrics/time-to-first-byte.js +33 -10
- package/core/computed/metrics/timing-summary.js +3 -2
- package/core/computed/page-dependency-graph.js +1 -1
- package/core/computed/trace-engine-result.js +2 -2
- package/core/config/default-config.js +110 -152
- package/core/config/experimental-config.js +1 -32
- package/core/config/filters.js +6 -9
- package/core/config/lr-desktop-config.js +0 -1
- package/core/config/lr-mobile-config.js +0 -1
- package/core/gather/driver/target-manager.d.ts +1 -1
- package/core/gather/driver.d.ts +1 -1
- package/core/gather/gatherers/anchor-elements.js +8 -24
- package/core/gather/gatherers/image-elements.js +32 -6
- package/core/gather/gatherers/inspector-issues.js +1 -28
- package/core/gather/gatherers/trace-elements.d.ts +2 -11
- package/core/gather/gatherers/trace-elements.js +9 -39
- package/core/gather/navigation-runner.js +0 -3
- package/core/gather/session.d.ts +1 -1
- package/core/lib/asset-saver.d.ts +2 -2
- package/core/lib/asset-saver.js +33 -43
- package/core/lib/bf-cache-strings.js +10 -9
- package/core/lib/deprecations-strings.js +5 -5
- package/core/lib/emulation.d.ts +10 -0
- package/core/lib/emulation.js +21 -6
- package/core/lib/legacy-javascript/legacy-javascript.js +4 -11
- package/core/lib/network-request.d.ts +0 -7
- package/core/lib/network-request.js +0 -16
- package/core/lib/proto-preprocessor.js +10 -25
- package/core/runner.js +1 -8
- package/core/scoring.js +1 -1
- package/dist/report/bundle.esm.js +10 -49
- package/dist/report/flow.js +12 -51
- package/dist/report/standalone.js +11 -50
- package/flow-report/src/i18n/i18n.d.ts +4 -6
- package/package.json +16 -19
- package/readme.md +2 -2
- package/report/assets/styles.css +0 -39
- package/report/renderer/api.js +0 -1
- package/report/renderer/category-renderer.js +6 -0
- package/report/renderer/components.js +1 -1
- package/report/renderer/details-renderer.d.ts +1 -2
- package/report/renderer/details-renderer.js +0 -1
- package/report/renderer/dom.d.ts +0 -13
- package/report/renderer/dom.js +0 -38
- package/report/renderer/performance-category-renderer.d.ts +0 -26
- package/report/renderer/performance-category-renderer.js +10 -142
- package/report/renderer/report-ui-features.d.ts +0 -1
- package/report/renderer/report-ui-features.js +2 -13
- package/report/renderer/report-utils.d.ts +2 -3
- package/report/renderer/report-utils.js +4 -6
- package/report/types/report-renderer.d.ts +0 -6
- package/shared/localization/locales/ar-XB.json +107 -455
- package/shared/localization/locales/ar.json +107 -455
- package/shared/localization/locales/bg.json +96 -444
- package/shared/localization/locales/ca.json +96 -444
- package/shared/localization/locales/cs.json +96 -444
- package/shared/localization/locales/da.json +96 -444
- package/shared/localization/locales/de.json +96 -444
- package/shared/localization/locales/el.json +96 -444
- package/shared/localization/locales/en-GB.json +96 -444
- package/shared/localization/locales/en-US.json +116 -467
- package/shared/localization/locales/en-XA.json +93 -441
- package/shared/localization/locales/en-XL.json +116 -467
- package/shared/localization/locales/es-419.json +96 -444
- package/shared/localization/locales/es.json +96 -444
- package/shared/localization/locales/fi.json +96 -444
- package/shared/localization/locales/fil.json +96 -444
- package/shared/localization/locales/fr.json +96 -444
- package/shared/localization/locales/he.json +118 -466
- package/shared/localization/locales/hi.json +96 -444
- package/shared/localization/locales/hr.json +100 -448
- package/shared/localization/locales/hu.json +96 -444
- package/shared/localization/locales/id.json +96 -444
- package/shared/localization/locales/it.json +96 -444
- package/shared/localization/locales/ja.json +96 -444
- package/shared/localization/locales/ko.json +97 -445
- package/shared/localization/locales/lt.json +96 -444
- package/shared/localization/locales/lv.json +97 -445
- package/shared/localization/locales/nl.json +96 -444
- package/shared/localization/locales/no.json +96 -444
- package/shared/localization/locales/pl.json +96 -444
- package/shared/localization/locales/pt-PT.json +96 -444
- package/shared/localization/locales/pt.json +97 -445
- package/shared/localization/locales/ro.json +97 -445
- package/shared/localization/locales/ru.json +96 -444
- package/shared/localization/locales/sk.json +96 -444
- package/shared/localization/locales/sl.json +96 -444
- package/shared/localization/locales/sr-Latn.json +96 -444
- package/shared/localization/locales/sr.json +96 -444
- package/shared/localization/locales/sv.json +96 -444
- package/shared/localization/locales/ta.json +96 -444
- package/shared/localization/locales/te.json +97 -445
- package/shared/localization/locales/th.json +96 -444
- package/shared/localization/locales/tr.json +96 -444
- package/shared/localization/locales/uk.json +96 -444
- package/shared/localization/locales/vi.json +96 -444
- package/shared/localization/locales/zh-HK.json +96 -444
- package/shared/localization/locales/zh-TW.json +97 -445
- package/shared/localization/locales/zh.json +96 -444
- package/shared/localization/locales.d.ts +2 -0
- package/shared/localization/locales.js +130 -139
- package/shared/tsconfig.json +2 -0
- package/tsconfig-base.json +2 -2
- package/tsconfig.json +1 -4
- package/types/artifacts.d.ts +6 -81
- package/types/audit.d.ts +1 -1
- package/types/lhr/settings.d.ts +1 -1
- package/core/audits/byte-efficiency/duplicated-javascript.d.ts +0 -45
- package/core/audits/byte-efficiency/duplicated-javascript.js +0 -223
- package/core/audits/byte-efficiency/efficient-animated-content.d.ts +0 -22
- package/core/audits/byte-efficiency/efficient-animated-content.js +0 -93
- package/core/audits/byte-efficiency/legacy-javascript.d.ts +0 -28
- package/core/audits/byte-efficiency/legacy-javascript.js +0 -144
- package/core/audits/byte-efficiency/modern-image-formats.d.ts +0 -38
- package/core/audits/byte-efficiency/modern-image-formats.js +0 -187
- package/core/audits/byte-efficiency/offscreen-images.d.ts +0 -63
- package/core/audits/byte-efficiency/offscreen-images.js +0 -240
- package/core/audits/byte-efficiency/render-blocking-resources.d.ts +0 -53
- package/core/audits/byte-efficiency/render-blocking-resources.js +0 -312
- package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +0 -59
- package/core/audits/byte-efficiency/uses-long-cache-ttl.js +0 -293
- package/core/audits/byte-efficiency/uses-optimized-images.d.ts +0 -33
- package/core/audits/byte-efficiency/uses-optimized-images.js +0 -146
- package/core/audits/byte-efficiency/uses-responsive-images-snapshot.d.ts +0 -16
- package/core/audits/byte-efficiency/uses-responsive-images-snapshot.js +0 -106
- package/core/audits/byte-efficiency/uses-responsive-images.d.ts +0 -44
- package/core/audits/byte-efficiency/uses-responsive-images.js +0 -202
- package/core/audits/byte-efficiency/uses-text-compression.d.ts +0 -14
- package/core/audits/byte-efficiency/uses-text-compression.js +0 -108
- package/core/audits/critical-request-chains.d.ts +0 -44
- package/core/audits/critical-request-chains.js +0 -221
- package/core/audits/dobetterweb/dom-size.d.ts +0 -32
- package/core/audits/dobetterweb/dom-size.js +0 -182
- package/core/audits/dobetterweb/no-document-write.d.ts +0 -16
- package/core/audits/dobetterweb/no-document-write.js +0 -86
- package/core/audits/dobetterweb/uses-http2.d.ts +0 -72
- package/core/audits/dobetterweb/uses-http2.js +0 -276
- package/core/audits/dobetterweb/uses-passive-event-listeners.d.ts +0 -16
- package/core/audits/dobetterweb/uses-passive-event-listeners.js +0 -69
- package/core/audits/font-display.d.ts +0 -32
- package/core/audits/font-display.js +0 -195
- package/core/audits/largest-contentful-paint-element.d.ts +0 -34
- package/core/audits/largest-contentful-paint-element.js +0 -181
- package/core/audits/lcp-lazy-loaded.d.ts +0 -22
- package/core/audits/lcp-lazy-loaded.js +0 -115
- package/core/audits/metrics/first-meaningful-paint.d.ts +0 -12
- package/core/audits/metrics/first-meaningful-paint.js +0 -47
- package/core/audits/preload-fonts.d.ts +0 -25
- package/core/audits/preload-fonts.js +0 -97
- package/core/audits/prioritize-lcp-image.d.ts +0 -74
- package/core/audits/prioritize-lcp-image.js +0 -297
- package/core/audits/seo/font-size.d.ts +0 -24
- package/core/audits/seo/font-size.js +0 -344
- package/core/audits/third-party-facades.d.ts +0 -41
- package/core/audits/third-party-facades.js +0 -234
- package/core/audits/third-party-summary.d.ts +0 -78
- package/core/audits/third-party-summary.js +0 -236
- package/core/audits/uses-rel-preconnect.d.ts +0 -37
- package/core/audits/uses-rel-preconnect.js +0 -286
- package/core/audits/uses-rel-preload.d.ts +0 -57
- package/core/audits/uses-rel-preload.js +0 -263
- package/core/audits/viewport.d.ts +0 -17
- package/core/audits/viewport.js +0 -87
- package/core/audits/work-during-interaction.d.ts +0 -81
- package/core/audits/work-during-interaction.js +0 -287
- package/core/computed/critical-request-chains.d.ts +0 -42
- package/core/computed/critical-request-chains.js +0 -143
- package/core/computed/viewport-meta.d.ts +0 -37
- package/core/computed/viewport-meta.js +0 -71
- package/core/gather/gatherers/cache-contents.d.ts +0 -11
- package/core/gather/gatherers/cache-contents.js +0 -56
- package/core/gather/gatherers/devtools-log-compat.d.ts +0 -13
- package/core/gather/gatherers/devtools-log-compat.js +0 -35
- package/core/gather/gatherers/dobetterweb/domstats.d.ts +0 -10
- package/core/gather/gatherers/dobetterweb/domstats.js +0 -102
- package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +0 -48
- package/core/gather/gatherers/dobetterweb/optimized-images.js +0 -169
- package/core/gather/gatherers/dobetterweb/response-compression.d.ts +0 -23
- package/core/gather/gatherers/dobetterweb/response-compression.js +0 -136
- package/core/gather/gatherers/seo/font-size.d.ts +0 -131
- package/core/gather/gatherers/seo/font-size.js +0 -347
- package/core/gather/gatherers/trace-compat.d.ts +0 -13
- package/core/gather/gatherers/trace-compat.js +0 -35
- package/types/internal/metaviewport-parser.d.ts +0 -13
- package/types/internal/parse-cache-control.d.ts +0 -20
|
@@ -2,6 +2,8 @@ export type Locale = import("../../types/lhr/settings").Locale;
|
|
|
2
2
|
export type LhlMessages = Record<string, {
|
|
3
3
|
message: string;
|
|
4
4
|
}>;
|
|
5
|
+
/** @typedef {import('../../types/lhr/settings').Locale} Locale */
|
|
6
|
+
/** @typedef {Record<string, {message: string}>} LhlMessages */
|
|
5
7
|
/** @type {Record<Locale, LhlMessages>} */
|
|
6
8
|
export const locales: Record<Locale, LhlMessages>;
|
|
7
9
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -21,158 +21,149 @@
|
|
|
21
21
|
|
|
22
22
|
// TODO(paulirish): Centralize locale inheritance (combining this & i18n.lookupLocale()), adopt cldr parentLocale rules.
|
|
23
23
|
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
import
|
|
24
|
+
import ar from './locales/ar.json' with { type: 'json' };
|
|
25
|
+
import arXB from './locales/ar-XB.json' with { type: 'json' };
|
|
26
|
+
import bg from './locales/bg.json' with { type: 'json' };
|
|
27
|
+
import ca from './locales/ca.json' with { type: 'json'};
|
|
28
|
+
import cs from './locales/cs.json' with { type: 'json'};
|
|
29
|
+
import da from './locales/da.json' with { type: 'json'};
|
|
30
|
+
import de from './locales/de.json' with { type: 'json'};
|
|
31
|
+
import el from './locales/el.json' with { type: 'json'};
|
|
32
|
+
import enGB from './locales/en-GB.json' with { type: 'json'};
|
|
33
|
+
import enUS from './locales/en-US.json' with { type: 'json'};
|
|
34
|
+
import enXA from './locales/en-XA.json' with { type: 'json'};
|
|
35
|
+
import enXL from './locales/en-XL.json' with { type: 'json'};
|
|
36
|
+
import es from './locales/es.json' with { type: 'json'};
|
|
37
|
+
import es419 from './locales/es-419.json' with { type: 'json'};
|
|
38
|
+
import fi from './locales/fi.json' with { type: 'json'};
|
|
39
|
+
import fil from './locales/fil.json' with { type: 'json'};
|
|
40
|
+
import fr from './locales/fr.json' with { type: 'json'};
|
|
41
|
+
import he from './locales/he.json' with { type: 'json'};
|
|
42
|
+
import hi from './locales/hi.json' with { type: 'json'};
|
|
43
|
+
import hr from './locales/hr.json' with { type: 'json'};
|
|
44
|
+
import hu from './locales/hu.json' with { type: 'json'};
|
|
45
|
+
import id from './locales/id.json' with { type: 'json'};
|
|
46
|
+
import it from './locales/it.json' with { type: 'json'};
|
|
47
|
+
import ja from './locales/ja.json' with { type: 'json'};
|
|
48
|
+
import ko from './locales/ko.json' with { type: 'json'};
|
|
49
|
+
import lt from './locales/lt.json' with { type: 'json'};
|
|
50
|
+
import lv from './locales/lv.json' with { type: 'json'};
|
|
51
|
+
import nl from './locales/nl.json' with { type: 'json'};
|
|
52
|
+
import no from './locales/no.json' with { type: 'json'};
|
|
53
|
+
import pl from './locales/pl.json' with { type: 'json'};
|
|
54
|
+
import pt from './locales/pt.json' with { type: 'json'};
|
|
55
|
+
import ptPT from './locales/pt-PT.json' with { type: 'json'};
|
|
56
|
+
import ro from './locales/ro.json' with { type: 'json'};
|
|
57
|
+
import ru from './locales/ru.json' with { type: 'json'};
|
|
58
|
+
import sk from './locales/sk.json' with { type: 'json'};
|
|
59
|
+
import sl from './locales/sl.json' with { type: 'json'};
|
|
60
|
+
import sr from './locales/sr.json' with { type: 'json'};
|
|
61
|
+
import srLatn from './locales/sr-Latn.json' with { type: 'json'};
|
|
62
|
+
import sv from './locales/sv.json' with { type: 'json'};
|
|
63
|
+
import ta from './locales/ta.json' with { type: 'json'};
|
|
64
|
+
import te from './locales/te.json' with { type: 'json'};
|
|
65
|
+
import th from './locales/th.json' with { type: 'json'};
|
|
66
|
+
import tr from './locales/tr.json' with { type: 'json'};
|
|
67
|
+
import uk from './locales/uk.json' with { type: 'json'};
|
|
68
|
+
import vi from './locales/vi.json' with { type: 'json'};
|
|
69
|
+
import zh from './locales/zh.json' with { type: 'json'};
|
|
70
|
+
import zhHK from './locales/zh-HK.json' with { type: 'json'};
|
|
71
|
+
import zhTW from './locales/zh-TW.json' with { type: 'json'};
|
|
27
72
|
|
|
28
73
|
/** @typedef {import('../../types/lhr/settings').Locale} Locale */
|
|
29
74
|
/** @typedef {Record<string, {message: string}>} LhlMessages */
|
|
30
75
|
|
|
31
|
-
const moduleDir = getModuleDirectory(import.meta);
|
|
32
|
-
|
|
33
|
-
/** @type {Record<string, LhlMessages>} */
|
|
34
|
-
const files = {
|
|
35
|
-
'ar': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ar.json`, 'utf8')),
|
|
36
|
-
'ar-XB': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ar-XB.json`, 'utf8')),
|
|
37
|
-
'bg': JSON.parse(fs.readFileSync(`${moduleDir}/locales/bg.json`, 'utf8')),
|
|
38
|
-
'ca': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ca.json`, 'utf8')),
|
|
39
|
-
'cs': JSON.parse(fs.readFileSync(`${moduleDir}/locales/cs.json`, 'utf8')),
|
|
40
|
-
'da': JSON.parse(fs.readFileSync(`${moduleDir}/locales/da.json`, 'utf8')),
|
|
41
|
-
'de': JSON.parse(fs.readFileSync(`${moduleDir}/locales/de.json`, 'utf8')),
|
|
42
|
-
'el': JSON.parse(fs.readFileSync(`${moduleDir}/locales/el.json`, 'utf8')),
|
|
43
|
-
'en-GB': JSON.parse(fs.readFileSync(`${moduleDir}/locales/en-GB.json`, 'utf8')),
|
|
44
|
-
'en-US': JSON.parse(fs.readFileSync(`${moduleDir}/locales/en-US.json`, 'utf8')),
|
|
45
|
-
'en-XA': JSON.parse(fs.readFileSync(`${moduleDir}/locales/en-XA.json`, 'utf8')),
|
|
46
|
-
'en-XL': JSON.parse(fs.readFileSync(`${moduleDir}/locales/en-XL.json`, 'utf8')),
|
|
47
|
-
'es': JSON.parse(fs.readFileSync(`${moduleDir}/locales/es.json`, 'utf8')),
|
|
48
|
-
'es-419': JSON.parse(fs.readFileSync(`${moduleDir}/locales/es-419.json`, 'utf8')),
|
|
49
|
-
'fi': JSON.parse(fs.readFileSync(`${moduleDir}/locales/fi.json`, 'utf8')),
|
|
50
|
-
'fil': JSON.parse(fs.readFileSync(`${moduleDir}/locales/fil.json`, 'utf8')),
|
|
51
|
-
'fr': JSON.parse(fs.readFileSync(`${moduleDir}/locales/fr.json`, 'utf8')),
|
|
52
|
-
'he': JSON.parse(fs.readFileSync(`${moduleDir}/locales/he.json`, 'utf8')),
|
|
53
|
-
'hi': JSON.parse(fs.readFileSync(`${moduleDir}/locales/hi.json`, 'utf8')),
|
|
54
|
-
'hr': JSON.parse(fs.readFileSync(`${moduleDir}/locales/hr.json`, 'utf8')),
|
|
55
|
-
'hu': JSON.parse(fs.readFileSync(`${moduleDir}/locales/hu.json`, 'utf8')),
|
|
56
|
-
'id': JSON.parse(fs.readFileSync(`${moduleDir}/locales/id.json`, 'utf8')),
|
|
57
|
-
'it': JSON.parse(fs.readFileSync(`${moduleDir}/locales/it.json`, 'utf8')),
|
|
58
|
-
'ja': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ja.json`, 'utf8')),
|
|
59
|
-
'ko': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ko.json`, 'utf8')),
|
|
60
|
-
'lt': JSON.parse(fs.readFileSync(`${moduleDir}/locales/lt.json`, 'utf8')),
|
|
61
|
-
'lv': JSON.parse(fs.readFileSync(`${moduleDir}/locales/lv.json`, 'utf8')),
|
|
62
|
-
'nl': JSON.parse(fs.readFileSync(`${moduleDir}/locales/nl.json`, 'utf8')),
|
|
63
|
-
'no': JSON.parse(fs.readFileSync(`${moduleDir}/locales/no.json`, 'utf8')),
|
|
64
|
-
'pl': JSON.parse(fs.readFileSync(`${moduleDir}/locales/pl.json`, 'utf8')),
|
|
65
|
-
'pt': JSON.parse(fs.readFileSync(`${moduleDir}/locales/pt.json`, 'utf8')),
|
|
66
|
-
'pt-PT': JSON.parse(fs.readFileSync(`${moduleDir}/locales/pt-PT.json`, 'utf8')),
|
|
67
|
-
'ro': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ro.json`, 'utf8')),
|
|
68
|
-
'ru': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ru.json`, 'utf8')),
|
|
69
|
-
'sk': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sk.json`, 'utf8')),
|
|
70
|
-
'sl': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sl.json`, 'utf8')),
|
|
71
|
-
'sr': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sr.json`, 'utf8')),
|
|
72
|
-
'sr-Latn': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sr-Latn.json`, 'utf8')),
|
|
73
|
-
'sv': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sv.json`, 'utf8')),
|
|
74
|
-
'ta': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ta.json`, 'utf8')),
|
|
75
|
-
'te': JSON.parse(fs.readFileSync(`${moduleDir}/locales/te.json`, 'utf8')),
|
|
76
|
-
'th': JSON.parse(fs.readFileSync(`${moduleDir}/locales/th.json`, 'utf8')),
|
|
77
|
-
'tr': JSON.parse(fs.readFileSync(`${moduleDir}/locales/tr.json`, 'utf8')),
|
|
78
|
-
'uk': JSON.parse(fs.readFileSync(`${moduleDir}/locales/uk.json`, 'utf8')),
|
|
79
|
-
'vi': JSON.parse(fs.readFileSync(`${moduleDir}/locales/vi.json`, 'utf8')),
|
|
80
|
-
'zh': JSON.parse(fs.readFileSync(`${moduleDir}/locales/zh.json`, 'utf8')),
|
|
81
|
-
'zh-HK': JSON.parse(fs.readFileSync(`${moduleDir}/locales/zh-HK.json`, 'utf8')),
|
|
82
|
-
'zh-TW': JSON.parse(fs.readFileSync(`${moduleDir}/locales/zh-TW.json`, 'utf8')),
|
|
83
|
-
};
|
|
84
|
-
|
|
85
76
|
// The keys within this const must exactly match the LH.Locale type in externs.d.ts
|
|
86
77
|
/** @type {Record<Locale, LhlMessages>} */
|
|
87
78
|
const locales = {
|
|
88
|
-
'en-US':
|
|
89
|
-
'en':
|
|
79
|
+
'en-US': enUS, // The 'source' strings, with descriptions
|
|
80
|
+
'en': enUS, // According to CLDR/ICU, 'en' == 'en-US' dates/numbers (Why?!)
|
|
90
81
|
|
|
91
82
|
// TODO: en-GB has just ~10 messages that are different from en-US. We should only ship those.
|
|
92
|
-
'en-AU':
|
|
93
|
-
'en-GB':
|
|
94
|
-
'en-IE':
|
|
95
|
-
'en-SG':
|
|
96
|
-
'en-ZA':
|
|
97
|
-
'en-IN':
|
|
83
|
+
'en-AU': enGB, // Alias of 'en-GB'
|
|
84
|
+
'en-GB': enGB, // Alias of 'en-GB'
|
|
85
|
+
'en-IE': enGB, // Alias of 'en-GB'
|
|
86
|
+
'en-SG': enGB, // Alias of 'en-GB'
|
|
87
|
+
'en-ZA': enGB, // Alias of 'en-GB'
|
|
88
|
+
'en-IN': enGB, // Alias of 'en-GB'
|
|
98
89
|
|
|
99
90
|
// All locales from here have a messages file, though we allow fallback to the base locale when the files are identical
|
|
100
|
-
'ar-XB':
|
|
101
|
-
'ar':
|
|
102
|
-
'bg':
|
|
103
|
-
'ca':
|
|
104
|
-
'cs':
|
|
105
|
-
'da':
|
|
106
|
-
'de':
|
|
107
|
-
'el':
|
|
108
|
-
'en-XA':
|
|
109
|
-
'en-XL':
|
|
110
|
-
'es':
|
|
111
|
-
'es-419':
|
|
91
|
+
'ar-XB': arXB, // psuedolocalization
|
|
92
|
+
'ar': ar,
|
|
93
|
+
'bg': bg,
|
|
94
|
+
'ca': ca,
|
|
95
|
+
'cs': cs,
|
|
96
|
+
'da': da,
|
|
97
|
+
'de': de, // de-AT, de-CH identical, so they fall back into de
|
|
98
|
+
'el': el,
|
|
99
|
+
'en-XA': enXA, // psuedolocalization
|
|
100
|
+
'en-XL': enXL, // local psuedolocalization
|
|
101
|
+
'es': es,
|
|
102
|
+
'es-419': es419,
|
|
112
103
|
// Aliases of es-419: https://raw.githubusercontent.com/unicode-cldr/cldr-core/master/supplemental/parentLocales.json
|
|
113
|
-
'es-AR':
|
|
114
|
-
'es-BO':
|
|
115
|
-
'es-BR':
|
|
116
|
-
'es-BZ':
|
|
117
|
-
'es-CL':
|
|
118
|
-
'es-CO':
|
|
119
|
-
'es-CR':
|
|
120
|
-
'es-CU':
|
|
121
|
-
'es-DO':
|
|
122
|
-
'es-EC':
|
|
123
|
-
'es-GT':
|
|
124
|
-
'es-HN':
|
|
125
|
-
'es-MX':
|
|
126
|
-
'es-NI':
|
|
127
|
-
'es-PA':
|
|
128
|
-
'es-PE':
|
|
129
|
-
'es-PR':
|
|
130
|
-
'es-PY':
|
|
131
|
-
'es-SV':
|
|
132
|
-
'es-US':
|
|
133
|
-
'es-UY':
|
|
134
|
-
'es-VE':
|
|
104
|
+
'es-AR': es419,
|
|
105
|
+
'es-BO': es419,
|
|
106
|
+
'es-BR': es419,
|
|
107
|
+
'es-BZ': es419,
|
|
108
|
+
'es-CL': es419,
|
|
109
|
+
'es-CO': es419,
|
|
110
|
+
'es-CR': es419,
|
|
111
|
+
'es-CU': es419,
|
|
112
|
+
'es-DO': es419,
|
|
113
|
+
'es-EC': es419,
|
|
114
|
+
'es-GT': es419,
|
|
115
|
+
'es-HN': es419,
|
|
116
|
+
'es-MX': es419,
|
|
117
|
+
'es-NI': es419,
|
|
118
|
+
'es-PA': es419,
|
|
119
|
+
'es-PE': es419,
|
|
120
|
+
'es-PR': es419,
|
|
121
|
+
'es-PY': es419,
|
|
122
|
+
'es-SV': es419,
|
|
123
|
+
'es-US': es419,
|
|
124
|
+
'es-UY': es419,
|
|
125
|
+
'es-VE': es419,
|
|
135
126
|
|
|
136
|
-
'fi':
|
|
137
|
-
'fil':
|
|
138
|
-
'fr':
|
|
139
|
-
'he':
|
|
140
|
-
'hi':
|
|
141
|
-
'hr':
|
|
142
|
-
'hu':
|
|
143
|
-
'gsw':
|
|
144
|
-
'id':
|
|
145
|
-
'in':
|
|
146
|
-
'it':
|
|
147
|
-
'iw':
|
|
148
|
-
'ja':
|
|
149
|
-
'ko':
|
|
150
|
-
'lt':
|
|
151
|
-
'lv':
|
|
152
|
-
'mo':
|
|
153
|
-
'nl':
|
|
154
|
-
'nb':
|
|
155
|
-
'no':
|
|
156
|
-
'pl':
|
|
157
|
-
'pt':
|
|
158
|
-
'pt-PT':
|
|
159
|
-
'ro':
|
|
160
|
-
'ru':
|
|
161
|
-
'sk':
|
|
162
|
-
'sl':
|
|
163
|
-
'sr':
|
|
164
|
-
'sr-Latn':
|
|
165
|
-
'sv':
|
|
166
|
-
'ta':
|
|
167
|
-
'te':
|
|
168
|
-
'th':
|
|
169
|
-
'tl':
|
|
170
|
-
'tr':
|
|
171
|
-
'uk':
|
|
172
|
-
'vi':
|
|
173
|
-
'zh':
|
|
174
|
-
'zh-HK':
|
|
175
|
-
'zh-TW':
|
|
127
|
+
'fi': fi,
|
|
128
|
+
'fil': fil,
|
|
129
|
+
'fr': fr, // fr-CH identical, so it falls back into fr
|
|
130
|
+
'he': he,
|
|
131
|
+
'hi': hi,
|
|
132
|
+
'hr': hr,
|
|
133
|
+
'hu': hu,
|
|
134
|
+
'gsw': de, // swiss german. identical (for our purposes) to 'de'
|
|
135
|
+
'id': id,
|
|
136
|
+
'in': id, // Alias of 'id'
|
|
137
|
+
'it': it,
|
|
138
|
+
'iw': he, // Alias of 'he'
|
|
139
|
+
'ja': ja,
|
|
140
|
+
'ko': ko,
|
|
141
|
+
'lt': lt,
|
|
142
|
+
'lv': lv,
|
|
143
|
+
'mo': ro, // Alias of 'ro'
|
|
144
|
+
'nl': nl,
|
|
145
|
+
'nb': no, // Alias of 'no'
|
|
146
|
+
'no': no,
|
|
147
|
+
'pl': pl,
|
|
148
|
+
'pt': pt, // pt-BR identical, so it falls back into pt
|
|
149
|
+
'pt-PT': ptPT,
|
|
150
|
+
'ro': ro,
|
|
151
|
+
'ru': ru,
|
|
152
|
+
'sk': sk,
|
|
153
|
+
'sl': sl,
|
|
154
|
+
'sr': sr,
|
|
155
|
+
'sr-Latn': srLatn,
|
|
156
|
+
'sv': sv,
|
|
157
|
+
'ta': ta,
|
|
158
|
+
'te': te,
|
|
159
|
+
'th': th,
|
|
160
|
+
'tl': fil, // Alias of 'fil'
|
|
161
|
+
'tr': tr,
|
|
162
|
+
'uk': uk,
|
|
163
|
+
'vi': vi,
|
|
164
|
+
'zh': zh, // aka ZH-Hans, sometimes seen as zh-CN, zh-Hans-CN, Simplified Chinese
|
|
165
|
+
'zh-HK': zhHK, // aka zh-Hant-HK. Note: yue-Hant-HK is not supported.
|
|
166
|
+
'zh-TW': zhTW, // aka zh-Hant, zh-Hant-TW, Traditional Chinese
|
|
176
167
|
};
|
|
177
168
|
|
|
178
169
|
export {locales};
|
package/shared/tsconfig.json
CHANGED
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
// Only include `@types/node` from node_modules/.
|
|
7
7
|
"types": ["node"],
|
|
8
8
|
// "listFiles": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
9
10
|
},
|
|
10
11
|
"references": [
|
|
11
12
|
{"path": "../types/lhr/"},
|
|
12
13
|
],
|
|
13
14
|
"include": [
|
|
14
15
|
"**/*.js",
|
|
16
|
+
"**/*.json",
|
|
15
17
|
"types/**/*.d.ts",
|
|
16
18
|
],
|
|
17
19
|
"exclude": [
|
package/tsconfig-base.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"core/test/fixtures/unresolved-perflog.json",
|
|
26
26
|
"core/test/fixtures/traces/lcp-m78.devtools.log.json",
|
|
27
27
|
"core/lib/legacy-javascript/polyfill-graph-data.json",
|
|
28
|
+
"core/lib/legacy-javascript/polyfill-module-data.json",
|
|
28
29
|
"shared/localization/locales/en-US.json",
|
|
29
30
|
],
|
|
30
31
|
"exclude": [
|
|
@@ -43,11 +44,8 @@
|
|
|
43
44
|
"core/test/config/default-config-test.js",
|
|
44
45
|
"core/test/gather/driver/wait-for-condition-test.js",
|
|
45
46
|
"core/test/gather/gatherers/accessibility-test.js",
|
|
46
|
-
"core/test/gather/gatherers/cache-contents-test.js",
|
|
47
47
|
"core/test/gather/gatherers/console-messages-test.js",
|
|
48
48
|
"core/test/gather/gatherers/devtools-log-test.js",
|
|
49
|
-
"core/test/gather/gatherers/dobetterweb/optimized-images-test.js",
|
|
50
|
-
"core/test/gather/gatherers/dobetterweb/response-compression-test.js",
|
|
51
49
|
"core/test/gather/gatherers/full-page-screenshot-test.js",
|
|
52
50
|
"core/test/gather/gatherers/global-listeners-test.js",
|
|
53
51
|
"core/test/gather/gatherers/html-without-javascript-test.js",
|
|
@@ -55,7 +53,6 @@
|
|
|
55
53
|
"core/test/gather/gatherers/link-elements-test.js",
|
|
56
54
|
"core/test/gather/gatherers/offline-test.js",
|
|
57
55
|
"core/test/gather/gatherers/runtime-exceptions-test.js",
|
|
58
|
-
"core/test/gather/gatherers/seo/font-size-test.js",
|
|
59
56
|
"core/test/gather/gatherers/source-maps-test.js",
|
|
60
57
|
"core/test/gather/gatherers/stack-collector-test.js",
|
|
61
58
|
"core/test/gather/gatherers/start-url-test.js",
|
package/types/artifacts.d.ts
CHANGED
|
@@ -107,8 +107,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
|
|
|
107
107
|
AnchorElements: Artifacts.AnchorElement[];
|
|
108
108
|
/** Errors when attempting to use the back/forward cache. */
|
|
109
109
|
BFCacheFailures: Artifacts.BFCacheFailure[];
|
|
110
|
-
/** Array of all URLs cached in CacheStorage. */
|
|
111
|
-
CacheContents: string[];
|
|
112
110
|
/** CSS coverage information for styles used by page's final state. */
|
|
113
111
|
CSSUsage: Crdp.CSS.RuleUsage[];
|
|
114
112
|
/** The log of devtools protocol activity if there was a page load error and Chrome navigated to a `chrome-error://` page. */
|
|
@@ -116,10 +114,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
|
|
|
116
114
|
/** Information on the document's doctype(or null if not present), specifically the name, publicId, and systemId.
|
|
117
115
|
All properties default to an empty string if not present */
|
|
118
116
|
Doctype: Artifacts.Doctype | null;
|
|
119
|
-
/** Information on the size of all DOM nodes in the page and the most extreme members. */
|
|
120
|
-
DOMStats: Artifacts.DOMStats;
|
|
121
|
-
/** Information on poorly sized font usage and the text affected by it. */
|
|
122
|
-
FontSize: Artifacts.FontSize;
|
|
123
117
|
/** All the iframe elements in the page. */
|
|
124
118
|
IFrameElements: Artifacts.IFrameElement[];
|
|
125
119
|
/** All the input elements, including associated form and label elements. */
|
|
@@ -133,10 +127,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
|
|
|
133
127
|
JsUsage: Record<string, Omit<Crdp.Profiler.ScriptCoverage, 'url'>>;
|
|
134
128
|
/** The user agent string that Lighthouse used to load the page. Set to the empty string if unknown. */
|
|
135
129
|
NetworkUserAgent: string;
|
|
136
|
-
/** Size and compression opportunity information for all the images in the page. */
|
|
137
|
-
OptimizedImages: Array<Artifacts.OptimizedImage | Artifacts.OptimizedImageError>;
|
|
138
|
-
/** Size info of all network records sent without compression and their size after gzipping. */
|
|
139
|
-
ResponseCompression: {requestId: string, url: string, mimeType: string, transferSize: number, resourceSize: number, gzipSize?: number}[];
|
|
140
130
|
/** Information on fetching and the content of the /robots.txt file. */
|
|
141
131
|
RobotsTxt: {status: number|null, content: string|null, errorMessage?: string};
|
|
142
132
|
/** Source maps of scripts executed in the page. */
|
|
@@ -149,10 +139,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
|
|
|
149
139
|
TraceError: Trace;
|
|
150
140
|
/** Elements associated with metrics (ie: Largest Contentful Paint element). */
|
|
151
141
|
TraceElements: Artifacts.TraceElement[];
|
|
152
|
-
/** COMPAT: A set of traces, keyed by passName. */
|
|
153
|
-
traces: {[passName: string]: Trace};
|
|
154
|
-
/** COMPAT: A set of DevTools debugger protocol records, keyed by passName. */
|
|
155
|
-
devtoolsLogs: {[passName: string]: DevtoolsLog};
|
|
156
142
|
}
|
|
157
143
|
|
|
158
144
|
declare module Artifacts {
|
|
@@ -230,13 +216,6 @@ declare module Artifacts {
|
|
|
230
216
|
documentCompatMode: string;
|
|
231
217
|
}
|
|
232
218
|
|
|
233
|
-
interface DOMStats {
|
|
234
|
-
/** The total number of elements found within the page's body. */
|
|
235
|
-
totalBodyElements: number;
|
|
236
|
-
width: NodeDetails & {max: number;};
|
|
237
|
-
depth: NodeDetails & {max: number;};
|
|
238
|
-
}
|
|
239
|
-
|
|
240
219
|
interface IFrameElement {
|
|
241
220
|
/** The `id` attribute of the iframe. */
|
|
242
221
|
id: string,
|
|
@@ -369,9 +348,6 @@ declare module Artifacts {
|
|
|
369
348
|
listeners?: Array<{
|
|
370
349
|
type: Crdp.DOMDebugger.EventListener['type']
|
|
371
350
|
}>
|
|
372
|
-
ancestorListeners?: Array<{
|
|
373
|
-
type: Crdp.DOMDebugger.EventListener['type']
|
|
374
|
-
}>
|
|
375
351
|
}
|
|
376
352
|
|
|
377
353
|
type BFCacheReasonMap = {
|
|
@@ -384,37 +360,6 @@ declare module Artifacts {
|
|
|
384
360
|
notRestoredReasonsTree: BFCacheNotRestoredReasonsTree;
|
|
385
361
|
}
|
|
386
362
|
|
|
387
|
-
interface FontSize {
|
|
388
|
-
totalTextLength: number;
|
|
389
|
-
failingTextLength: number;
|
|
390
|
-
analyzedFailingTextLength: number;
|
|
391
|
-
/** Elements that contain a text node that failed size criteria. */
|
|
392
|
-
analyzedFailingNodesData: Array<{
|
|
393
|
-
/* nodeId of the failing TextNode. */
|
|
394
|
-
nodeId: number;
|
|
395
|
-
fontSize: number;
|
|
396
|
-
textLength: number;
|
|
397
|
-
parentNode: {
|
|
398
|
-
backendNodeId: number;
|
|
399
|
-
attributes: string[];
|
|
400
|
-
nodeName: string;
|
|
401
|
-
parentNode?: {
|
|
402
|
-
backendNodeId: number;
|
|
403
|
-
attributes: string[];
|
|
404
|
-
nodeName: string;
|
|
405
|
-
};
|
|
406
|
-
};
|
|
407
|
-
cssRule?: {
|
|
408
|
-
type: 'Regular' | 'Inline' | 'Attributes';
|
|
409
|
-
range?: {startLine: number, startColumn: number};
|
|
410
|
-
parentRule?: {origin: Crdp.CSS.StyleSheetOrigin, selectors: {text: string}[]};
|
|
411
|
-
styleSheetId?: string;
|
|
412
|
-
stylesheet?: Crdp.CSS.CSSStyleSheetHeader;
|
|
413
|
-
cssProperties?: Array<Crdp.CSS.CSSProperty>;
|
|
414
|
-
}
|
|
415
|
-
}>
|
|
416
|
-
}
|
|
417
|
-
|
|
418
363
|
// TODO(bckenny): real type for parsed manifest.
|
|
419
364
|
type Manifest = ReturnType<typeof parseManifest>;
|
|
420
365
|
|
|
@@ -483,30 +428,8 @@ declare module Artifacts {
|
|
|
483
428
|
fetchPriority?: string;
|
|
484
429
|
}
|
|
485
430
|
|
|
486
|
-
interface OptimizedImage {
|
|
487
|
-
failed: false;
|
|
488
|
-
originalSize: number;
|
|
489
|
-
jpegSize?: number;
|
|
490
|
-
webpSize?: number;
|
|
491
|
-
|
|
492
|
-
requestId: string;
|
|
493
|
-
url: string;
|
|
494
|
-
mimeType: string;
|
|
495
|
-
resourceSize: number;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
interface OptimizedImageError {
|
|
499
|
-
failed: true;
|
|
500
|
-
errMsg: string;
|
|
501
|
-
|
|
502
|
-
requestId: string;
|
|
503
|
-
url: string;
|
|
504
|
-
mimeType: string;
|
|
505
|
-
resourceSize: number;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
431
|
interface TraceElement {
|
|
509
|
-
traceEventType: 'trace-engine'|'
|
|
432
|
+
traceEventType: 'trace-engine'|'layout-shift'|'animation';
|
|
510
433
|
node: NodeDetails;
|
|
511
434
|
nodeId: number;
|
|
512
435
|
animations?: {name?: string, failureReasonsMask?: number, unsupportedProperties?: string[]}[];
|
|
@@ -514,7 +437,7 @@ declare module Artifacts {
|
|
|
514
437
|
}
|
|
515
438
|
|
|
516
439
|
interface TraceEngineResult {
|
|
517
|
-
|
|
440
|
+
data: TraceEngine.Handlers.Types.HandlerData;
|
|
518
441
|
insights: TraceEngine.Insights.Types.TraceInsightSets;
|
|
519
442
|
}
|
|
520
443
|
|
|
@@ -676,8 +599,9 @@ declare module Artifacts {
|
|
|
676
599
|
largestContentfulPaintAllFramesTs: number | undefined;
|
|
677
600
|
timeToFirstByte: number | undefined;
|
|
678
601
|
timeToFirstByteTs: number | undefined;
|
|
679
|
-
|
|
680
|
-
|
|
602
|
+
lcpLoadDelay: number | undefined;
|
|
603
|
+
lcpLoadDuration: number | undefined;
|
|
604
|
+
lcpRenderDelay: number | undefined;
|
|
681
605
|
interactive: number | undefined;
|
|
682
606
|
interactiveTs: number | undefined;
|
|
683
607
|
speedIndex: number | undefined;
|
|
@@ -929,6 +853,7 @@ export interface TraceEvent {
|
|
|
929
853
|
initiator?: {type: string, url?: string, stack?: any};
|
|
930
854
|
protocol?: string;
|
|
931
855
|
finishTime?: number;
|
|
856
|
+
headers?: Array<{name: string, value: string}>;
|
|
932
857
|
};
|
|
933
858
|
frame?: string;
|
|
934
859
|
name?: string;
|
package/types/audit.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ declare module Audit {
|
|
|
64
64
|
supportedModes?: Gatherer.GatherMode[],
|
|
65
65
|
/** A number indicating how much guidance Lighthouse provides to solve the problem in this audit on a 1-3 scale. Higher means more guidance. */
|
|
66
66
|
guidanceLevel?: number;
|
|
67
|
-
/** A list of audit ids that this audit
|
|
67
|
+
/** A list of audit ids that this audit replaced in v13. Only used now to associate stack packs for removed audits with the new insight audit. */
|
|
68
68
|
replacesAudits?: string[];
|
|
69
69
|
}
|
|
70
70
|
|
package/types/lhr/settings.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export type ScreenEmulationSettings = {
|
|
|
112
112
|
pauseAfterFcpMs?: number;
|
|
113
113
|
/** The number of milliseconds to wait after the load event until the page should be considered loaded. */
|
|
114
114
|
pauseAfterLoadMs?: number;
|
|
115
|
-
/** The number of milliseconds to wait between high priority network requests or 3
|
|
115
|
+
/** The number of milliseconds to wait between high priority network requests or 3 simultaneous requests before the page should be considered loaded. */
|
|
116
116
|
networkQuietThresholdMs?: number;
|
|
117
117
|
/** The number of milliseconds to wait between long tasks until the page should be considered loaded. */
|
|
118
118
|
cpuQuietThresholdMs?: number;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export default DuplicatedJavascript;
|
|
2
|
-
export type ByteEfficiencyProduct = import("./byte-efficiency-audit.js").ByteEfficiencyProduct;
|
|
3
|
-
export type Item = LH.Audit.ByteEfficiencyItem & {
|
|
4
|
-
source: string;
|
|
5
|
-
subItems: {
|
|
6
|
-
type: "subitems";
|
|
7
|
-
items: SubItem[];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export type SubItem = {
|
|
11
|
-
url: string;
|
|
12
|
-
sourceTransferBytes?: number;
|
|
13
|
-
};
|
|
14
|
-
declare class DuplicatedJavascript extends ByteEfficiencyAudit {
|
|
15
|
-
/**
|
|
16
|
-
* @param {string} source
|
|
17
|
-
*/
|
|
18
|
-
static _getNodeModuleName(source: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* @param {LH.Artifacts} artifacts
|
|
21
|
-
* @param {LH.Audit.Context} context
|
|
22
|
-
*/
|
|
23
|
-
static _getDuplicationGroupedByNodeModules(artifacts: LH.Artifacts, context: LH.Audit.Context): Promise<Map<string, {
|
|
24
|
-
scriptId: string;
|
|
25
|
-
scriptUrl: string;
|
|
26
|
-
resourceSize: number;
|
|
27
|
-
}[]>>;
|
|
28
|
-
/**
|
|
29
|
-
* Each details item returned is a module with subItems for each resource that
|
|
30
|
-
* includes it. The wastedBytes for the details item is the number of bytes
|
|
31
|
-
* occupied by the sum of all but the largest copy of the module. wastedBytesByUrl
|
|
32
|
-
* attributes the cost of the bytes to a specific resource, for use by lantern.
|
|
33
|
-
* @param {LH.Artifacts} artifacts
|
|
34
|
-
* @param {Array<LH.Artifacts.NetworkRequest>} networkRecords
|
|
35
|
-
* @param {LH.Audit.Context} context
|
|
36
|
-
* @return {Promise<ByteEfficiencyProduct>}
|
|
37
|
-
*/
|
|
38
|
-
static audit_(artifacts: LH.Artifacts, networkRecords: Array<LH.Artifacts.NetworkRequest>, context: LH.Audit.Context): Promise<ByteEfficiencyProduct>;
|
|
39
|
-
}
|
|
40
|
-
export namespace UIStrings {
|
|
41
|
-
let title: string;
|
|
42
|
-
let description: string;
|
|
43
|
-
}
|
|
44
|
-
import { ByteEfficiencyAudit } from './byte-efficiency-audit.js';
|
|
45
|
-
//# sourceMappingURL=duplicated-javascript.d.ts.map
|