lighthouse 11.2.0-dev.20231017 → 11.2.0-dev.20231019

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 (37) hide show
  1. package/cli/test/smokehouse/frontends/smokehouse-bin.js +18 -7
  2. package/cli/test/smokehouse/lighthouse-runners/bundle.d.ts +2 -4
  3. package/cli/test/smokehouse/lighthouse-runners/bundle.js +8 -4
  4. package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +2 -4
  5. package/cli/test/smokehouse/lighthouse-runners/cli.js +5 -3
  6. package/cli/test/smokehouse/lighthouse-runners/devtools.d.ts +2 -1
  7. package/cli/test/smokehouse/lighthouse-runners/devtools.js +3 -1
  8. package/cli/test/smokehouse/smokehouse.d.ts +4 -2
  9. package/cli/test/smokehouse/smokehouse.js +10 -7
  10. package/core/config/config.d.ts +1 -2
  11. package/core/config/config.js +18 -62
  12. package/core/config/constants.d.ts +1 -3
  13. package/core/config/constants.js +2 -18
  14. package/core/config/filters.d.ts +0 -8
  15. package/core/config/filters.js +0 -28
  16. package/core/config/validation.d.ts +4 -15
  17. package/core/config/validation.js +18 -63
  18. package/core/gather/base-artifacts.d.ts +2 -2
  19. package/core/gather/base-artifacts.js +5 -5
  20. package/core/gather/driver/navigation.d.ts +1 -1
  21. package/core/gather/driver/navigation.js +1 -1
  22. package/core/gather/driver/prepare.d.ts +3 -18
  23. package/core/gather/driver/prepare.js +14 -38
  24. package/core/gather/gatherers/inspector-issues.js +1 -0
  25. package/core/gather/navigation-runner.d.ts +3 -31
  26. package/core/gather/navigation-runner.js +39 -112
  27. package/core/lib/navigation-error.d.ts +1 -2
  28. package/core/lib/navigation-error.js +2 -6
  29. package/dist/report/bundle.esm.js +4 -4
  30. package/dist/report/flow.js +7 -7
  31. package/dist/report/standalone.js +5 -5
  32. package/package.json +5 -5
  33. package/report/renderer/performance-category-renderer.js +2 -1
  34. package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +1 -0
  35. package/types/artifacts.d.ts +1 -0
  36. package/types/config.d.ts +0 -38
  37. package/types/internal/smokehouse.d.ts +10 -5
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>;
@@ -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
- /** If true, performs extra logging from the test runs. */
60
- isDebug?: boolean;
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?: number;
67
+ jobs: number;
63
68
  /** The number of times to retry failing tests before accepting. Defaults to 0. */
64
- retries?: number;
69
+ retries: number;
65
70
  /** A function that runs Lighthouse with the given options. Defaults to running Lighthouse via the CLI. */
66
- lighthouseRunner?: 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. */