lighthouse 9.1.0-dev.20211129 → 9.1.0-dev.20211130

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 (45) hide show
  1. package/lighthouse-cli/test/smokehouse/frontends/lib.js +5 -3
  2. package/lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js +1 -48
  3. package/lighthouse-cli/test/smokehouse/smokehouse.js +50 -0
  4. package/lighthouse-core/computed/computed-artifact.js +14 -7
  5. package/lighthouse-core/computed/critical-request-chains.js +1 -1
  6. package/lighthouse-core/computed/image-records.js +1 -1
  7. package/lighthouse-core/computed/js-bundles.js +1 -1
  8. package/lighthouse-core/computed/load-simulator.js +1 -1
  9. package/lighthouse-core/computed/main-resource.js +1 -1
  10. package/lighthouse-core/computed/main-thread-tasks.js +1 -1
  11. package/lighthouse-core/computed/manifest-values.js +1 -1
  12. package/lighthouse-core/computed/metrics/cumulative-layout-shift.js +1 -1
  13. package/lighthouse-core/computed/metrics/first-contentful-paint-all-frames.js +4 -1
  14. package/lighthouse-core/computed/metrics/first-contentful-paint.js +4 -1
  15. package/lighthouse-core/computed/metrics/first-meaningful-paint.js +4 -1
  16. package/lighthouse-core/computed/metrics/interactive.js +4 -1
  17. package/lighthouse-core/computed/metrics/lantern-first-contentful-paint.js +4 -1
  18. package/lighthouse-core/computed/metrics/lantern-first-meaningful-paint.js +4 -1
  19. package/lighthouse-core/computed/metrics/lantern-interactive.js +4 -1
  20. package/lighthouse-core/computed/metrics/lantern-largest-contentful-paint.js +4 -1
  21. package/lighthouse-core/computed/metrics/lantern-max-potential-fid.js +4 -1
  22. package/lighthouse-core/computed/metrics/lantern-speed-index.js +4 -1
  23. package/lighthouse-core/computed/metrics/lantern-total-blocking-time.js +4 -1
  24. package/lighthouse-core/computed/metrics/largest-contentful-paint-all-frames.js +4 -1
  25. package/lighthouse-core/computed/metrics/largest-contentful-paint.js +4 -1
  26. package/lighthouse-core/computed/metrics/max-potential-fid.js +4 -1
  27. package/lighthouse-core/computed/metrics/speed-index.js +4 -1
  28. package/lighthouse-core/computed/metrics/timing-summary.js +4 -1
  29. package/lighthouse-core/computed/metrics/total-blocking-time.js +4 -1
  30. package/lighthouse-core/computed/module-duplication.js +2 -2
  31. package/lighthouse-core/computed/network-analysis.js +1 -1
  32. package/lighthouse-core/computed/network-records.js +1 -1
  33. package/lighthouse-core/computed/page-dependency-graph.js +1 -1
  34. package/lighthouse-core/computed/processed-navigation.js +1 -1
  35. package/lighthouse-core/computed/processed-trace.js +1 -1
  36. package/lighthouse-core/computed/resource-summary.js +1 -1
  37. package/lighthouse-core/computed/screenshots.js +1 -1
  38. package/lighthouse-core/computed/speedline.js +1 -1
  39. package/lighthouse-core/computed/trace-of-tab.js +1 -1
  40. package/lighthouse-core/computed/unused-css.js +1 -1
  41. package/lighthouse-core/computed/unused-javascript-summary.js +4 -1
  42. package/lighthouse-core/computed/user-timings.js +1 -1
  43. package/lighthouse-core/computed/viewport-meta.js +1 -1
  44. package/package.json +1 -1
  45. package/types/smokehouse.d.ts +2 -0
@@ -16,13 +16,13 @@
16
16
  import cloneDeep from 'lodash.clonedeep';
17
17
 
18
18
  import smokeTests from '../test-definitions/core-tests.js';
19
- import {runSmokehouse} from '../smokehouse.js';
19
+ import {runSmokehouse, getShardedDefinitions} from '../smokehouse.js';
20
20
 
21
21
  /**
22
22
  * @param {Smokehouse.SmokehouseLibOptions} options
23
23
  */
