lighthouse 10.4.0-dev.20230713 → 10.4.0-dev.20230714

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 (174) hide show
  1. package/cli/cli-flags.d.ts +1 -6
  2. package/cli/cli-flags.js +0 -5
  3. package/cli/run.js +3 -10
  4. package/cli/test/smokehouse/lighthouse-runners/bundle.js +3 -1
  5. package/core/config/config-helpers.d.ts +3 -3
  6. package/core/config/config-helpers.js +5 -12
  7. package/core/config/config.js +1 -7
  8. package/core/config/constants.d.ts +0 -2
  9. package/core/config/constants.js +0 -16
  10. package/core/config/filters.js +1 -1
  11. package/core/config/validation.d.ts +5 -10
  12. package/core/config/validation.js +12 -22
  13. package/core/gather/base-artifacts.d.ts +4 -4
  14. package/core/gather/base-artifacts.js +2 -6
  15. package/core/gather/base-gatherer.d.ts +12 -37
  16. package/core/gather/base-gatherer.js +7 -54
  17. package/core/gather/driver/dom.d.ts +4 -4
  18. package/core/gather/driver/dom.js +2 -2
  19. package/core/gather/driver/environment.d.ts +4 -4
  20. package/core/gather/driver/environment.js +2 -2
  21. package/core/gather/driver/execution-context.d.ts +12 -3
  22. package/core/gather/driver/execution-context.js +27 -3
  23. package/core/gather/driver/navigation.d.ts +2 -2
  24. package/core/gather/driver/navigation.js +1 -1
  25. package/core/gather/driver/network-monitor.d.ts +6 -6
  26. package/core/gather/driver/network-monitor.js +3 -3
  27. package/core/gather/driver/network.d.ts +2 -2
  28. package/core/gather/driver/network.js +1 -1
  29. package/core/gather/driver/prepare.d.ts +10 -10
  30. package/core/gather/driver/prepare.js +10 -10
  31. package/core/gather/driver/service-workers.d.ts +4 -4
  32. package/core/gather/driver/service-workers.js +2 -2
  33. package/core/gather/driver/storage.d.ts +6 -6
  34. package/core/gather/driver/storage.js +3 -3
  35. package/core/gather/driver/target-manager.d.ts +6 -5
  36. package/core/gather/driver/target-manager.js +3 -3
  37. package/core/gather/driver/wait-for-condition.d.ts +14 -14
  38. package/core/gather/driver/wait-for-condition.js +8 -8
  39. package/core/gather/driver.d.ts +4 -4
  40. package/core/gather/driver.js +3 -3
  41. package/core/gather/fetcher.d.ts +3 -3
  42. package/core/gather/fetcher.js +1 -1
  43. package/core/gather/gatherers/accessibility.d.ts +4 -4
  44. package/core/gather/gatherers/accessibility.js +3 -3
  45. package/core/gather/gatherers/anchor-elements.d.ts +4 -4
  46. package/core/gather/gatherers/anchor-elements.js +4 -4
  47. package/core/gather/gatherers/bf-cache-failures.d.ts +8 -14
  48. package/core/gather/gatherers/bf-cache-failures.js +5 -14
  49. package/core/gather/gatherers/cache-contents.d.ts +4 -4
  50. package/core/gather/gatherers/cache-contents.js +3 -3
  51. package/core/gather/gatherers/console-messages.d.ts +6 -6
  52. package/core/gather/gatherers/console-messages.js +4 -4
  53. package/core/gather/gatherers/css-usage.d.ts +14 -14
  54. package/core/gather/gatherers/css-usage.js +9 -9
  55. package/core/gather/gatherers/devtools-log-compat.d.ts +5 -5
  56. package/core/gather/gatherers/devtools-log-compat.js +4 -4
  57. package/core/gather/gatherers/devtools-log.d.ts +6 -6
  58. package/core/gather/gatherers/devtools-log.js +4 -4
  59. package/core/gather/gatherers/dobetterweb/doctype.d.ts +4 -4
  60. package/core/gather/gatherers/dobetterweb/doctype.js +3 -3
  61. package/core/gather/gatherers/dobetterweb/domstats.d.ts +4 -4
  62. package/core/gather/gatherers/dobetterweb/domstats.js +3 -3
  63. package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +10 -22
  64. package/core/gather/gatherers/dobetterweb/optimized-images.js +10 -27
  65. package/core/gather/gatherers/dobetterweb/response-compression.d.ts +6 -12
  66. package/core/gather/gatherers/dobetterweb/response-compression.js +6 -15
  67. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +8 -14
  68. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +5 -14
  69. package/core/gather/gatherers/full-page-screenshot.d.ts +10 -10
  70. package/core/gather/gatherers/full-page-screenshot.js +6 -6
  71. package/core/gather/gatherers/global-listeners.d.ts +4 -4
  72. package/core/gather/gatherers/global-listeners.js +3 -3
  73. package/core/gather/gatherers/iframe-elements.d.ts +4 -4
  74. package/core/gather/gatherers/iframe-elements.js +3 -3
  75. package/core/gather/gatherers/image-elements.d.ts +10 -10
  76. package/core/gather/gatherers/image-elements.js +6 -6
  77. package/core/gather/gatherers/inputs.d.ts +4 -4
  78. package/core/gather/gatherers/inputs.js +3 -3
  79. package/core/gather/gatherers/inspector-issues.d.ts +8 -19
  80. package/core/gather/gatherers/inspector-issues.js +9 -26
  81. package/core/gather/gatherers/installability-errors.d.ts +6 -6
  82. package/core/gather/gatherers/installability-errors.js +4 -4
  83. package/core/gather/gatherers/js-usage.d.ts +6 -6
  84. package/core/gather/gatherers/js-usage.js +4 -4
  85. package/core/gather/gatherers/link-elements.d.ts +8 -20
  86. package/core/gather/gatherers/link-elements.js +7 -24
  87. package/core/gather/gatherers/main-document-content.d.ts +4 -16
  88. package/core/gather/gatherers/main-document-content.js +5 -23
  89. package/core/gather/gatherers/meta-elements.d.ts +4 -4
  90. package/core/gather/gatherers/meta-elements.js +3 -3
  91. package/core/gather/gatherers/network-user-agent.d.ts +5 -5
  92. package/core/gather/gatherers/network-user-agent.js +4 -4
  93. package/core/gather/gatherers/script-elements.d.ts +6 -11
  94. package/core/gather/gatherers/script-elements.js +4 -13
  95. package/core/gather/gatherers/scripts.d.ts +6 -6
  96. package/core/gather/gatherers/scripts.js +4 -4
  97. package/core/gather/gatherers/seo/embedded-content.d.ts +4 -4
  98. package/core/gather/gatherers/seo/embedded-content.js +3 -3
  99. package/core/gather/gatherers/seo/font-size.d.ts +6 -6
  100. package/core/gather/gatherers/seo/font-size.js +5 -5
  101. package/core/gather/gatherers/seo/robots-txt.d.ts +4 -4
  102. package/core/gather/gatherers/seo/robots-txt.js +3 -3
  103. package/core/gather/gatherers/seo/tap-targets.d.ts +8 -8
  104. package/core/gather/gatherers/seo/tap-targets.js +5 -5
  105. package/core/gather/gatherers/service-worker.d.ts +4 -10
  106. package/core/gather/gatherers/service-worker.js +3 -15
  107. package/core/gather/gatherers/source-maps.d.ts +12 -12
  108. package/core/gather/gatherers/source-maps.js +7 -7
  109. package/core/gather/gatherers/stacks.d.ts +7 -7
  110. package/core/gather/gatherers/stacks.js +6 -6
  111. package/core/gather/gatherers/trace-compat.d.ts +5 -5
  112. package/core/gather/gatherers/trace-compat.js +4 -4
  113. package/core/gather/gatherers/trace-elements.d.ts +13 -25
  114. package/core/gather/gatherers/trace-elements.js +13 -30
  115. package/core/gather/gatherers/trace.d.ts +8 -8
  116. package/core/gather/gatherers/trace.js +5 -5
  117. package/core/gather/gatherers/viewport-dimensions.d.ts +4 -4
  118. package/core/gather/gatherers/viewport-dimensions.js +3 -3
  119. package/core/gather/gatherers/web-app-manifest.d.ts +8 -8
  120. package/core/gather/gatherers/web-app-manifest.js +5 -5
  121. package/core/gather/navigation-runner.d.ts +9 -9
  122. package/core/gather/navigation-runner.js +6 -6
  123. package/core/gather/runner-helpers.d.ts +3 -3
  124. package/core/gather/runner-helpers.js +12 -4
  125. package/core/gather/session.d.ts +2 -2
  126. package/core/gather/session.js +1 -1
  127. package/core/gather/snapshot-runner.d.ts +2 -2
  128. package/core/gather/snapshot-runner.js +1 -1
  129. package/core/gather/timespan-runner.d.ts +2 -2
  130. package/core/gather/timespan-runner.js +1 -1
  131. package/core/index.cjs +0 -7
  132. package/core/index.d.ts +0 -15
  133. package/core/index.js +2 -40
  134. package/core/lib/asset-saver.js +8 -4
  135. package/core/lib/axe.js +1 -1
  136. package/core/lib/emulation.d.ts +14 -14
  137. package/core/lib/emulation.js +7 -7
  138. package/core/lib/page-functions.d.ts +2 -0
  139. package/core/lib/page-functions.js +10 -0
  140. package/core/lib/sentry.js +9 -2
  141. package/core/runner.d.ts +8 -30
  142. package/core/runner.js +6 -39
  143. package/core/user-flow.d.ts +4 -4
  144. package/core/user-flow.js +2 -2
  145. package/dist/report/bundle.esm.js +2221 -5832
  146. package/dist/report/flow.js +2631 -235
  147. package/dist/report/standalone.js +2586 -234
  148. package/package.json +8 -15
  149. package/third-party/esbuild-plugins-polyfills/LICENSE +3 -0
  150. package/third-party/esbuild-plugins-polyfills/README.md +7 -0
  151. package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.d.ts +9 -0
  152. package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.js +129 -0
  153. package/tsconfig.json +1 -0
  154. package/types/artifacts.d.ts +12 -45
  155. package/types/config.d.ts +10 -52
  156. package/types/externs.d.ts +0 -2
  157. package/types/gatherer.d.ts +20 -45
  158. package/types/lh.d.ts +0 -2
  159. package/core/gather/gatherers/gatherer.d.ts +0 -46
  160. package/core/gather/gatherers/gatherer.js +0 -58
  161. package/core/legacy/config/config.d.ts +0 -107
  162. package/core/legacy/config/config.js +0 -566
  163. package/core/legacy/config/legacy-default-config.d.ts +0 -4
  164. package/core/legacy/config/legacy-default-config.js +0 -87
  165. package/core/legacy/gather/connections/connection.d.ts +0 -77
  166. package/core/legacy/gather/connections/connection.js +0 -196
  167. package/core/legacy/gather/connections/cri.d.ts +0 -27
  168. package/core/legacy/gather/connections/cri.js +0 -162
  169. package/core/legacy/gather/connections/raw.d.ts +0 -20
  170. package/core/legacy/gather/connections/raw.js +0 -57
  171. package/core/legacy/gather/driver.d.ts +0 -216
  172. package/core/legacy/gather/driver.js +0 -480
  173. package/core/legacy/gather/gather-runner.d.ts +0 -166
  174. package/core/legacy/gather/gather-runner.js +0 -590
