lighthouse 9.5.0-dev.20220907 → 9.5.0-dev.20220909

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 (148) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/cli/test/smokehouse/core-tests.js +2 -3
  3. package/cli/test/smokehouse/lighthouse-runners/bundle.js +1 -1
  4. package/core/audits/bootup-time.js +2 -2
  5. package/core/audits/byte-efficiency/byte-efficiency-audit.js +7 -6
  6. package/core/audits/byte-efficiency/duplicated-javascript.js +1 -1
  7. package/core/audits/byte-efficiency/legacy-javascript.js +2 -2
  8. package/core/audits/byte-efficiency/offscreen-images.js +2 -2
  9. package/core/audits/byte-efficiency/render-blocking-resources.js +5 -5
  10. package/core/audits/byte-efficiency/total-byte-weight.js +1 -1
  11. package/core/audits/byte-efficiency/unminified-css.js +1 -1
  12. package/core/audits/byte-efficiency/unused-css-rules.js +1 -1
  13. package/core/audits/byte-efficiency/unused-javascript.js +4 -4
  14. package/core/audits/byte-efficiency/uses-long-cache-ttl.js +1 -1
  15. package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
  16. package/core/audits/critical-request-chains.js +1 -1
  17. package/core/audits/csp-xss.js +1 -1
  18. package/core/audits/deprecations.js +2 -2
  19. package/core/audits/diagnostics.js +7 -7
  20. package/core/audits/dobetterweb/charset.js +1 -1
  21. package/core/audits/dobetterweb/uses-http2.js +6 -6
  22. package/core/audits/errors-in-console.js +2 -2
  23. package/core/audits/final-screenshot.js +2 -2
  24. package/core/audits/font-display.js +1 -1
  25. package/core/audits/installable-manifest.js +1 -1
  26. package/core/audits/is-on-https.js +1 -1
  27. package/core/audits/long-tasks.js +4 -4
  28. package/core/audits/main-thread-tasks.js +1 -1
  29. package/core/audits/mainthread-work-breakdown.js +1 -1
  30. package/core/audits/maskable-icon.js +1 -1
  31. package/core/audits/metrics/cumulative-layout-shift.js +1 -1
  32. package/core/audits/metrics/experimental-interaction-to-next-paint.js +1 -1
  33. package/core/audits/metrics/first-contentful-paint-3g.js +1 -1
  34. package/core/audits/metrics/first-contentful-paint.js +1 -1
  35. package/core/audits/metrics/first-meaningful-paint.js +1 -1
  36. package/core/audits/metrics/interactive.js +1 -1
  37. package/core/audits/metrics/largest-contentful-paint.js +1 -1
  38. package/core/audits/metrics/max-potential-fid.js +1 -1
  39. package/core/audits/metrics/speed-index.js +1 -1
  40. package/core/audits/metrics/total-blocking-time.js +1 -1
  41. package/core/audits/metrics.js +2 -2
  42. package/core/audits/network-requests.js +2 -2
  43. package/core/audits/network-rtt.js +3 -3
  44. package/core/audits/network-server-latency.js +3 -3
  45. package/core/audits/no-unload-listeners.js +2 -2
  46. package/core/audits/performance-budget.js +2 -2
  47. package/core/audits/predictive-perf.js +8 -8
  48. package/core/audits/preload-fonts.js +1 -1
  49. package/core/audits/preload-lcp-image.js +4 -4
  50. package/core/audits/redirects.js +4 -4
  51. package/core/audits/resource-summary.js +1 -1
  52. package/core/audits/screenshot-thumbnails.js +1 -1
  53. package/core/audits/script-treemap-data.js +5 -5
  54. package/core/audits/seo/canonical.js +1 -1
  55. package/core/audits/seo/font-size.js +2 -2
  56. package/core/audits/seo/http-status-code.js +1 -1
  57. package/core/audits/seo/is-crawlable.js +1 -1
  58. package/core/audits/seo/tap-targets.js +2 -2
  59. package/core/audits/server-response-time.js +1 -1
  60. package/core/audits/splash-screen.js +1 -1
  61. package/core/audits/themed-omnibox.js +1 -1
  62. package/core/audits/third-party-facades.js +3 -3
  63. package/core/audits/third-party-summary.js +2 -2
  64. package/core/audits/timing-budget.js +2 -2
  65. package/core/audits/user-timings.js +1 -1
  66. package/core/audits/uses-rel-preconnect.js +9 -8
  67. package/core/audits/uses-rel-preload.js +4 -4
  68. package/core/audits/viewport.js +2 -2
  69. package/core/audits/violation-audit.js +2 -2
  70. package/core/audits/work-during-interaction.js +4 -4
  71. package/core/computed/critical-request-chains.js +5 -3
  72. package/core/computed/image-records.js +3 -1
  73. package/core/computed/js-bundles.js +2 -1
  74. package/core/computed/load-simulator.js +3 -5
  75. package/core/computed/main-resource.js +3 -2
  76. package/core/computed/main-thread-tasks.js +3 -2
  77. package/core/computed/manifest-values.js +3 -1
  78. package/core/computed/metrics/cumulative-layout-shift.js +3 -2
  79. package/core/computed/metrics/first-contentful-paint-all-frames.js +3 -2
  80. package/core/computed/metrics/first-contentful-paint.js +4 -3
  81. package/core/computed/metrics/first-meaningful-paint.js +4 -3
  82. package/core/computed/metrics/interactive.js +4 -3
  83. package/core/computed/metrics/lantern-first-contentful-paint.js +3 -2
  84. package/core/computed/metrics/lantern-first-meaningful-paint.js +4 -3
  85. package/core/computed/metrics/lantern-interactive.js +4 -3
  86. package/core/computed/metrics/lantern-largest-contentful-paint.js +4 -3
  87. package/core/computed/metrics/lantern-max-potential-fid.js +5 -4
  88. package/core/computed/metrics/lantern-metric.js +6 -6
  89. package/core/computed/metrics/lantern-speed-index.js +5 -4
  90. package/core/computed/metrics/lantern-total-blocking-time.js +5 -4
  91. package/core/computed/metrics/largest-contentful-paint-all-frames.js +3 -2
  92. package/core/computed/metrics/largest-contentful-paint.js +4 -3
  93. package/core/computed/metrics/max-potential-fid.js +4 -3
  94. package/core/computed/metrics/metric.js +3 -3
  95. package/core/computed/metrics/navigation-metric.js +4 -3
  96. package/core/computed/metrics/responsiveness.js +3 -2
  97. package/core/computed/metrics/speed-index.js +5 -4
  98. package/core/computed/metrics/timing-summary.js +15 -14
  99. package/core/computed/metrics/total-blocking-time.js +5 -4
  100. package/core/computed/module-duplication.js +5 -3
  101. package/core/computed/network-analysis.js +3 -2
  102. package/core/computed/network-records.js +2 -1
  103. package/core/computed/page-dependency-graph.js +13 -11
  104. package/core/computed/processed-navigation.js +2 -1
  105. package/core/computed/processed-trace.js +2 -1
  106. package/core/computed/resource-summary.js +4 -2
  107. package/core/computed/screenshots.js +2 -1
  108. package/core/computed/speedline.js +3 -2
  109. package/core/computed/unused-css.js +3 -2
  110. package/core/computed/unused-javascript-summary.js +2 -1
  111. package/core/computed/user-timings.js +3 -2
  112. package/core/computed/viewport-meta.js +2 -1
  113. package/core/fraggle-rock/gather/navigation-runner.js +1 -1
  114. package/core/gather/driver/execution-context.js +1 -1
  115. package/core/gather/gatherers/accessibility.js +1 -1
  116. package/core/gather/gatherers/anchor-elements.js +2 -2
  117. package/core/gather/gatherers/dobetterweb/domstats.js +1 -1
  118. package/core/gather/gatherers/dobetterweb/optimized-images.js +1 -1
  119. package/core/gather/gatherers/dobetterweb/password-inputs-with-prevented-paste.js +1 -1
  120. package/core/gather/gatherers/dobetterweb/response-compression.js +1 -1
  121. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +1 -1
  122. package/core/gather/gatherers/full-page-screenshot.js +1 -1
  123. package/core/gather/gatherers/iframe-elements.js +3 -3
  124. package/core/gather/gatherers/image-elements.js +3 -3
  125. package/core/gather/gatherers/inputs.js +2 -2
  126. package/core/gather/gatherers/inspector-issues.js +1 -1
  127. package/core/gather/gatherers/link-elements.js +2 -2
  128. package/core/gather/gatherers/main-document-content.js +1 -1
  129. package/core/gather/gatherers/meta-elements.js +1 -1
  130. package/core/gather/gatherers/script-elements.js +2 -2
  131. package/core/gather/gatherers/seo/embedded-content.js +1 -1
  132. package/core/gather/gatherers/seo/font-size.js +1 -1
  133. package/core/gather/gatherers/seo/tap-targets.js +1 -1
  134. package/core/gather/gatherers/trace-elements.js +5 -5
  135. package/core/index.js +5 -5
  136. package/core/{config → legacy/config}/config.js +7 -7
  137. package/core/{config → legacy/config}/legacy-default-config.js +1 -1
  138. package/core/{gather → legacy/gather}/connections/connection.js +1 -1
  139. package/core/{gather → legacy/gather}/connections/cri.js +1 -1
  140. package/core/{gather → legacy/gather}/connections/raw.js +0 -0
  141. package/core/{gather → legacy/gather}/driver.js +7 -7
  142. package/core/{gather → legacy/gather}/gather-runner.js +19 -19
  143. package/core/lib/asset-saver.js +4 -4
  144. package/core/lib/page-functions.js +11 -18
  145. package/core/runner.js +5 -4
  146. package/package.json +2 -2
  147. package/tsconfig.json +1 -1
  148. package/types/gatherer.d.ts +1 -1
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import LanternMetric from './lantern-metric.js';
8
+ import {LanternMetric} from './lantern-metric.js';
9
9
  import {BaseNode} from '../../lib/dependency-graph/base-node.js';