24
24
  async function smokehouse(options) {
25
- const {urlFilterRegex, skip, modify, ...smokehouseOptions} = options;
25
+ const {urlFilterRegex, skip, modify, shardArg, ...smokehouseOptions} = options;
26
26
 
27
27
  const clonedTests = cloneDeep(smokeTests);
28
28
  const modifiedTests = [];
@@ -41,7 +41,9 @@ async function smokehouse(options) {
41
41
  modifiedTests.push(test);
42
42
  }
43
43
 
44
- return runSmokehouse(modifiedTests, smokehouseOptions);
44
+ const shardedTests = getShardedDefinitions(modifiedTests, shardArg);
45
+
46
+ return runSmokehouse(shardedTests, smokehouseOptions);
45
47
  }
46
48
 
47
49
  export {smokehouse};
@@ -13,7 +13,6 @@
13
13
 
14
14
  /* eslint-disable no-console */
15
15
 
16
- import {strict as assert} from 'assert';
17
16
  import path from 'path';
18
17
  import fs from 'fs';
19
18
  import url from 'url';
@@ -23,7 +22,7 @@ import yargs from 'yargs';
23
22
  import * as yargsHelpers from 'yargs/helpers';
24
23
  import log from 'lighthouse-logger';
25
24
 
26
- import {runSmokehouse} from '../smokehouse.js';
25
+ import {runSmokehouse, getShardedDefinitions} from '../smokehouse.js';
27
26
  import {updateTestDefnFormat} from './back-compat-util.js';
28
27
  import {LH_ROOT} from '../../../../root.js';
29
28
 
@@ -80,52 +79,6 @@ function getDefinitionsToRun(allTestDefns, requestedIds, {invertMatch}) {
80
79
  return smokes;
81
80
  }
82
81
 
83
- /**
84
- * Parses the cli `shardArg` flag into `shardNumber/shardTotal`. Splits
85
- * `testDefns` into `shardTotal` shards and returns the `shardNumber`th shard.
86
- * Shards will differ in size by at most 1.
87
- * Shard params must be 1 ≤ shardNumber ≤ shardTotal.
88
- * @param {Array<Smokehouse.TestDfn>} testDefns
89
- * @param {string=} shardArg
90
- * @return {Array<Smokehouse.TestDfn>}
91
- */
92
- function getShardedDefinitions(testDefns, shardArg) {
93
- if (!shardArg) return testDefns;
94
-
95
- // eslint-disable-next-line max-len
96
- const errorMessage = `'shard' must be of the form 'n/d' and n and d must be positive integers with 1 ≤ n ≤ d. Got '${shardArg}'`;
97
- const match = /^(?<shardNumber>\d+)\/(?<shardTotal>\d+)$/.exec(shardArg);
98
- assert(match && match.groups, errorMessage);
99
- const shardNumber = Number(match.groups.shardNumber);
100
- const shardTotal = Number(match.groups.shardTotal);
101
- assert(shardNumber > 0 && Number.isInteger(shardNumber), errorMessage);
102
- assert(shardTotal > 0 && Number.isInteger(shardTotal));
103
- assert(shardNumber <= shardTotal, errorMessage);
104
-
105
- // Array is sharded with `Math.ceil(length / shardTotal)` shards first
106
- // and then the remaining `Math.floor(length / shardTotal) shards.
107
- // e.g. `[0, 1, 2, 3]` split into 3 shards is `[[0, 1], [2], [3]]`.
108
- const baseSize = Math.floor(testDefns.length / shardTotal);
109
- const biggerSize = baseSize + 1;
110
- const biggerShardCount = testDefns.length % shardTotal;
111
-
112
- // Since we don't have tests for this file, construct all shards so correct
113
- // structure can be asserted.
114
- const shards = [];
115
- let index = 0;
116
- for (let i = 0; i < shardTotal; i++) {
117
- const shardSize = i < biggerShardCount ? biggerSize : baseSize;
118
- shards.push(testDefns.slice(index, index + shardSize));
119
- index += shardSize;
120
- }
121
- assert.equal(shards.length, shardTotal);
122
- assert.deepEqual(shards.flat(), testDefns);
123
-
124
- const shardDefns = shards[shardNumber - 1];
125
- console.log(`In this shard (${shardArg}), running: ${shardDefns.map(d => d.id).join(' ')}\n`);
126
- return shardDefns;
127
- }
128
-
129
82
  /**
130
83
  * Prune the `networkRequests` from the test expectations when `takeNetworkRequestUrls`
131
84
  * is not defined. Custom servers may not have this method available in-process.
@@ -32,6 +32,8 @@
32
32
  * @property {Run[]} runs
33
33
  */
