lighthouse 11.2.0 → 11.3.0
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.d.ts +5 -1
- package/cli/cli-flags.js +5 -1
- package/cli/test/smokehouse/__snapshots__/report-assert-test.js.snap +2 -2
- package/cli/test/smokehouse/frontends/smokehouse-bin.js +18 -7
- package/cli/test/smokehouse/lighthouse-runners/bundle.d.ts +2 -4
- package/cli/test/smokehouse/lighthouse-runners/bundle.js +8 -4
- package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +2 -4
- package/cli/test/smokehouse/lighthouse-runners/cli.js +5 -3
- package/cli/test/smokehouse/lighthouse-runners/devtools.d.ts +2 -1
- package/cli/test/smokehouse/lighthouse-runners/devtools.js +3 -1
- package/cli/test/smokehouse/smokehouse.d.ts +4 -2
- package/cli/test/smokehouse/smokehouse.js +10 -7
- package/core/audits/byte-efficiency/legacy-javascript.js +2 -2
- package/core/audits/image-size-responsive.js +1 -1
- package/core/audits/layout-shift-elements.js +1 -1
- package/core/audits/lcp-lazy-loaded.js +2 -2
- package/core/audits/long-tasks.js +1 -1
- package/core/audits/metrics/cumulative-layout-shift.js +2 -2
- package/core/audits/metrics/interaction-to-next-paint.js +2 -2
- package/core/audits/metrics/largest-contentful-paint.js +1 -1
- package/core/audits/no-unload-listeners.js +1 -1
- package/core/audits/preload-fonts.js +1 -1
- package/core/audits/prioritize-lcp-image.js +1 -1
- package/core/audits/unsized-images.js +1 -1
- package/core/audits/work-during-interaction.js +1 -1
- package/core/config/config.d.ts +1 -2
- package/core/config/config.js +18 -62
- package/core/config/constants.d.ts +1 -3
- package/core/config/constants.js +4 -18
- package/core/config/default-config.js +8 -8
- package/core/config/filters.d.ts +0 -8
- package/core/config/filters.js +0 -28
- package/core/config/validation.d.ts +4 -15
- package/core/config/validation.js +18 -63
- package/core/gather/base-artifacts.d.ts +2 -2
- package/core/gather/base-artifacts.js +5 -5
- package/core/gather/driver/navigation.d.ts +1 -1
- package/core/gather/driver/navigation.js +1 -1
- package/core/gather/driver/prepare.d.ts +3 -18
- package/core/gather/driver/prepare.js +21 -43
- package/core/gather/driver/storage.d.ts +2 -1
- package/core/gather/driver/storage.js +3 -12
- package/core/gather/gatherers/inspector-issues.js +1 -0
- package/core/gather/navigation-runner.d.ts +3 -31
- package/core/gather/navigation-runner.js +46 -113
- package/core/lib/navigation-error.d.ts +8 -3
- package/core/lib/navigation-error.js +19 -11
- package/dist/report/bundle.esm.js +4 -4
- package/dist/report/flow.js +7 -7
- package/dist/report/standalone.js +5 -5
- package/package.json +8 -8
- package/report/renderer/performance-category-renderer.js +2 -1
- package/shared/localization/locales/ar-XB.json +78 -75
- package/shared/localization/locales/ar.json +78 -75
- package/shared/localization/locales/bg.json +78 -75
- package/shared/localization/locales/ca.json +78 -75
- package/shared/localization/locales/cs.json +78 -75
- package/shared/localization/locales/da.json +78 -75
- package/shared/localization/locales/de.json +81 -78
- package/shared/localization/locales/el.json +84 -81
- package/shared/localization/locales/en-GB.json +78 -75
- package/shared/localization/locales/en-US.json +26 -23
- package/shared/localization/locales/en-XA.json +78 -75
- package/shared/localization/locales/en-XL.json +26 -23
- package/shared/localization/locales/es-419.json +78 -75
- package/shared/localization/locales/es.json +78 -75
- package/shared/localization/locales/fi.json +79 -76
- package/shared/localization/locales/fil.json +78 -75
- package/shared/localization/locales/fr.json +78 -75
- package/shared/localization/locales/he.json +78 -75
- package/shared/localization/locales/hi.json +78 -75
- package/shared/localization/locales/hr.json +78 -75
- package/shared/localization/locales/hu.json +78 -75
- package/shared/localization/locales/id.json +78 -75
- package/shared/localization/locales/it.json +79 -76
- package/shared/localization/locales/ja.json +78 -75
- package/shared/localization/locales/ko.json +78 -75
- package/shared/localization/locales/lt.json +78 -75
- package/shared/localization/locales/lv.json +78 -75
- package/shared/localization/locales/nl.json +78 -75
- package/shared/localization/locales/no.json +78 -75
- package/shared/localization/locales/pl.json +78 -75
- package/shared/localization/locales/pt-PT.json +78 -75
- package/shared/localization/locales/pt.json +79 -76
- package/shared/localization/locales/ro.json +78 -75
- package/shared/localization/locales/ru.json +78 -75
- package/shared/localization/locales/sk.json +78 -75
- package/shared/localization/locales/sl.json +78 -75
- package/shared/localization/locales/sr-Latn.json +78 -75
- package/shared/localization/locales/sr.json +78 -75
- package/shared/localization/locales/sv.json +78 -75
- package/shared/localization/locales/ta.json +78 -75
- package/shared/localization/locales/te.json +78 -75
- package/shared/localization/locales/th.json +78 -75
- package/shared/localization/locales/tr.json +78 -75
- package/shared/localization/locales/uk.json +78 -75
- package/shared/localization/locales/vi.json +78 -75
- package/shared/localization/locales/zh-HK.json +78 -75
- package/shared/localization/locales/zh-TW.json +79 -76
- package/shared/localization/locales/zh.json +78 -75
- package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +1 -0
- package/types/artifacts.d.ts +1 -0
- package/types/config.d.ts +0 -38
- package/types/internal/rxjs.d.ts +4 -0
- package/types/internal/smokehouse.d.ts +10 -5
- package/types/lhr/settings.d.ts +13 -0
package/types/artifacts.d.ts
CHANGED
|
@@ -579,6 +579,7 @@ declare module Artifacts {
|
|
|
579
579
|
bounceTrackingIssue: Crdp.Audits.BounceTrackingIssueDetails[];
|
|
580
580
|
clientHintIssue: Crdp.Audits.ClientHintIssueDetails[];
|
|
581
581
|
contentSecurityPolicyIssue: Crdp.Audits.ContentSecurityPolicyIssueDetails[];
|
|
582
|
+
cookieDeprecationMetadataIssue: Crdp.Audits.CookieDeprecationMetadataIssueDetails[],
|
|
582
583
|
corsIssue: Crdp.Audits.CorsIssueDetails[];
|
|
583
584
|
deprecationIssue: Crdp.Audits.DeprecationIssueDetails[];
|
|
584
585
|
federatedAuthRequestIssue: Crdp.Audits.FederatedAuthRequestIssueDetails[],
|
package/types/config.d.ts
CHANGED
|
@@ -34,45 +34,11 @@ declare module Config {
|
|
|
34
34
|
interface ResolvedConfig {
|
|
35
35
|
settings: Settings;
|
|
36
36
|
artifacts: AnyArtifactDefn[] | null;
|
|
37
|
-
navigations: NavigationDefn[] | null;
|
|
38
37
|
audits: AuditDefn[] | null;
|
|
39
38
|
categories: Record<string, Category> | null;
|
|
40
39
|
groups: Record<string, Group> | null;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
interface SharedPassNavigationJson {
|
|
44
|
-
/**
|
|
45
|
-
* Controls the behavior when the navigation fails to complete (due to server error, no FCP, etc).
|
|
46
|
-
* Fatal means Lighthouse will exit immediately and return a runtimeError / non-zero exit code.
|
|
47
|
-
* Warn means a toplevel warning will appear in the report, but the run will complete with success.
|
|
48
|
-
* Ignore means a failure is expected and no action should be taken.
|
|
49
|
-
*/
|
|
50
|
-
loadFailureMode?: 'fatal'|'warn'|'ignore';
|
|
51
|
-
/** The number of milliseconds to wait after FCP until the page should be considered loaded. */
|
|
52
|
-
pauseAfterFcpMs?: number;
|
|
53
|
-
/** The number of milliseconds to wait after the load event until the page should be considered loaded. */
|
|
54
|
-
pauseAfterLoadMs?: number;
|
|
55
|
-
/** The number of milliseconds to wait between high priority network requests or 3 simulataneous requests before the page should be considered loaded. */
|
|
56
|
-
networkQuietThresholdMs?: number;
|
|
57
|
-
/** The number of milliseconds to wait between long tasks until the page should be considered loaded. */
|
|
58
|
-
cpuQuietThresholdMs?: number;
|
|
59
|
-
/** Substring patterns of network resources to block during this navigation, '*' wildcards supported though unnecessary as prefix or suffix (due to substring matching). */
|
|
60
|
-
blockedUrlPatterns?: string[];
|
|
61
|
-
/** The URL to use for the "blank" neutral page in between navigations. Defaults to `about:blank`. */
|
|
62
|
-
blankPage?: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
interface NavigationJson extends SharedPassNavigationJson {
|
|
66
|
-
/** The identifier for the navigation. Config extension will deduplicate navigations with the same id. */
|
|
67
|
-
id: string;
|
|
68
|
-
/** Whether throttling settings should be skipped for the pass. */
|
|
69
|
-
disableThrottling?: boolean;
|
|
70
|
-
/** Whether storage clearing (service workers, cache storage) should be skipped for the pass. A run-wide setting of `true` takes precedence over this value. */
|
|
71
|
-
disableStorageReset?: boolean;
|
|
72
|
-
/** The array of artifacts to collect during the navigation. */
|
|
73
|
-
artifacts?: Array<string>;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
42
|
interface ArtifactJson {
|
|
77
43
|
id: string;
|
|
78
44
|
gatherer: GathererJson;
|
|
@@ -121,10 +87,6 @@ declare module Config {
|
|
|
121
87
|
|
|
122
88
|
type Settings = ConfigSettings;
|
|
123
89
|
|
|
124
|
-
interface NavigationDefn extends Omit<Required<NavigationJson>, 'artifacts'> {
|
|
125
|
-
artifacts: AnyArtifactDefn[];
|
|
126
|
-
}
|
|
127
|
-
|
|
128
90
|
interface ArtifactDefn<TDependencies extends Gatherer.DependencyKey = Gatherer.DependencyKey> {
|
|
129
91
|
id: string;
|
|
130
92
|
gatherer: GathererDefn<TDependencies>;
|
package/types/internal/rxjs.d.ts
CHANGED
|
@@ -56,14 +56,19 @@ declare global {
|
|
|
56
56
|
{runnerName?: string} & ((url: string, config?: Config, runnerOptions?: {isDebug?: boolean}) => Promise<{lhr: LHResult, artifacts: Artifacts, log: string}>);
|
|
57
57
|
|
|
58
58
|
export interface SmokehouseOptions {
|
|
59
|
-
/**
|
|
60
|
-
|
|
59
|
+
/** Options to pass to the specific Lighthouse runner. */
|
|
60
|
+
testRunnerOptions?: {
|
|
61
|
+
/** If true, performs extra logging from the test runs. */
|
|
62
|
+
isDebug?: boolean;
|
|
63
|
+
/** Launch Chrome in the new headless mode (`--headless=new`), rather than the typical desktop headful mode. */
|
|
64
|
+
headless?: boolean;
|
|
65
|
+
};
|
|
61
66
|
/** Manually set the number of jobs to run at once. `1` runs all tests serially. */
|
|
62
|
-
jobs
|
|
67
|
+
jobs: number;
|
|
63
68
|
/** The number of times to retry failing tests before accepting. Defaults to 0. */
|
|
64
|
-
retries
|
|
69
|
+
retries: number;
|
|
65
70
|
/** A function that runs Lighthouse with the given options. Defaults to running Lighthouse via the CLI. */
|
|
66
|
-
lighthouseRunner
|
|
71
|
+
lighthouseRunner: LighthouseRunner;
|
|
67
72
|
/** A function that gets a list of URLs requested to the server since the last fetch. */
|
|
68
73
|
takeNetworkRequestUrls?: () => string[];
|
|
69
74
|
/** A function run once before all smoke tests. */
|
package/types/lhr/settings.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type {Protocol as Crdp} from 'devtools-protocol/types/protocol.js';
|
|
8
|
+
|
|
7
9
|
import Budget from './budget.js';
|
|
8
10
|
|
|
9
11
|
export type Locale = 'en-US'|'en'|'en-AU'|'en-GB'|'en-IE'|'en-SG'|'en-ZA'|'en-IN'|'ar-XB'|'ar'|'bg'|'ca'|'cs'|'da'|'de'|'el'|'en-XA'|'en-XL'|'es'|'es-419'|'es-AR'|'es-BO'|'es-BR'|'es-BZ'|'es-CL'|'es-CO'|'es-CR'|'es-CU'|'es-DO'|'es-EC'|'es-GT'|'es-HN'|'es-MX'|'es-NI'|'es-PA'|'es-PE'|'es-PR'|'es-PY'|'es-SV'|'es-US'|'es-UY'|'es-VE'|'fi'|'fil'|'fr'|'he'|'hi'|'hr'|'hu'|'gsw'|'id'|'in'|'it'|'iw'|'ja'|'ko'|'lt'|'lv'|'mo'|'nl'|'nb'|'no'|'pl'|'pt'|'pt-PT'|'ro'|'ru'|'sk'|'sl'|'sr'|'sr-Latn'|'sv'|'ta'|'te'|'th'|'tl'|'tr'|'uk'|'vi'|'zh'|'zh-HK'|'zh-TW';
|
|
@@ -69,6 +71,14 @@ export type ScreenEmulationSettings = {
|
|
|
69
71
|
gatherMode?: boolean | string;
|
|
70
72
|
/** Flag indicating that the browser storage should not be reset for the audit. */
|
|
71
73
|
disableStorageReset?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Flag indicating which kinds of browser storage should be reset for the audit.
|
|
76
|
+
* Cookies are not cleared by default, so the user isn't logged out.
|
|
77
|
+
* indexeddb, websql, and localstorage are not cleared by default to prevent
|
|
78
|
+
* loss of potentially important data.
|
|
79
|
+
* https://chromedevtools.github.io/debugger-protocol-viewer/tot/Storage/#type-StorageType
|
|
80
|
+
*/
|
|
81
|
+
clearStorageTypes?: Crdp.Storage.StorageType[];
|
|
72
82
|
/** Flag indicating that Lighthouse should pause after page load to wait for the user's permission to continue the audit. */
|
|
73
83
|
debugNavigation?: boolean;
|
|
74
84
|
/** If set to true, will skip the initial navigation to about:blank. */
|
|
@@ -114,6 +124,9 @@ export type ScreenEmulationSettings = {
|
|
|
114
124
|
blankPage?: string;
|
|
115
125
|
/** Disables collection of the full page screenshot, which can be rather large and possibly leave the page in an undesirable state. */
|
|
116
126
|
disableFullPageScreenshot?: boolean;
|
|
127
|
+
|
|
128
|
+
/** Disables failing on 404 status code, and instead issues a warning */
|
|
129
|
+
ignoreStatusCode?: boolean;
|
|
117
130
|
}
|
|
118
131
|
|
|
119
132
|
export interface ConfigSettings extends Required<SharedFlagsSettings> {
|