10
10
 
11
11
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
@@ -197,7 +197,8 @@ class LanternFirstContentfulPaint extends LanternMetric {
197
197
  }
198
198
  }
199
199
 
200
- export default makeComputedArtifact(
200
+ const LanternFirstContentfulPaintComputed = makeComputedArtifact(
201
201
  LanternFirstContentfulPaint,
202
202
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
203
203
  );
204
+ export {LanternFirstContentfulPaintComputed as LanternFirstContentfulPaint};
@@ -5,9 +5,9 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import LanternMetric from './lantern-metric.js';
8
+ import {LanternMetric} from './lantern-metric.js';
9
9
  import {LighthouseError} from '../../lib/lh-error.js';
10
- import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
10
+ import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
11
11
 
12
12
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
13
13
 
@@ -76,7 +76,8 @@ class LanternFirstMeaningfulPaint extends LanternMetric {
76
76
  }
77
77
  }
78
78
 
79
- export default makeComputedArtifact(
79
+ const LanternFirstMeaningfulPaintComputed = makeComputedArtifact(
80
80
  LanternFirstMeaningfulPaint,
81
81
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
82
82
  );
83
+ export {LanternFirstMeaningfulPaintComputed as LanternFirstMeaningfulPaint};
@@ -5,10 +5,10 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import LanternMetric from './lantern-metric.js';
8
+ import {LanternMetric} from './lantern-metric.js';
9
9
  import {BaseNode} from '../../lib/dependency-graph/base-node.js';
10
10
  import {NetworkRequest} from '../../lib/network-request.js';
11
- import LanternFirstMeaningfulPaint from './lantern-first-meaningful-paint.js';
11
+ import {LanternFirstMeaningfulPaint} from './lantern-first-meaningful-paint.js';
12
12
 
13
13
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
14
14
 
@@ -106,7 +106,8 @@ class LanternInteractive extends LanternMetric {
106
106
  }
107
107
  }