34
34
 
35
+ import {strict as assert} from 'assert';
36
+
35
37
  import log from 'lighthouse-logger';
36
38
 
37
39
  import {runLighthouse as cliLighthouseRunner} from './lighthouse-runners/cli.js';
@@ -227,6 +229,54 @@ function getAssertionLog(count) {
227
229
  return `${count} assertion${plural}`;
228
230
  }
229
231
 
232
+ /**
233
+ * Parses the cli `shardArg` flag into `shardNumber/shardTotal`. Splits
234
+ * `testDefns` into `shardTotal` shards and returns the `shardNumber`th shard.
235
+ * Shards will differ in size by at most 1.
236
+ * Shard params must be 1 ≤ shardNumber ≤ shardTotal.
237
+ * @param {Array<Smokehouse.TestDfn>} testDefns
238
+ * @param {string=} shardArg
239
+ * @return {Array<Smokehouse.TestDfn>}
240
+ */
241
+ function getShardedDefinitions(testDefns, shardArg) {
242
+ if (!shardArg) return testDefns;
243
+
244
+ // eslint-disable-next-line max-len
245
+ const errorMessage = `'shard' must be of the form 'n/d' and n and d must be positive integers with 1 ≤ n ≤ d. Got '${shardArg}'`;
246
+ const match = /^(?<shardNumber>\d+)\/(?<shardTotal>\d+)$/.exec(shardArg);
247
+ assert(match && match.groups, errorMessage);
248
+ const shardNumber = Number(match.groups.shardNumber);
249
+ const shardTotal = Number(match.groups.shardTotal);
250
+ assert(shardNumber > 0 && Number.isInteger(shardNumber), errorMessage);
251
+ assert(shardTotal > 0 && Number.isInteger(shardTotal));
252
+ assert(shardNumber <= shardTotal, errorMessage);
253
+
254
+ // Array is sharded with `Math.ceil(length / shardTotal)` shards first
255
+ // and then the remaining `Math.floor(length / shardTotal) shards.
256
+ // e.g. `[0, 1, 2, 3]` split into 3 shards is `[[0, 1], [2], [3]]`.
257
+ const baseSize = Math.floor(testDefns.length / shardTotal);
258
+ const biggerSize = baseSize + 1;
259
+ const biggerShardCount = testDefns.length % shardTotal;
260
+
261
+ // Since we don't have tests for this file, construct all shards so correct
262
+ // structure can be asserted.
263
+ const shards = [];
264
+ let index = 0;
265
+ for (let i = 0; i < shardTotal; i++) {
266
+ const shardSize = i < biggerShardCount ? biggerSize : baseSize;
267
+ shards.push(testDefns.slice(index, index + shardSize));
268
+ index += shardSize;
269
+ }
270
+ assert.equal(shards.length, shardTotal);
271
+ assert.deepEqual(shards.flat(), testDefns);
272
+
273
+ const shardDefns = shards[shardNumber - 1];
274
+ console.log(`In this shard (${shardArg}), running: ${shardDefns.map(d => d.id).join(' ')}\n`);
275
+ return shardDefns;
276
+ }
277
+
278
+
230
279
  export {
231
280
  runSmokehouse,
281
+ getShardedDefinitions,
232
282
  };