@@ -4,11 +4,11 @@
4
4
  * 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.
5
5
  */
6
6
 
7
- import FRGatherer from '../base-gatherer.js';
7
+ import BaseGatherer from '../base-gatherer.js';
8
8
  import DevtoolsLogGatherer from './devtools-log.js';
9
9
 
10
- /** @implements {LH.Gatherer.FRGathererInstance<'DevtoolsLog'>} */
11
- class NetworkUserAgent extends FRGatherer {
10
+ /** @implements {LH.Gatherer.GathererInstance<'DevtoolsLog'>} */
11
+ class NetworkUserAgent extends BaseGatherer {
12
12
  /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
13
13
  meta = {
14
14
  supportedModes: ['timespan', 'navigation'],
@@ -30,7 +30,7 @@ class NetworkUserAgent extends FRGatherer {
30
30
  }
31
31
 
32
32
  /**
33
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} context
33
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
34
34
  * @return {Promise<LH.Artifacts['NetworkUserAgent']>}
35
35
  */
36
36
  async getArtifact(context) {
@@ -2,25 +2,20 @@ export default ScriptElements;
2
2
  /**
3
3
  * @fileoverview Gets JavaScript file contents.
4
4
  */
5
- declare class ScriptElements extends FRGatherer {
5
+ declare class ScriptElements extends BaseGatherer {
6
6
  /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
7
7
  meta: LH.Gatherer.GathererMeta<'DevtoolsLog'>;
8
8
  /**
9
- * @param {LH.Gatherer.FRTransitionalContext} context
9
+ * @param {LH.Gatherer.Context} context
10
10
  * @param {LH.Artifacts.NetworkRequest[]} networkRecords
11
11
  * @return {Promise<LH.Artifacts['ScriptElements']>}
12
12
  */
13
- _getArtifact(context: LH.Gatherer.FRTransitionalContext, networkRecords: LH.Artifacts.NetworkRequest[]): Promise<LH.Artifacts['ScriptElements']>;
13
+ _getArtifact(context: LH.Gatherer.Context, networkRecords: LH.Artifacts.NetworkRequest[]): Promise<LH.Artifacts['ScriptElements']>;
14
14
  /**
15
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} context
15
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
16
16
  */
17
- getArtifact(context: LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>): Promise<import("../../index.js").Artifacts.ScriptElement[]>;
18
- /**
19
- * @param {LH.Gatherer.PassContext} passContext
20
- * @param {LH.Gatherer.LoadData} loadData
21
- */
22
- afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData): Promise<import("../../index.js").Artifacts.ScriptElement[]>;
17
+ getArtifact(context: LH.Gatherer.Context<'DevtoolsLog'>): Promise<import("../../index.js").Artifacts.ScriptElement[]>;
23
18
  }
24
- import FRGatherer from '../base-gatherer.js';
19
+ import BaseGatherer from '../base-gatherer.js';
25
20
  import { NetworkRequest } from '../../lib/network-request.js';
26
21
  //# sourceMappingURL=script-elements.d.ts.map
@@ -4,7 +4,7 @@
4
4
  * 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.
5
5
  */
6
6
 
7
- import FRGatherer from '../base-gatherer.js';
7
+ import BaseGatherer from '../base-gatherer.js';
8
8
  import {NetworkRecords} from '../../computed/network-records.js';
9
9
  import {NetworkRequest} from '../../lib/network-request.js';
10
10
  import {pageFunctions} from '../../lib/page-functions.js';
@@ -39,7 +39,7 @@ function collectAllScriptElements() {
39
39
  /**
40
40
  * @fileoverview Gets JavaScript file contents.
41
41
  */
42
- class ScriptElements extends FRGatherer {
42
+ class ScriptElements extends BaseGatherer {
43
43
  /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
44
44
  meta = {
45
45
  supportedModes: ['timespan', 'navigation'],
@@ -47,7 +47,7 @@ class ScriptElements extends FRGatherer {
47
47
  };
48
48
 
49
49
  /**
50
- * @param {LH.Gatherer.FRTransitionalContext} context
50
+ * @param {LH.Gatherer.Context} context
51
51
  * @param {LH.Artifacts.NetworkRequest[]} networkRecords
52
52
  * @return {Promise<LH.Artifacts['ScriptElements']>}
53
53
  */
@@ -88,22 +88,13 @@ class ScriptElements extends FRGatherer {
88
88
  }
89
89
 
90
90
  /**
91
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} context
91
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
92
92
  */
93
93
  async getArtifact(context) {
94
94
  const devtoolsLog = context.dependencies.DevtoolsLog;
95
95
  const networkRecords = await NetworkRecords.request(devtoolsLog, context);
96
96
  return this._getArtifact(context, networkRecords);
97
97
  }
98
-
99
- /**
100
- * @param {LH.Gatherer.PassContext} passContext
101
- * @param {LH.Gatherer.LoadData} loadData
102
- */
103
- async afterPass(passContext, loadData) {
104
- const networkRecords = loadData.networkRecords;
105
- return this._getArtifact({...passContext, dependencies: {}}, networkRecords);
106
- }
107
98
  }
108
99
 
109
100
  export default ScriptElements;
@@ -2,7 +2,7 @@ export default Scripts;
2
2
  /**
3
3
  * @fileoverview Gets JavaScript file contents.
4
4
  */
5
- declare class Scripts extends FRGatherer {
5
+ declare class Scripts extends BaseGatherer {
6
6
  /** @type {LH.Crdp.Debugger.ScriptParsedEvent[]} */
7
7
  _scriptParsedEvents: LH.Crdp.Debugger.ScriptParsedEvent[];
8
8
  /** @type {Array<string | undefined>} */
@@ -12,14 +12,14 @@ declare class Scripts extends FRGatherer {
12
12
  */
13
13
  onScriptParsed(params: LH.Crdp.Debugger.ScriptParsedEvent): void;
14
14
  /**
15
- * @param {LH.Gatherer.FRTransitionalContext} context
15
+ * @param {LH.Gatherer.Context} context
16
16
  */
17
- startInstrumentation(context: LH.Gatherer.FRTransitionalContext): Promise<void>;
17
+ startInstrumentation(context: LH.Gatherer.Context): Promise<void>;
18
18
  /**
19
- * @param {LH.Gatherer.FRTransitionalContext} context
19
+ * @param {LH.Gatherer.Context} context
20
20
  */
21
- stopInstrumentation(context: LH.Gatherer.FRTransitionalContext): Promise<void>;
21
+ stopInstrumentation(context: LH.Gatherer.Context): Promise<void>;
22
22
  getArtifact(): Promise<import("../../index.js").Artifacts.Script[]>;
23
23
  }
24
- import FRGatherer from '../base-gatherer.js';
24
+ import BaseGatherer from '../base-gatherer.js';
25
25
  //# sourceMappingURL=scripts.d.ts.map
@@ -4,7 +4,7 @@
4
4
  * 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.
5
5
  */
6
6
 
7
- import FRGatherer from '../base-gatherer.js';
7
+ import BaseGatherer from '../base-gatherer.js';
8
8
 
9
9
  /**
10
10
  * @template T, U
@@ -47,7 +47,7 @@ function isLighthouseRuntimeEvaluateScript(script) {
47
47
  /**
48
48
  * @fileoverview Gets JavaScript file contents.
49
49
  */
50
- class Scripts extends FRGatherer {
50
+ class Scripts extends BaseGatherer {
51
51
  /** @type {LH.Gatherer.GathererMeta} */
52
52
  meta = {
53
53
  supportedModes: ['timespan', 'navigation'],
@@ -74,7 +74,7 @@ class Scripts extends FRGatherer {
74
74
  }
75
75
 
76
76
  /**
77
- * @param {LH.Gatherer.FRTransitionalContext} context
77
+ * @param {LH.Gatherer.Context} context
78
78
  */
79
79
  async startInstrumentation(context) {
80
80
  const session = context.driver.defaultSession;
@@ -83,7 +83,7 @@ class Scripts extends FRGatherer {
83
83
  }
84
84
 
85
85
  /**
86
- * @param {LH.Gatherer.FRTransitionalContext} context
86
+ * @param {LH.Gatherer.Context} context
87
87
  */
88
88
  async stopInstrumentation(context) {
89
89
  const session = context.driver.defaultSession;
@@ -1,10 +1,10 @@
1
1
  export default EmbeddedContent;
2
- declare class EmbeddedContent extends FRGatherer {
2
+ declare class EmbeddedContent extends BaseGatherer {
3
3
  /**
4
- * @param {LH.Gatherer.FRTransitionalContext} passContext
4
+ * @param {LH.Gatherer.Context} passContext
5
5
  * @return {Promise<LH.Artifacts['EmbeddedContent']>}
6
6
  */
7
- getArtifact(passContext: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['EmbeddedContent']>;
7
+ getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts['EmbeddedContent']>;
8
8
  }
9
- import FRGatherer from '../../base-gatherer.js';
9
+ import BaseGatherer from '../../base-gatherer.js';
10
10
  //# sourceMappingURL=embedded-content.d.ts.map
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* globals getElementsInDocument getNodeDetails */
8
8
 
9
- import FRGatherer from '../../base-gatherer.js';
9
+ import BaseGatherer from '../../base-gatherer.js';
10
10
  import {pageFunctions} from '../../../lib/page-functions.js';
11
11
 
12
12
  /**
@@ -39,14 +39,14 @@ function getEmbeddedContent() {
39
39
  }));
40
40
  }
41
41
 
42
- class EmbeddedContent extends FRGatherer {
42
+ class EmbeddedContent extends BaseGatherer {
43
43
  /** @type {LH.Gatherer.GathererMeta} */
44
44
  meta = {
45
45
  supportedModes: ['snapshot', 'navigation'],
46
46
  };
47
47
 
48
48
  /**
49
- * @param {LH.Gatherer.FRTransitionalContext} passContext
49
+ * @param {LH.Gatherer.Context} passContext
50
50
  * @return {Promise<LH.Artifacts['EmbeddedContent']>}
51
51
  */
52
52
  getArtifact(passContext) {
@@ -4,12 +4,12 @@ export type BackendIdsToFontData = Map<number, {
4
4
  fontSize: number;
5
5
  textLength: number;
6
6
  }>;
7
- declare class FontSize extends FRGatherer {
7
+ declare class FontSize extends BaseGatherer {
8
8
  /**
9
- * @param {LH.Gatherer.FRProtocolSession} session
9
+ * @param {LH.Gatherer.ProtocolSession} session
10
10
  * @param {Array<NodeFontData>} failingNodes
11
11
  */
12
- static fetchFailingNodeSourceRules(session: LH.Gatherer.FRProtocolSession, failingNodes: Array<NodeFontData>): Promise<{
12
+ static fetchFailingNodeSourceRules(session: LH.Gatherer.ProtocolSession, failingNodes: Array<NodeFontData>): Promise<{
13
13
  analyzedFailingNodesData: {
14
14
  nodeId: number;
15
15
  fontSize: number;
@@ -104,10 +104,10 @@ declare class FontSize extends FRGatherer {
104
104
  }[];
105
105
  };
106
106
  /**
107
- * @param {LH.Gatherer.FRTransitionalContext} passContext
107
+ * @param {LH.Gatherer.Context} passContext
108
108
  * @return {Promise<LH.Artifacts.FontSize>} font-size analysis
109
109
  */
110
- getArtifact(passContext: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts.FontSize>;
110
+ getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts.FontSize>;
111
111
  }
112
112
  /**
113
113
  * Returns the governing/winning CSS font-size rule for the set of styles given.
@@ -126,5 +126,5 @@ export function getEffectiveFontRule({ attributesStyle, inlineStyle, matchedCSSR
126
126
  * @return {NodeFontData['cssRule']|undefined}
127
127
  */
128
128
  export function findMostSpecificMatchedCSSRule(matchedCSSRules: import("devtools-protocol").Protocol.CSS.RuleMatch[] | undefined, isDeclarationOfInterest: (arg0: LH.Crdp.CSS.CSSStyle) => boolean | string | undefined): NodeFontData['cssRule'] | undefined;
129
- import FRGatherer from '../../base-gatherer.js';
129
+ import BaseGatherer from '../../base-gatherer.js';
130
130
  //# sourceMappingURL=font-size.d.ts.map
@@ -15,7 +15,7 @@
15
15
  * This gatherer collects stylesheet metadata by itself, instead of relying on the styles gatherer which is slow (because it parses the stylesheet content).
16
16
  */
17
17
 
18
- import FRGatherer from '../../base-gatherer.js';
18
+ import BaseGatherer from '../../base-gatherer.js';
19
19
 
20
20
  const FONT_SIZE_PROPERTY_NAME = 'font-size';
21
21
  const MINIMAL_LEGIBLE_FONT_SIZE_PX = 12;
@@ -116,7 +116,7 @@ function getTextLength(text) {
116
116
  }
117
117
 
118
118
  /**
119
- * @param {LH.Gatherer.FRProtocolSession} session
119
+ * @param {LH.Gatherer.ProtocolSession} session
120
120
  * @param {number} nodeId text node
121
121
  * @return {Promise<NodeFontData['cssRule']|undefined>}
122
122
  */
@@ -138,14 +138,14 @@ async function fetchSourceRule(session, nodeId) {
138
138
  };
139
139
  }
140
140
 
141
- class FontSize extends FRGatherer {
141
+ class FontSize extends BaseGatherer {
142
142
  /** @type {LH.Gatherer.GathererMeta} */
143
143
  meta = {
144
144
  supportedModes: ['snapshot', 'navigation'],
145
145
  };
146
146
 
147
147
  /**
148
- * @param {LH.Gatherer.FRProtocolSession} session
148
+ * @param {LH.Gatherer.ProtocolSession} session
149
149
  * @param {Array<NodeFontData>} failingNodes
150
150
  */
151
151
  static async fetchFailingNodeSourceRules(session, failingNodes) {
@@ -274,7 +274,7 @@ class FontSize extends FRGatherer {
274
274
  }
275
275
 
276
276
  /**
277
- * @param {LH.Gatherer.FRTransitionalContext} passContext
277
+ * @param {LH.Gatherer.Context} passContext
278
278
  * @return {Promise<LH.Artifacts.FontSize>} font-size analysis
279
279
  */
280
280
  async getArtifact(passContext) {
@@ -1,10 +1,10 @@
1
1
  export default RobotsTxt;
2
- declare class RobotsTxt extends FRGatherer {
2
+ declare class RobotsTxt extends BaseGatherer {
3
3
  /**
4
- * @param {LH.Gatherer.FRTransitionalContext} passContext
4
+ * @param {LH.Gatherer.Context} passContext
5
5
  * @return {Promise<LH.Artifacts['RobotsTxt']>}
6
6
  */
7
- getArtifact(passContext: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['RobotsTxt']>;
7
+ getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts['RobotsTxt']>;
8
8
  }
9
- import FRGatherer from '../../base-gatherer.js';
9
+ import BaseGatherer from '../../base-gatherer.js';
10
10
  //# sourceMappingURL=robots-txt.d.ts.map
@@ -4,16 +4,16 @@
4
4
  * 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.
5
5
  */
6
6
 
7
- import FRGatherer from '../../base-gatherer.js';
7
+ import BaseGatherer from '../../base-gatherer.js';
8
8
 
9
- class RobotsTxt extends FRGatherer {
9
+ class RobotsTxt extends BaseGatherer {
10
10
  /** @type {LH.Gatherer.GathererMeta} */
11
11
  meta = {
12
12
  supportedModes: ['snapshot', 'navigation'],
13
13
  };
14
14
 
15
15
  /**
16
- * @param {LH.Gatherer.FRTransitionalContext} passContext
16
+ * @param {LH.Gatherer.Context} passContext
17
17
  * @return {Promise<LH.Artifacts['RobotsTxt']>}
18
18
  */
19
19
  async getArtifact(passContext) {
@@ -1,21 +1,21 @@
1
1
  export default TapTargets;
2
- declare class TapTargets extends FRGatherer {
2
+ declare class TapTargets extends BaseGatherer {
3
3
  /**
4
- * @param {LH.Gatherer.FRProtocolSession} session
4
+ * @param {LH.Gatherer.ProtocolSession} session
5
5
  * @param {string} className
6
6
  * @return {Promise<string>}
7
7
  */
8
- addStyleRule(session: LH.Gatherer.FRProtocolSession, className: string): Promise<string>;
8
+ addStyleRule(session: LH.Gatherer.ProtocolSession, className: string): Promise<string>;
9
9
  /**
10
- * @param {LH.Gatherer.FRProtocolSession} session
10
+ * @param {LH.Gatherer.ProtocolSession} session
11
11
  * @param {string} styleSheetId
12
12
  */
13
- removeStyleRule(session: LH.Gatherer.FRProtocolSession, styleSheetId: string): Promise<void>;
13
+ removeStyleRule(session: LH.Gatherer.ProtocolSession, styleSheetId: string): Promise<void>;
14
14
  /**
15
- * @param {LH.Gatherer.FRTransitionalContext} passContext
15
+ * @param {LH.Gatherer.Context} passContext
16
16
  * @return {Promise<LH.Artifacts.TapTarget[]>} All visible tap targets with their positions and sizes
17
17
  */
18
- getArtifact(passContext: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts.TapTarget[]>;
18
+ getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts.TapTarget[]>;
19
19
  }
20
- import FRGatherer from '../../base-gatherer.js';
20
+ import BaseGatherer from '../../base-gatherer.js';
21
21
  //# sourceMappingURL=tap-targets.d.ts.map
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* global document, window, getComputedStyle, getElementsInDocument, Node, getNodeDetails, getRectCenterPoint */
8
8
 
9
- import FRGatherer from '../../base-gatherer.js';
9
+ import BaseGatherer from '../../base-gatherer.js';
10
10
  import {pageFunctions} from '../../../lib/page-functions.js';
11
11
  import * as RectHelpers from '../../../lib/rect-helpers.js';
12
12
 
@@ -301,7 +301,7 @@ function gatherTapTargetsAndResetScroll(tapTargetsSelector, className) {
301
301
  }
302
302
  /* c8 ignore stop */
303
303
 
304
- class TapTargets extends FRGatherer {
304
+ class TapTargets extends BaseGatherer {
305
305
  constructor() {
306
306
  super();
307
307
  /**
@@ -315,7 +315,7 @@ class TapTargets extends FRGatherer {
315
315
  }
316
316
 
317
317
  /**
318
- * @param {LH.Gatherer.FRProtocolSession} session
318
+ * @param {LH.Gatherer.ProtocolSession} session
319
319
  * @param {string} className
320
320
  * @return {Promise<string>}
321
321
  */
@@ -333,7 +333,7 @@ class TapTargets extends FRGatherer {
333
333
  }
334
334
 
335
335
  /**
336
- * @param {LH.Gatherer.FRProtocolSession} session
336
+ * @param {LH.Gatherer.ProtocolSession} session
337
337
  * @param {string} styleSheetId
338
338
  */
339
339
  async removeStyleRule(session, styleSheetId) {
@@ -344,7 +344,7 @@ class TapTargets extends FRGatherer {
344
344
  }
345
345
 
346
346
  /**
347
- * @param {LH.Gatherer.FRTransitionalContext} passContext
347
+ * @param {LH.Gatherer.Context} passContext
348
348
  * @return {Promise<LH.Artifacts.TapTarget[]>} All visible tap targets with their positions and sizes
349
349
  */
350
350
  async getArtifact(passContext) {
@@ -1,16 +1,10 @@
1
1
  export default ServiceWorker;
2
- declare class ServiceWorker extends FRGatherer {
2
+ declare class ServiceWorker extends BaseGatherer {
3
3
  /**
4
- * @param {LH.Gatherer.PassContext} passContext
4
+ * @param {LH.Gatherer.Context} context
5
5
  * @return {Promise<LH.Artifacts['ServiceWorker']>}
6
6
  */
7
- beforePass(passContext: LH.Gatherer.PassContext): Promise<LH.Artifacts['ServiceWorker']>;
8
- afterPass(): Promise<void>;
9
- /**
10
- * @param {LH.Gatherer.FRTransitionalContext} context
11
- * @return {Promise<LH.Artifacts['ServiceWorker']>}
12
- */
13
- getArtifact(context: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['ServiceWorker']>;
7
+ getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts['ServiceWorker']>;
14
8
  }
15
- import FRGatherer from '../base-gatherer.js';
9
+ import BaseGatherer from '../base-gatherer.js';
16
10
  //# sourceMappingURL=service-worker.d.ts.map
@@ -4,29 +4,17 @@
4
4
  * 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.
5
5
  */
6
6
 
7
- import FRGatherer from '../base-gatherer.js';
7
+ import BaseGatherer from '../base-gatherer.js';
8
8
  import * as serviceWorkers from '../driver/service-workers.js';
9
9
 
10
- class ServiceWorker extends FRGatherer {
10
+ class ServiceWorker extends BaseGatherer {
11
11
  /** @type {LH.Gatherer.GathererMeta} */
12
12
  meta = {
13
13
  supportedModes: ['navigation'],
14
14
  };
15
15
 
16
16
  /**
17
- * @param {LH.Gatherer.PassContext} passContext
18
- * @return {Promise<LH.Artifacts['ServiceWorker']>}
19
- */
20
- async beforePass(passContext) {
21
- return this.getArtifact({...passContext, dependencies: {}});
22
- }
23
-
24
- // This gatherer is run in a separate pass for legacy mode.
25
- // Legacy compat code is in `beforePass`.
26
- async afterPass() { }
27
-
28
- /**
29
- * @param {LH.Gatherer.FRTransitionalContext} context
17
+ * @param {LH.Gatherer.Context} context
30
18
  * @return {Promise<LH.Artifacts['ServiceWorker']>}
31
19
  */
32
20
  async getArtifact(context) {
@@ -2,7 +2,7 @@ export default SourceMaps;
2
2
  /**
3
3
  * @fileoverview Gets JavaScript source maps.
4
4
  */
5
- declare class SourceMaps extends FRGatherer {
5
+ declare class SourceMaps extends BaseGatherer {
6
6
  /** @type {LH.Crdp.Debugger.ScriptParsedEvent[]} */
7
7
  _scriptParsedEvents: LH.Crdp.Debugger.ScriptParsedEvent[];
8
8
  /**
@@ -10,11 +10,11 @@ declare class SourceMaps extends FRGatherer {
10
10
  */
11
11
  onScriptParsed(event: LH.Crdp.Debugger.ScriptParsedEvent): void;
12
12
  /**
13
- * @param {LH.Gatherer.FRTransitionalDriver} driver
13
+ * @param {LH.Gatherer.Driver} driver
14
14
  * @param {string} sourceMapUrl
15
15
  * @return {Promise<LH.Artifacts.RawSourceMap>}
16
16
  */
17
- fetchSourceMap(driver: LH.Gatherer.FRTransitionalDriver, sourceMapUrl: string): Promise<LH.Artifacts.RawSourceMap>;
17
+ fetchSourceMap(driver: LH.Gatherer.Driver, sourceMapUrl: string): Promise<LH.Artifacts.RawSourceMap>;
18
18
  /**
19
19
  * @param {string} sourceMapURL
20
20
  * @return {LH.Artifacts.RawSourceMap}
@@ -27,24 +27,24 @@ declare class SourceMaps extends FRGatherer {
27
27
  */
28
28
  _resolveUrl(url: string, base: string): string | undefined;
29
29
  /**
30
- * @param {LH.Gatherer.FRTransitionalDriver} driver
30
+ * @param {LH.Gatherer.Driver} driver
31
31
  * @param {LH.Crdp.Debugger.ScriptParsedEvent} event
32
32
  * @return {Promise<LH.Artifacts.SourceMap>}
33
33
  */
34
- _retrieveMapFromScriptParsedEvent(driver: LH.Gatherer.FRTransitionalDriver, event: LH.Crdp.Debugger.ScriptParsedEvent): Promise<LH.Artifacts.SourceMap>;
34
+ _retrieveMapFromScriptParsedEvent(driver: LH.Gatherer.Driver, event: LH.Crdp.Debugger.ScriptParsedEvent): Promise<LH.Artifacts.SourceMap>;
35
35
  /**
36
- * @param {LH.Gatherer.FRTransitionalContext} context
36
+ * @param {LH.Gatherer.Context} context
37
37
  */
38
- startSensitiveInstrumentation(context: LH.Gatherer.FRTransitionalContext): Promise<void>;
38
+ startSensitiveInstrumentation(context: LH.Gatherer.Context): Promise<void>;
39
39
  /**
40
- * @param {LH.Gatherer.FRTransitionalContext} context
40
+ * @param {LH.Gatherer.Context} context
41
41
  */
42
- stopSensitiveInstrumentation(context: LH.Gatherer.FRTransitionalContext): Promise<void>;
42
+ stopSensitiveInstrumentation(context: LH.Gatherer.Context): Promise<void>;
43
43
  /**
44
- * @param {LH.Gatherer.FRTransitionalContext} context
44
+ * @param {LH.Gatherer.Context} context
45
45
  * @return {Promise<LH.Artifacts['SourceMaps']>}
46
46
  */
47
- getArtifact(context: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['SourceMaps']>;
47
+ getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts['SourceMaps']>;
48
48
  }
49
- import FRGatherer from '../base-gatherer.js';
49
+ import BaseGatherer from '../base-gatherer.js';
50
50
  //# sourceMappingURL=source-maps.d.ts.map
@@ -5,12 +5,12 @@
5
5
  */
6
6
 
7
7
  import SDK from '../../lib/cdt/SDK.js';
8
- import FRGatherer from '../base-gatherer.js';
8
+ import BaseGatherer from '../base-gatherer.js';
9
9
 
10
10
  /**
11
11
  * @fileoverview Gets JavaScript source maps.
12
12
  */
13
- class SourceMaps extends FRGatherer {
13
+ class SourceMaps extends BaseGatherer {
14
14
  /** @type {LH.Gatherer.GathererMeta} */
15
15
  meta = {
16
16
  supportedModes: ['timespan', 'navigation'],
@@ -24,7 +24,7 @@ class SourceMaps extends FRGatherer {
24
24
  }
25
25
 
26
26
  /**
27
- * @param {LH.Gatherer.FRTransitionalDriver} driver
27
+ * @param {LH.Gatherer.Driver} driver
28
28
  * @param {string} sourceMapUrl
29
29
  * @return {Promise<LH.Artifacts.RawSourceMap>}
30
30
  */
@@ -68,7 +68,7 @@ class SourceMaps extends FRGatherer {
68
68
  }
69
69
 
70
70
  /**
71
- * @param {LH.Gatherer.FRTransitionalDriver} driver
71
+ * @param {LH.Gatherer.Driver} driver
72
72
  * @param {LH.Crdp.Debugger.ScriptParsedEvent} event
73
73
  * @return {Promise<LH.Artifacts.SourceMap>}
74
74
  */
@@ -125,7 +125,7 @@ class SourceMaps extends FRGatherer {
125
125
  }
126
126
 
127
127
  /**
128
- * @param {LH.Gatherer.FRTransitionalContext} context
128
+ * @param {LH.Gatherer.Context} context
129
129
  */
130
130
  async startSensitiveInstrumentation(context) {
131
131
  const session = context.driver.defaultSession;
@@ -134,7 +134,7 @@ class SourceMaps extends FRGatherer {
134
134
  }
135
135
 
136
136
  /**
137
- * @param {LH.Gatherer.FRTransitionalContext} context
137
+ * @param {LH.Gatherer.Context} context
138
138
  */
139
139
  async stopSensitiveInstrumentation(context) {
140
140
  const session = context.driver.defaultSession;
@@ -143,7 +143,7 @@ class SourceMaps extends FRGatherer {
143
143
  }
144
144
 
145
145
  /**
146
- * @param {LH.Gatherer.FRTransitionalContext} context
146
+ * @param {LH.Gatherer.Context} context
147
147
  * @return {Promise<LH.Artifacts['SourceMaps']>}
148
148
  */
149
149
  async getArtifact(context) {
@@ -21,18 +21,18 @@ export type JSLibrary = {
21
21
  version: string | number | null;
22
22
  npm: string | null;
23
23
  };
24
- /** @implements {LH.Gatherer.FRGathererInstance} */
25
- declare class Stacks extends FRGatherer implements LH.Gatherer.FRGathererInstance {
24
+ /** @implements {LH.Gatherer.GathererInstance} */
25
+ declare class Stacks extends BaseGatherer implements LH.Gatherer.GathererInstance {
26
26
  /**
27
- * @param {LH.Gatherer.FRTransitionalDriver['executionContext']} executionContext
27
+ * @param {LH.Gatherer.Driver['executionContext']} executionContext
28
28
  * @return {Promise<LH.Artifacts['Stacks']>}
29
29
  */
30
- static collectStacks(executionContext: LH.Gatherer.FRTransitionalDriver['executionContext']): Promise<LH.Artifacts['Stacks']>;
30
+ static collectStacks(executionContext: LH.Gatherer.Driver['executionContext']): Promise<LH.Artifacts['Stacks']>;
31
31
  /**
32
- * @param {LH.Gatherer.FRTransitionalContext} context
32
+ * @param {LH.Gatherer.Context} context
33
33
  * @return {Promise<LH.Artifacts['Stacks']>}
34
34
  */
35
- getArtifact(context: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['Stacks']>;
35
+ getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts['Stacks']>;
36
36
  }
37
- import FRGatherer from '../base-gatherer.js';
37
+ import BaseGatherer from '../base-gatherer.js';
38
38
  //# sourceMappingURL=stacks.d.ts.map
@@ -16,10 +16,10 @@ import {createRequire} from 'module';
16
16
 
17
17
  import log from 'lighthouse-logger';
18
18
 
19
- import FRGatherer from '../base-gatherer.js';
19
+ import BaseGatherer from '../base-gatherer.js';
20
20
 
21
21
 
22
- // This is removed by rollup, because the only usage is to resolve a module path
22
+ // This is removed by esbuild (if minified), because the only usage is to resolve a module path
23
23
  // but that is replaced by the inline-fs plugin, leaving `require` unused.
24
24
  const require = /* #__PURE__ */ createRequire(import.meta.url);
25
25
 
@@ -85,8 +85,8 @@ async function detectLibraries() {
85
85
  /* c8 ignore stop */
86
86
 
87
87
 
88
- /** @implements {LH.Gatherer.FRGathererInstance} */
89
- class Stacks extends FRGatherer {
88
+ /** @implements {LH.Gatherer.GathererInstance} */
89
+ class Stacks extends BaseGatherer {
90
90
  constructor() {
91
91
  super();
92
92
 
@@ -97,7 +97,7 @@ class Stacks extends FRGatherer {
97
97
  }
98
98
 
99
99
  /**
100
- * @param {LH.Gatherer.FRTransitionalDriver['executionContext']} executionContext
100
+ * @param {LH.Gatherer.Driver['executionContext']} executionContext
101
101
  * @return {Promise<LH.Artifacts['Stacks']>}
102
102
  */
103
103
  static async collectStacks(executionContext) {
@@ -122,7 +122,7 @@ class Stacks extends FRGatherer {
122
122
  }
123
123
 
124
124
  /**
125
- * @param {LH.Gatherer.FRTransitionalContext} context
125
+ * @param {LH.Gatherer.Context} context
126
126
  * @return {Promise<LH.Artifacts['Stacks']>}
127
127
  */
128
128
  async getArtifact(context) {