108
108
 
109
- export default makeComputedArtifact(
109
+ const LanternInteractiveComputed = makeComputedArtifact(
110
110
  LanternInteractive,
111
111
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
112
112
  );
113
+ export {LanternInteractiveComputed as LanternInteractive};
@@ -5,9 +5,9 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import LanternMetric from './lantern-metric.js';
8
+ import {LanternMetric} from './lantern-metric.js';
9
9
  import {LighthouseError} from '../../lib/lh-error.js';
10
- import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
10
+ import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
11
11
 
12
12
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
13
13
 
@@ -104,7 +104,8 @@ class LanternLargestContentfulPaint extends LanternMetric {
104
104
  }
105
105
  }
106
106
 
107
- export default makeComputedArtifact(
107
+ const LanternLargestContentfulPaintComputed = makeComputedArtifact(
108
108
  LanternLargestContentfulPaint,
109
109
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
110
110
  );
111
+ export {LanternLargestContentfulPaintComputed as LanternLargestContentfulPaint};
@@ -5,13 +5,13 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import LanternMetricArtifact from './lantern-metric.js';
8
+ import {LanternMetric} from './lantern-metric.js';
9
9
  import {BaseNode} from '../../lib/dependency-graph/base-node.js';
10
- import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
10
+ import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
11
11
 
12
12
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
13
13
 
14
- class LanternMaxPotentialFID extends LanternMetricArtifact {
14
+ class LanternMaxPotentialFID extends LanternMetric {
15
15
  /**
16
16
  * @return {LH.Gatherer.Simulation.MetricCoefficients}
17
17
  */
@@ -86,7 +86,8 @@ class LanternMaxPotentialFID extends LanternMetricArtifact {
86
86
  }
87
87
  }
88
88
 
89
- export default makeComputedArtifact(
89
+ const LanternMaxPotentialFIDComputed = makeComputedArtifact(
90
90
  LanternMaxPotentialFID,
91
91
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
92
92
  );
93
+ export {LanternMaxPotentialFIDComputed as LanternMaxPotentialFID};
@@ -6,10 +6,10 @@
6
6
 
7
7
  import {BaseNode} from '../../lib/dependency-graph/base-node.js';
8
8
  import {NetworkRequest} from '../../lib/network-request.js';
9
- import ProcessedTrace from '../processed-trace.js';
10
- import ProcessedNavigation from '../processed-navigation.js';
11
- import PageDependencyGraph from '../page-dependency-graph.js';
12
- import LoadSimulator from '../load-simulator.js';
9
+ import {ProcessedTrace} from '../processed-trace.js';
10
+ import {ProcessedNavigation} from '../processed-navigation.js';
11
+ import {PageDependencyGraph} from '../page-dependency-graph.js';
12
+ import {LoadSimulator} from '../load-simulator.js';
13
13
 
14
14
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
15
15
  /** @typedef {import('../../lib/dependency-graph/network-node').NetworkNode} NetworkNode */
@@ -24,7 +24,7 @@ import LoadSimulator from '../load-simulator.js';
24
24
  * @property {{speedIndex: number}=} speedline
25
25
  */
26
26
 
27
- class LanternMetricArtifact {
27
+ class LanternMetric {
28
28
  /**
29
29
  * @param {Node} dependencyGraph
30
30
  * @param {function(NetworkNode):boolean=} condition
@@ -161,4 +161,4 @@ class LanternMetricArtifact {
161
161
  }
162
162
  }
163
163
 
164
- export default LanternMetricArtifact;
164
+ export {LanternMetric};
@@ -5,10 +5,10 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import LanternMetric from './lantern-metric.js';
8
+ import {LanternMetric} from './lantern-metric.js';
9
9
  import {BaseNode} from '../../lib/dependency-graph/base-node.js';
10
- import Speedline from '../speedline.js';
11
- import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
10
+ import {Speedline} from '../speedline.js';
11
+ import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
12
12
  import {throttling as defaultThrottling} from '../../config/constants.js';
13
13
 
14
14
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
@@ -143,7 +143,8 @@ class LanternSpeedIndex extends LanternMetric {
143
143
  }
144
144
  }
145
145
 
146
- export default makeComputedArtifact(
146
+ const LanternSpeedIndexComputed = makeComputedArtifact(
147
147
  LanternSpeedIndex,
148
148
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
149
149
  );
150
+ export {LanternSpeedIndexComputed as LanternSpeedIndex};
@@ -5,10 +5,10 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import LanternMetric from './lantern-metric.js';
8
+ import {LanternMetric} from './lantern-metric.js';
9
9
  import {BaseNode} from '../../lib/dependency-graph/base-node.js';
10
- import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
11
- import LanternInteractive from './lantern-interactive.js';
10
+ import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
11
+ import {LanternInteractive} from './lantern-interactive.js';
12
12
  import {BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime} from './tbt-utils.js';
13
13
 
14
14
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
@@ -119,7 +119,8 @@ class LanternTotalBlockingTime extends LanternMetric {
119
119
  }
120
120
  }
121
121
 
122
- export default makeComputedArtifact(
122
+ const LanternTotalBlockingTimeComputed = makeComputedArtifact(
123
123
  LanternTotalBlockingTime,
124
124
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
125
125
  );
126
+ export {LanternTotalBlockingTimeComputed as LanternTotalBlockingTime};
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  import {makeComputedArtifact} from '../computed-artifact.js';
12
- import NavigationMetric from './navigation-metric.js';
12
+ import {NavigationMetric} from './navigation-metric.js';
13
13
  import {LighthouseError} from '../../lib/lh-error.js';
14
14
 
15
15
  class LargestContentfulPaintAllFrames extends NavigationMetric {
@@ -38,7 +38,8 @@ class LargestContentfulPaintAllFrames extends NavigationMetric {
38
38
  }
39
39
  }
40
40
 
41
- export default makeComputedArtifact(
41
+ const LargestContentfulPaintAllFramesComputed = makeComputedArtifact(
42
42
  LargestContentfulPaintAllFrames,
43
43
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
44
44
  );
45
+ export {LargestContentfulPaintAllFramesComputed as LargestContentfulPaintAllFrames};
@@ -13,9 +13,9 @@
13
13
  */
14
14
 
15
15
  import {makeComputedArtifact} from '../computed-artifact.js';
16
- import NavigationMetric from './navigation-metric.js';
16
+ import {NavigationMetric} from './navigation-metric.js';
17
17
  import {LighthouseError} from '../../lib/lh-error.js';
18
- import LanternLargestContentfulPaint from './lantern-largest-contentful-paint.js';
18
+ import {LanternLargestContentfulPaint} from './lantern-largest-contentful-paint.js';
19
19
 
20
20
  class LargestContentfulPaint extends NavigationMetric {
21
21
  /**
@@ -45,7 +45,8 @@ class LargestContentfulPaint extends NavigationMetric {
45
45
  }
46
46
  }
47
47
 
48
- export default makeComputedArtifact(
48
+ const LargestContentfulPaintComputed = makeComputedArtifact(
49
49
  LargestContentfulPaint,
50
50
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
51
51
  );
52
+ export {LargestContentfulPaintComputed as LargestContentfulPaint};
@@ -5,8 +5,8 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import NavigationMetric from './navigation-metric.js';
9
- import LanternMaxPotentialFID from './lantern-max-potential-fid.js';
8
+ import {NavigationMetric} from './navigation-metric.js';
9
+ import {LanternMaxPotentialFID} from './lantern-max-potential-fid.js';
10
10
  import {TraceProcessor} from '../../lib/tracehouse/trace-processor.js';
11
11
 
12
12
  class MaxPotentialFID extends NavigationMetric {
@@ -38,7 +38,8 @@ class MaxPotentialFID extends NavigationMetric {
38
38
  }
39
39
  }
40
40
 
41
- export default makeComputedArtifact(
41
+ const MaxPotentialFIDComputed = makeComputedArtifact(
42
42
  MaxPotentialFID,
43
43
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
44
44
  );
45
+ export {MaxPotentialFIDComputed as MaxPotentialFID};
@@ -5,9 +5,9 @@
5
5
  */
6
6
 
7
7
  import {TraceProcessor} from '../../lib/tracehouse/trace-processor.js';
8
- import ProcessedTrace from '../processed-trace.js';
9
- import ProcessedNavigation from '../processed-navigation.js';
10
- import NetworkRecords from '../network-records.js';
8
+ import {ProcessedTrace} from '../processed-trace.js';
9
+ import {ProcessedNavigation} from '../processed-navigation.js';
10
+ import {NetworkRecords} from '../network-records.js';
11
11
 
12
12
  /**
13
13
  * @fileOverview Encapsulates logic for choosing the correct metric computation method based on the
@@ -4,11 +4,12 @@
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 Metric from './metric.js';
8
-
9
7
  /**
10
8
  * @fileOverview Enforces that a metric can only be computed on navigations.
11
9
  */
10
+
11
+ import Metric from './metric.js';
12
+
12
13
  class NavigationMetric extends Metric {
13
14
  /**
14
15
  * @param {LH.Artifacts.NavigationMetricComputationData} data
@@ -42,4 +43,4 @@ class NavigationMetric extends Metric {
42
43
  }
43
44
  }
44
45
 
45
- export default NavigationMetric;
46
+ export {NavigationMetric};
@@ -30,7 +30,7 @@
30
30
  * @typedef {{name: 'FallbackTiming', duration: number}} FallbackTimingEvent
31
31
  */
32
32
 
33
- import ProcessedTrace from '../processed-trace.js';
33
+ import {ProcessedTrace} from '../processed-trace.js';
34
34
  import {makeComputedArtifact} from '../computed-artifact.js';
35
35
 
36
36
  const KEYBOARD_EVENTS = new Set(['keydown', 'keypress', 'keyup']);
@@ -150,7 +150,8 @@ class Responsiveness {
150
150
  }
151
151
  }
152
152
 
153
- export default makeComputedArtifact(Responsiveness, [
153
+ const ResponsivenessComputed = makeComputedArtifact(Responsiveness, [
154
154
  'trace',
155
155
  'settings',
156
156
  ]);
157
+ export {ResponsivenessComputed as Responsiveness};
@@ -5,9 +5,9 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
- import NavigationMetric from './navigation-metric.js';
9
- import LanternSpeedIndex from './lantern-speed-index.js';
10
- import Speedline from '../speedline.js';
8
+ import {NavigationMetric} from './navigation-metric.js';
9
+ import {LanternSpeedIndex} from './lantern-speed-index.js';
10
+ import {Speedline} from '../speedline.js';
11
11
 
12
12
  class SpeedIndex extends NavigationMetric {
13
13
  /**
@@ -33,7 +33,8 @@ class SpeedIndex extends NavigationMetric {
33
33
  }
34
34
  }
35
35
 
36
- export default makeComputedArtifact(
36
+ const SpeedIndexComputed = makeComputedArtifact(
37
37
  SpeedIndex,
38
38
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
39
39
  );
40
+ export {SpeedIndexComputed as SpeedIndex};
@@ -4,19 +4,19 @@
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 ProcessedTrace from '../processed-trace.js';
8
- import ProcessedNavigation from '../processed-navigation.js';
9
- import Speedline from '../speedline.js';
10
- import FirstContentfulPaint from './first-contentful-paint.js';
11
- import FirstContentfulPaintAllFrames from './first-contentful-paint-all-frames.js';
12
- import FirstMeaningfulPaint from './first-meaningful-paint.js';
13
- import LargestContentfulPaint from './largest-contentful-paint.js';
14
- import LargestContentfulPaintAllFrames from './largest-contentful-paint-all-frames.js';
15
- import Interactive from './interactive.js';
16
- import CumulativeLayoutShift from './cumulative-layout-shift.js';
17
- import SpeedIndex from './speed-index.js';
18
- import MaxPotentialFID from './max-potential-fid.js';
19
- import TotalBlockingTime from './total-blocking-time.js';
7
+ import {ProcessedTrace} from '../processed-trace.js';
8
+ import {ProcessedNavigation} from '../processed-navigation.js';
9
+ import {Speedline} from '../speedline.js';
10
+ import {FirstContentfulPaint} from './first-contentful-paint.js';
11
+ import {FirstContentfulPaintAllFrames} from './first-contentful-paint-all-frames.js';
12
+ import {FirstMeaningfulPaint} from './first-meaningful-paint.js';
13
+ import {LargestContentfulPaint} from './largest-contentful-paint.js';
14
+ import {LargestContentfulPaintAllFrames} from './largest-contentful-paint-all-frames.js';
15
+ import {Interactive} from './interactive.js';
16
+ import {CumulativeLayoutShift} from './cumulative-layout-shift.js';
17
+ import {SpeedIndex} from './speed-index.js';
18
+ import {MaxPotentialFID} from './max-potential-fid.js';
19
+ import {TotalBlockingTime} from './total-blocking-time.js';
20
20
  import {makeComputedArtifact} from '../computed-artifact.js';
21
21
 
22
22
  class TimingSummary {
@@ -150,7 +150,8 @@ class TimingSummary {
150
150
  }
151
151
  }
152
152
 
153
- export default makeComputedArtifact(
153
+ const TimingSummaryComputed = makeComputedArtifact(
154
154
  TimingSummary,
155
155
  ['devtoolsLog', 'gatherContext', 'settings', 'trace', 'URL']
156
156
  );
157
+ export {TimingSummaryComputed as TimingSummary};
@@ -7,8 +7,8 @@
7
7
  import {makeComputedArtifact} from '../computed-artifact.js';
8
8
  import ComputedMetric from './metric.js';
9
9
  import {TraceProcessor} from '../../lib/tracehouse/trace-processor.js';
10
- import LanternTotalBlockingTime from './lantern-total-blocking-time.js';
11
- import TimetoInteractive from './interactive.js';
10
+ import {LanternTotalBlockingTime} from './lantern-total-blocking-time.js';
11
+ import {Interactive} from './interactive.js';
12
12
  import {calculateSumOfBlockingTime} from './tbt-utils.js';
13
13
 
14
14
  /**
@@ -46,7 +46,7 @@ class TotalBlockingTime extends ComputedMetric {
46
46
  if (data.processedNavigation) {
47
47
  const {firstContentfulPaint} = data.processedNavigation.timings;
48
48
  const metricData = ComputedMetric.getMetricComputationInput(data);
49
- const interactiveTimeMs = (await TimetoInteractive.request(metricData, context)).timing;
49
+ const interactiveTimeMs = (await Interactive.request(metricData, context)).timing;
50
50
 
51
51
  return {
52
52
  timing: calculateSumOfBlockingTime(
@@ -67,7 +67,8 @@ class TotalBlockingTime extends ComputedMetric {
67
67
  }
68
68
  }
69
69
 
70
- export default makeComputedArtifact(
70
+ const TotalBlockingTimeComputed = makeComputedArtifact(
71
71
  TotalBlockingTime,
72
72
  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
73
73
  );
74
+ export {TotalBlockingTimeComputed as TotalBlockingTime};
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from './computed-artifact.js';
8
- import JsBundles from './js-bundles.js';
8
+ import {JSBundles} from './js-bundles.js';
9
9
 
10
10
  const RELATIVE_SIZE_THRESHOLD = 0.1;
11
11
  const ABSOLUTE_SIZE_THRESHOLD_BYTES = 1024 * 0.5;
@@ -77,7 +77,7 @@ class ModuleDuplication {
77
77
  * @param {LH.Artifacts.ComputedContext} context
78
78
  */
79
79
  static async compute_(artifacts, context) {
80
- const bundles = await JsBundles.request(artifacts, context);
80
+ const bundles = await JSBundles.request(artifacts, context);
81
81
 
82
82
  /**
83
83
  * @typedef SourceData
@@ -133,4 +133,6 @@ class ModuleDuplication {
133
133
  }
134
134
  }
135
135
 
136
- export default makeComputedArtifact(ModuleDuplication, ['Scripts', 'SourceMaps']);
136
+ const ModuleDuplicationComputed =
137
+ makeComputedArtifact(ModuleDuplication, ['Scripts', 'SourceMaps']);
138
+ export {ModuleDuplicationComputed as ModuleDuplication};
@@ -6,7 +6,7 @@
6
6
 
7
7
  import {makeComputedArtifact} from './computed-artifact.js';
8
8
  import {NetworkAnalyzer} from '../lib/dependency-graph/simulator/network-analyzer.js';
9
- import NetworkRecords from './network-records.js';
9
+ import {NetworkRecords} from './network-records.js';
10
10
 
11
11
  class NetworkAnalysis {
12
12
  /**
@@ -60,4 +60,5 @@ class NetworkAnalysis {
60
60
  }
61
61
  }
62
62
 
63
- export default makeComputedArtifact(NetworkAnalysis, null);
63
+ const NetworkAnalysisComputed = makeComputedArtifact(NetworkAnalysis, null);
64
+ export {NetworkAnalysisComputed as NetworkAnalysis};
@@ -17,4 +17,5 @@ class NetworkRecords {
17
17
  }
18
18
  }
19
19
 
20
- export default makeComputedArtifact(NetworkRecords, null);
20
+ const NetworkRecordsComputed = makeComputedArtifact(NetworkRecords, null);
21
+ export {NetworkRecordsComputed as NetworkRecords};
@@ -9,13 +9,21 @@ import {NetworkNode} from '../lib/dependency-graph/network-node.js';
9
9
  import {CPUNode} from '../lib/dependency-graph/cpu-node.js';
10
10
  import {TraceProcessor} from '../lib/tracehouse/trace-processor.js';
11
11
  import {NetworkRequest} from '../lib/network-request.js';
12
- import ProcessedTrace from './processed-trace.js';
13
- import NetworkRecords from './network-records.js';
12
+ import {ProcessedTrace} from './processed-trace.js';
13
+ import {NetworkRecords} from './network-records.js';
14
14
  import {NetworkAnalyzer} from '../lib/dependency-graph/simulator/network-analyzer.js';
15
15
 
16
16
  /** @typedef {import('../lib/dependency-graph/base-node.js').Node} Node */
17
17
  /** @typedef {Omit<LH.Artifacts['URL'], 'initialUrl'|'finalUrl'>} URLArtifact */
18
18
 
19
+ /**
20
+ * @typedef {Object} NetworkNodeOutput
21
+ * @property {Array<NetworkNode>} nodes
22
+ * @property {Map<string, NetworkNode>} idToNodeMap
23
+ * @property {Map<string, Array<NetworkNode>>} urlToNodeMap
24
+ * @property {Map<string, NetworkNode|null>} frameIdToNodeMap
25
+ */
26
+
19
27
  // Shorter tasks have negligible impact on simulation results.
20
28
  const SIGNIFICANT_DUR_THRESHOLD_MS = 10;
21
29
 
@@ -503,12 +511,6 @@ class PageDependencyGraph {
503
511
  }
504
512
  }
505
513
 
506
- export default makeComputedArtifact(PageDependencyGraph, ['devtoolsLog', 'trace', 'URL']);
507
-
508
- /**
509
- * @typedef {Object} NetworkNodeOutput
510
- * @property {Array<NetworkNode>} nodes
511
- * @property {Map<string, NetworkNode>} idToNodeMap
512
- * @property {Map<string, Array<NetworkNode>>} urlToNodeMap
513
- * @property {Map<string, NetworkNode|null>} frameIdToNodeMap
514
- */
514
+ const PageDependencyGraphComputed =
515
+ makeComputedArtifact(PageDependencyGraph, ['devtoolsLog', 'trace', 'URL']);
516
+ export {PageDependencyGraphComputed as PageDependencyGraph};
@@ -17,4 +17,5 @@ class ProcessedNavigation {
17
17
  }
18
18
  }
19
19
 
20
- export default makeComputedArtifact(ProcessedNavigation, null);
20
+ const ProcessedNavigationComputed = makeComputedArtifact(ProcessedNavigation, null);
21
+ export {ProcessedNavigationComputed as ProcessedNavigation};
@@ -17,4 +17,5 @@ class ProcessedTrace {
17
17
  }
18
18
  }
19
19
 
20
- export default makeComputedArtifact(ProcessedTrace, null);
20
+ const ProcessedTraceComputed = makeComputedArtifact(ProcessedTrace, null);
21
+ export {ProcessedTraceComputed as ProcessedTrace};
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from './computed-artifact.js';
8
- import NetworkRecords from './network-records.js';
8
+ import {NetworkRecords} from './network-records.js';
9
9
  import {NetworkRequest} from '../lib/network-request.js';
10
10
  import {Budget} from '../config/budget.js';
11
11
  import {Util} from '../util.cjs';
@@ -109,4 +109,6 @@ class ResourceSummary {
109
109
  }
110
110
  }
111
111
 
112
- export default makeComputedArtifact(ResourceSummary, ['URL', 'devtoolsLog', 'budgets']);
112
+ const ResourceSummaryComputed =
113
+ makeComputedArtifact(ResourceSummary, ['URL', 'devtoolsLog', 'budgets']);
114
+ export {ResourceSummaryComputed as ResourceSummary};
@@ -25,4 +25,5 @@ class Screenshots {
25
25
  }
26
26
  }
27
27
 
28
- export default makeComputedArtifact(Screenshots, null);
28
+ const ScreenshotsComputed = makeComputedArtifact(Screenshots, null);
29
+ export {ScreenshotsComputed as Screenshots};
@@ -8,7 +8,7 @@ import speedline from 'speedline-core';
8
8
 
9
9
  import {makeComputedArtifact} from './computed-artifact.js';
10
10
  import {LighthouseError} from '../lib/lh-error.js';
11
- import ProcessedTrace from './processed-trace.js';
11
+ import {ProcessedTrace} from './processed-trace.js';
12
12
 
13
13
  class Speedline {
14
14
  /**
@@ -51,4 +51,5 @@ class Speedline {
51
51
  }
52
52
  }
53
53
 
54
- export default makeComputedArtifact(Speedline, null);
54
+ const SpeedlineComputed = makeComputedArtifact(Speedline, null);
55
+ export {SpeedlineComputed as Speedline};
@@ -6,7 +6,7 @@
6
6
 
7
7
  import {makeComputedArtifact} from './computed-artifact.js';
8
8
  import {ByteEfficiencyAudit} from '../audits/byte-efficiency/byte-efficiency-audit.js';
9
- import NetworkRecords from './network-records.js';
9
+ import {NetworkRecords} from './network-records.js';
10
10
 
11
11
  const PREVIEW_LENGTH = 100;
12
12
 
@@ -149,4 +149,5 @@ class UnusedCSS {
149
149
  }
150
150
  }
151
151
 
152
- export default makeComputedArtifact(UnusedCSS, ['CSSUsage', 'devtoolsLog']);
152
+ const UnusedCSSComputed = makeComputedArtifact(UnusedCSS, ['CSSUsage', 'devtoolsLog']);
153
+ export {UnusedCSSComputed as UnusedCSS};
@@ -148,7 +148,8 @@ class UnusedJavascriptSummary {
148
148
  }
149
149
  }
150
150
 
151
- export default makeComputedArtifact(
151
+ const UnusedJavascriptSummaryComputed = makeComputedArtifact(
152
152
  UnusedJavascriptSummary,
153
153
  ['bundle', 'scriptCoverage', 'scriptId']
154
154
  );
155
+ export {UnusedJavascriptSummaryComputed as UnusedJavascriptSummary};
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import {makeComputedArtifact} from './computed-artifact.js';
8
- import ProcessedTrace from './processed-trace.js';
8
+ import {ProcessedTrace} from './processed-trace.js';
9
9
 
10
10
  /** @typedef {{name: string, isMark: true, args: LH.TraceEvent['args'], startTime: number}} MarkEvent */
11
11
  /** @typedef {{name: string, isMark: false, args: LH.TraceEvent['args'], startTime: number, endTime: number, duration: number}} MeasureEvent */
@@ -79,4 +79,5 @@ class UserTimings {
79
79
  }
80
80
  }
81
81
 
82
- export default makeComputedArtifact(UserTimings, null);
82
+ const UserTimingsComputed = makeComputedArtifact(UserTimings, null);
83
+ export {UserTimingsComputed as UserTimings};
@@ -45,7 +45,8 @@ class ViewportMeta {
45
45
  }
46
46
  }
47
47
 
48
- export default makeComputedArtifact(ViewportMeta, null);
48
+ const ViewportMetaComputed = makeComputedArtifact(ViewportMeta, null);
49
+ export {ViewportMetaComputed as ViewportMeta};
49
50
 
50
51
  /**
51
52
  * @typedef {object} ViewportMetaResult
@@ -23,7 +23,7 @@ import UrlUtils from '../../lib/url-utils.js';
23
23
  import {getPageLoadError} from '../../lib/navigation-error.js';
24
24
  import Trace from '../../gather/gatherers/trace.js';
25
25
  import DevtoolsLog from '../../gather/gatherers/devtools-log.js';
26
- import NetworkRecords from '../../computed/network-records.js';
26
+ import {NetworkRecords} from '../../computed/network-records.js';
27
27
 
28
28
  /**
29
29
  * @typedef NavigationContext
@@ -110,7 +110,7 @@ class ExecutionContext {
110
110
  return new Promise(function (resolve) {
111
111
  return Promise.resolve()
112
112
  .then(_ => ${expression})
113
- .catch(${pageFunctions.wrapRuntimeEvalErrorInBrowserString})
113
+ .catch(${pageFunctions.wrapRuntimeEvalErrorInBrowser})
114
114
  .then(resolve);
115
115
  });
116
116
  }())