@@ -11,20 +11,26 @@ const log = require('lighthouse-logger');
11
11
  /**
12
12
  * Decorate computableArtifact with a caching `request()` method which will
13
13
  * automatically call `computableArtifact.compute_()` under the hood.
14
- * @template {{name: string, compute_(artifacts: unknown, context: LH.Artifacts.ComputedContext): Promise<unknown>}} C
14
+ * @template {{name: string, compute_(dependencies: unknown, context: LH.Artifacts.ComputedContext): Promise<unknown>}} C
15
+ * @template {Array<keyof FirstParamType<C['compute_']>>} K
15
16
  * @param {C} computableArtifact
17
+ * @param {(K & ([keyof FirstParamType<C['compute_']>] extends [K[number]] ? unknown : never)) | null} keys List of properties of `dependencies` used by `compute_`; other properties are filtered out. Use `null` to allow all properties. Ensures that only required properties are used for caching result.
16
18
  */
17
- function makeComputedArtifact(computableArtifact) {
19
+ function makeComputedArtifact(computableArtifact, keys) {
18
20
  // tsc (3.1) has more difficulty with template inter-references in jsdoc, so
19
21
  // give types to params and return value the long way, essentially recreating
20
22
  // polymorphic-this behavior for C.
21
23
  /**
22
24
  * Return an automatically cached result from the computed artifact.
23
- * @param {FirstParamType<C['compute_']>} artifacts
25
+ * @param {FirstParamType<C['compute_']>} dependencies
24
26
  * @param {LH.Artifacts.ComputedContext} context
25
27
  * @return {ReturnType<C['compute_']>}
26
28
  */
27
- const request = (artifacts, context) => {
29
+ const request = (dependencies, context) => {
30
+ const pickedDependencies = keys ?
31
+ Object.fromEntries(keys.map(key => [key, dependencies[key]])) :
32
+ dependencies;
33
+
28
34
  // NOTE: break immutability solely for this caching-controller function.
29
35
  const computedCache = /** @type {Map<string, ArbitraryEqualityMap>} */ (context.computedCache);
30
36
  const computedName = computableArtifact.name;
@@ -32,7 +38,8 @@ function makeComputedArtifact(computableArtifact) {
32
38
  const cache = computedCache.get(computedName) || new ArbitraryEqualityMap();
33
39
  computedCache.set(computedName, cache);
34
40
 
35
- const computed = /** @type {ReturnType<C['compute_']>|undefined} */ (cache.get(artifacts));
41
+ /** @type {ReturnType<C['compute_']>|undefined} */
42
+ const computed = cache.get(pickedDependencies);
36
43
  if (computed) {
37
44
  return computed;
38
45
  }
@@ -41,8 +48,8 @@ function makeComputedArtifact(computableArtifact) {
41
48
  log.time(status, 'verbose');
42
49
 
43
50
  const artifactPromise = /** @type {ReturnType<C['compute_']>} */
44
- (computableArtifact.compute_(artifacts, context));
45
- cache.set(artifacts, artifactPromise);
51
+ (computableArtifact.compute_(pickedDependencies, context));
52
+ cache.set(pickedDependencies, artifactPromise);
46
53
 
47
54
  artifactPromise.then(() => log.timeEnd(status)).catch(() => log.timeEnd(status));
48
55
 
@@ -143,4 +143,4 @@ class CriticalRequestChains {
143
143
  }
144
144
  }
145
145
 
146
- module.exports = makeComputedArtifact(CriticalRequestChains);
146
+ module.exports = makeComputedArtifact(CriticalRequestChains, ['URL', 'devtoolsLog', 'trace']);
@@ -59,5 +59,5 @@ class ImageRecords {
59
59
  }
60
60
  }
61
61
 
62
- module.exports = makeComputedArtifact(ImageRecords);
62
+ module.exports = makeComputedArtifact(ImageRecords, ['ImageElements', 'networkRecords']);
63
63
 
@@ -116,4 +116,4 @@ class JSBundles {
116
116
  }
117
117
  }
118
118
 
119
- module.exports = makeComputedArtifact(JSBundles);
119
+ module.exports = makeComputedArtifact(JSBundles, ['ScriptElements', 'SourceMaps']);
@@ -88,4 +88,4 @@ class LoadSimulator {
88
88
  }
89
89
  }
90
90
 
91
- module.exports = makeComputedArtifact(LoadSimulator);
91
+ module.exports = makeComputedArtifact(LoadSimulator, ['devtoolsLog', 'settings']);
@@ -31,4 +31,4 @@ class MainResource {
31
31
  }
32
32
  }
33
33
 
34
- module.exports = makeComputedArtifact(MainResource);
34
+ module.exports = makeComputedArtifact(MainResource, ['URL', 'devtoolsLog']);
@@ -21,4 +21,4 @@ class MainThreadTasks {
21
21
  }
22
22
  }
23
23
 
24
- module.exports = makeComputedArtifact(MainThreadTasks);
24
+ module.exports = makeComputedArtifact(MainThreadTasks, null);
@@ -132,4 +132,4 @@ class ManifestValues {
132
132
  }
133
133
  }
134
134
 
135
- module.exports = makeComputedArtifact(ManifestValues);
135
+ module.exports = makeComputedArtifact(ManifestValues, ['InstallabilityErrors', 'WebAppManifest']);
@@ -126,4 +126,4 @@ class CumulativeLayoutShift {
126
126
  }
127
127
  }
128
128
 
129
- module.exports = makeComputedArtifact(CumulativeLayoutShift);
129
+ module.exports = makeComputedArtifact(CumulativeLayoutShift, null);
@@ -31,4 +31,7 @@ class FirstContentfulPaintAllFrames extends NavigationMetric {
31
31
  }
32
32
  }
33
33
 
34
- module.exports = makeComputedArtifact(FirstContentfulPaintAllFrames);
34
+ module.exports = makeComputedArtifact(
35
+ FirstContentfulPaintAllFrames,
36
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
37
+ );
@@ -34,4 +34,7 @@ class FirstContentfulPaint extends NavigationMetric {
34
34
  }
35
35
  }
36
36
 
37
- module.exports = makeComputedArtifact(FirstContentfulPaint);
37
+ module.exports = makeComputedArtifact(
38
+ FirstContentfulPaint,
39
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
40
+ );
@@ -38,4 +38,7 @@ class FirstMeaningfulPaint extends NavigationMetric {
38
38
  }
39
39
  }
40
40
 
41
- module.exports = makeComputedArtifact(FirstMeaningfulPaint);
41
+ module.exports = makeComputedArtifact(
42
+ FirstMeaningfulPaint,
43
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
44
+ );
@@ -181,7 +181,10 @@ class Interactive extends NavigationMetric {
181
181
  }
182
182
  }
183
183
 
184
- module.exports = makeComputedArtifact(Interactive);
184
+ module.exports = makeComputedArtifact(
185
+ Interactive,
186
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
187
+ );
185
188
 
186
189
  /**
187
190
  * @typedef TimePeriod
@@ -196,4 +196,7 @@ class LanternFirstContentfulPaint extends LanternMetric {
196
196
  }
197
197
  }
198
198
 
199
- module.exports = makeComputedArtifact(LanternFirstContentfulPaint);
199
+ module.exports = makeComputedArtifact(
200
+ LanternFirstContentfulPaint,
201
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
202
+ );
@@ -77,4 +77,7 @@ class LanternFirstMeaningfulPaint extends LanternMetric {
77
77
  }
78
78
  }
79
79
 
80
- module.exports = makeComputedArtifact(LanternFirstMeaningfulPaint);
80
+ module.exports = makeComputedArtifact(
81
+ LanternFirstMeaningfulPaint,
82
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
83
+ );
@@ -107,4 +107,7 @@ class LanternInteractive extends LanternMetric {
107
107
  }
108
108
  }
109
109
 
110
- module.exports = makeComputedArtifact(LanternInteractive);
110
+ module.exports = makeComputedArtifact(
111
+ LanternInteractive,
112
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
113
+ );
@@ -105,4 +105,7 @@ class LanternLargestContentfulPaint extends LanternMetric {
105
105
  }
106
106
  }
107
107
 
108
- module.exports = makeComputedArtifact(LanternLargestContentfulPaint);
108
+ module.exports = makeComputedArtifact(
109
+ LanternLargestContentfulPaint,
110
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
111
+ );
@@ -87,4 +87,7 @@ class LanternMaxPotentialFID extends LanternMetricArtifact {
87
87
  }
88
88
  }
89
89
 
90
- module.exports = makeComputedArtifact(LanternMaxPotentialFID);
90
+ module.exports = makeComputedArtifact(
91
+ LanternMaxPotentialFID,
92
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
93
+ );
@@ -144,4 +144,7 @@ class LanternSpeedIndex extends LanternMetric {
144
144
  }
145
145
  }
146
146
 
147
- module.exports = makeComputedArtifact(LanternSpeedIndex);
147
+ module.exports = makeComputedArtifact(
148
+ LanternSpeedIndex,
149
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
150
+ );
@@ -120,4 +120,7 @@ class LanternTotalBlockingTime extends LanternMetric {
120
120
  }
121
121
  }
122
122
 
123
- module.exports = makeComputedArtifact(LanternTotalBlockingTime);
123
+ module.exports = makeComputedArtifact(
124
+ LanternTotalBlockingTime,
125
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
126
+ );
@@ -39,4 +39,7 @@ class LargestContentfulPaintAllFrames extends NavigationMetric {
39
39
  }
40
40
  }
41
41
 
42
- module.exports = makeComputedArtifact(LargestContentfulPaintAllFrames);
42
+ module.exports = makeComputedArtifact(
43
+ LargestContentfulPaintAllFrames,
44
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
45
+ );
@@ -46,4 +46,7 @@ class LargestContentfulPaint extends NavigationMetric {
46
46
  }
47
47
  }
48
48
 
49
- module.exports = makeComputedArtifact(LargestContentfulPaint);
49
+ module.exports = makeComputedArtifact(
50
+ LargestContentfulPaint,
51
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
52
+ );
@@ -39,4 +39,7 @@ class MaxPotentialFID extends NavigationMetric {
39
39
  }
40
40
  }
41
41
 
42
- module.exports = makeComputedArtifact(MaxPotentialFID);
42
+ module.exports = makeComputedArtifact(
43
+ MaxPotentialFID,
44
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
45
+ );
@@ -34,4 +34,7 @@ class SpeedIndex extends NavigationMetric {
34
34
  }
35
35
  }
36
36
 
37
- module.exports = makeComputedArtifact(SpeedIndex);
37
+ module.exports = makeComputedArtifact(
38
+ SpeedIndex,
39
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
40
+ );
@@ -144,4 +144,7 @@ class TimingSummary {
144
144
  }
145
145
  }
146
146
 
147
- module.exports = makeComputedArtifact(TimingSummary);
147
+ module.exports = makeComputedArtifact(
148
+ TimingSummary,
149
+ ['devtoolsLog', 'gatherContext', 'settings', 'trace']
150
+ );
@@ -68,4 +68,7 @@ class TotalBlockingTime extends ComputedMetric {
68
68
  }
69
69
  }
70
70
 
71
- module.exports = makeComputedArtifact(TotalBlockingTime);
71
+ module.exports = makeComputedArtifact(
72
+ TotalBlockingTime,
73
+ ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace']
74
+ );
@@ -74,7 +74,7 @@ class ModuleDuplication {
74
74
  }
75
75
 
76
76
  /**
77
- * @param {LH.Artifacts} artifacts
77
+ * @param {Pick<LH.Artifacts, 'ScriptElements'|'SourceMaps'>} artifacts
78
78
  * @param {LH.Artifacts.ComputedContext} context
79
79
  */
80
80
  static async compute_(artifacts, context) {
@@ -133,4 +133,4 @@ class ModuleDuplication {
133
133
  }
134
134
  }
135
135
 
136
- module.exports = makeComputedArtifact(ModuleDuplication);
136
+ module.exports = makeComputedArtifact(ModuleDuplication, ['ScriptElements', 'SourceMaps']);
@@ -61,4 +61,4 @@ class NetworkAnalysis {
61
61
  }
62
62
  }
63
63
 
64
- module.exports = makeComputedArtifact(NetworkAnalysis);
64
+ module.exports = makeComputedArtifact(NetworkAnalysis, null);
@@ -18,4 +18,4 @@ class NetworkRecords {
18
18
  }
19
19
  }
20
20
 
21
- module.exports = makeComputedArtifact(NetworkRecords);
21
+ module.exports = makeComputedArtifact(NetworkRecords, null);
@@ -467,7 +467,7 @@ class PageDependencyGraph {
467
467
  }
468
468
  }
469
469
 
470
- module.exports = makeComputedArtifact(PageDependencyGraph);
470
+ module.exports = makeComputedArtifact(PageDependencyGraph, ['devtoolsLog', 'trace']);
471
471
 
472
472
  /**
473
473
  * @typedef {Object} NetworkNodeOutput
@@ -18,4 +18,4 @@ class ProcessedNavigation {
18
18
  }
19
19
  }
20
20
 
21
- module.exports = makeComputedArtifact(ProcessedNavigation);
21
+ module.exports = makeComputedArtifact(ProcessedNavigation, null);
@@ -18,4 +18,4 @@ class ProcessedTrace {
18
18
  }
19
19
  }
20
20
 
21
- module.exports = makeComputedArtifact(ProcessedTrace);
21
+ module.exports = makeComputedArtifact(ProcessedTrace, null);
@@ -111,4 +111,4 @@ class ResourceSummary {
111
111
  }
112
112
  }
113
113
 
114
- module.exports = makeComputedArtifact(ResourceSummary);
114
+ module.exports = makeComputedArtifact(ResourceSummary, ['URL', 'devtoolsLog', 'budgets']);
@@ -26,4 +26,4 @@ class Screenshots {
26
26
  }
27
27
  }
28
28
 
29
- module.exports = makeComputedArtifact(Screenshots);
29
+ module.exports = makeComputedArtifact(Screenshots, null);
@@ -51,4 +51,4 @@ class Speedline {
51
51
  }
52
52
  }
53
53
 
54
- module.exports = makeComputedArtifact(Speedline);
54
+ module.exports = makeComputedArtifact(Speedline, null);
@@ -26,5 +26,5 @@ class TraceOfTab {
26
26
  }
27
27
 
28
28
  log.warn(`trace-of-tab`, `trace-of-tab is deprecated, use processed-trace / processed-navigation instead`); // eslint-disable-line max-len
29
- module.exports = makeComputedArtifact(TraceOfTab);
29
+ module.exports = makeComputedArtifact(TraceOfTab, null);
30
30
 
@@ -151,4 +151,4 @@ class UnusedCSS {
151
151
  }
152
152
  }
153
153
 
154
- module.exports = makeComputedArtifact(UnusedCSS);
154
+ module.exports = makeComputedArtifact(UnusedCSS, ['CSSUsage', 'URL', 'devtoolsLog']);
@@ -169,4 +169,7 @@ class UnusedJavascriptSummary {
169
169
  }
170
170
  }
171
171
 
172
- module.exports = makeComputedArtifact(UnusedJavascriptSummary);
172
+ module.exports = makeComputedArtifact(
173
+ UnusedJavascriptSummary,
174
+ ['bundle', 'scriptCoverages', 'url']
175
+ );
@@ -80,4 +80,4 @@ class UserTimings {
80
80
  }
81
81
  }
82
82
 
83
- module.exports = makeComputedArtifact(UserTimings);
83
+ module.exports = makeComputedArtifact(UserTimings, null);
@@ -46,7 +46,7 @@ class ViewportMeta {
46
46
  }
47
47
  }
48
48
 
49
- module.exports = makeComputedArtifact(ViewportMeta);
49
+ module.exports = makeComputedArtifact(ViewportMeta, null);
50
50
 
51
51
  /**
52
52
  * @typedef {object} ViewportMetaResult
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lighthouse",
3
- "version": "9.1.0-dev.20211129",
3
+ "version": "9.1.0-dev.20211130",
4
4
  "description": "Automated auditing, performance metrics, and best practices for the web.",
5
5
  "main": "./lighthouse-core/index.js",
6
6
  "bin": {
@@ -70,6 +70,8 @@ declare global {
70
70
  urlFilterRegex?: RegExp;
71
71
  skip?: (test: TestDfn, expectation: ExpectedRunnerResult) => string | false;
72
72
  modify?: (test: TestDfn, expectation: ExpectedRunnerResult) => void;
73
+ /** String of form `shardNumber/shardTotal`, e.g. `'1/4'`. */
74
+ shardArg: string | undefined;
73
75
  }
74
76
  }
75
77
  }