lighthouse 8.4.0 → 8.5.0-dev.20210921
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +79 -0
- package/flow-report/assets/styles.css +85 -61
- package/flow-report/src/app.tsx +6 -2
- package/flow-report/src/common.tsx +0 -41
- package/flow-report/src/icons.tsx +11 -0
- package/flow-report/src/summary/summary.tsx +32 -25
- package/flow-report/src/topbar.tsx +60 -0
- package/flow-report/src/util.ts +0 -1
- package/flow-report/src/wrappers/{gauge.tsx → category-score.tsx} +11 -5
- package/flow-report/test/summary/summary-test.tsx +3 -3
- package/flow-report/tsconfig.json +6 -22
- package/{lighthouse-core/gather/gatherers/gather-context.js → lighthouse-cli/.eslintrc.cjs} +20 -18
- package/lighthouse-cli/bin.js +31 -21
- package/lighthouse-cli/cli-flags.js +12 -7
- package/lighthouse-cli/commands/commands.js +2 -7
- package/lighthouse-cli/commands/list-audits.js +2 -2
- package/lighthouse-cli/commands/list-trace-categories.js +2 -2
- package/lighthouse-cli/index.js +3 -1
- package/lighthouse-cli/package.json +4 -0
- package/lighthouse-cli/printer.js +4 -3
- package/lighthouse-cli/run.js +14 -15
- package/lighthouse-cli/sentry-prompt.js +5 -6
- package/lighthouse-cli/test/smokehouse/frontends/back-compat-util.js +1 -1
- package/lighthouse-cli/test/smokehouse/frontends/lib.js +5 -4
- package/lighthouse-cli/test/smokehouse/frontends/node.js +1 -1
- package/lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js +93 -14
- package/lighthouse-cli/test/smokehouse/lib/child-process-error.js +1 -1
- package/lighthouse-cli/test/smokehouse/lib/concurrent-mapper.js +1 -1
- package/lighthouse-cli/test/smokehouse/lib/local-console.js +1 -1
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js +20 -16
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/cli.js +15 -12
- package/lighthouse-cli/test/smokehouse/report-assert.js +23 -13
- package/lighthouse-cli/test/smokehouse/smokehouse.js +32 -11
- package/lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js +0 -2
- package/lighthouse-core/audits/byte-efficiency/uses-responsive-images-snapshot.js +6 -1
- package/lighthouse-core/audits/dobetterweb/js-libraries.js +5 -0
- package/lighthouse-core/audits/dobetterweb/uses-http2.js +1 -0
- package/lighthouse-core/audits/lcp-lazy-loaded.js +1 -0
- package/lighthouse-core/audits/oopif-iframe-test-audit.js +30 -0
- package/lighthouse-core/computed/metrics/metric.js +2 -1
- package/lighthouse-core/config/config-helpers.js +47 -3
- package/lighthouse-core/config/config.js +3 -46
- package/lighthouse-core/config/default-config.js +0 -1
- package/lighthouse-core/fraggle-rock/config/config.js +22 -4
- package/lighthouse-core/fraggle-rock/config/default-config.js +0 -9
- package/lighthouse-core/fraggle-rock/config/filters.js +3 -0
- package/lighthouse-core/fraggle-rock/config/validation.js +19 -1
- package/lighthouse-core/fraggle-rock/gather/base-artifacts.js +8 -3
- package/lighthouse-core/fraggle-rock/gather/driver.js +10 -0
- package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +40 -19
- package/lighthouse-core/fraggle-rock/gather/runner-helpers.js +3 -0
- package/lighthouse-core/fraggle-rock/gather/session.js +44 -1
- package/lighthouse-core/fraggle-rock/gather/snapshot-runner.js +4 -1
- package/lighthouse-core/fraggle-rock/gather/timespan-runner.js +5 -1
- package/lighthouse-core/gather/devtools-log.js +9 -3
- package/lighthouse-core/gather/driver/network-monitor.js +57 -13
- package/lighthouse-core/gather/driver/prepare.js +43 -17
- package/lighthouse-core/gather/driver/target-manager.js +125 -0
- package/lighthouse-core/gather/driver.js +20 -0
- package/lighthouse-core/gather/fetcher.js +2 -2
- package/lighthouse-core/gather/gather-runner.js +1 -1
- package/lighthouse-core/gather/gatherers/css-usage.js +0 -2
- package/lighthouse-core/gather/gatherers/devtools-log.js +11 -9
- package/lighthouse-core/gather/gatherers/js-usage.js +0 -1
- package/lighthouse-core/gather/gatherers/script-elements.js +4 -5
- package/lighthouse-core/gather/gatherers/seo/robots-txt.js +3 -3
- package/lighthouse-core/gather/gatherers/trace.js +4 -5
- package/lighthouse-core/index.js +4 -0
- package/lighthouse-core/lib/emulation.js +0 -1
- package/lighthouse-core/lib/i18n/locales/en-US.json +6 -0
- package/lighthouse-core/lib/i18n/locales/en-XL.json +6 -0
- package/lighthouse-core/lib/network-recorder.js +8 -0
- package/lighthouse-core/lib/proto-preprocessor.js +5 -10
- package/lighthouse-core/runner.js +1 -3
- package/package.json +12 -9
- package/readme.md +2 -0
- package/report/assets/styles.css +120 -12
- package/report/assets/templates.html +13 -0
- package/report/clients/psi.js +5 -1
- package/report/generator/tsconfig.json +5 -16
- package/report/renderer/category-renderer.js +58 -5
- package/report/renderer/components.js +25 -5
- package/report/renderer/performance-category-renderer.js +5 -5
- package/report/renderer/pwa-category-renderer.js +10 -0
- package/report/renderer/report-renderer.js +12 -3
- package/report/renderer/report-ui-features.js +1 -4
- package/report/test/renderer/category-renderer-test.js +19 -0
- package/report/tsconfig.json +6 -21
- package/report/types/report-result.d.ts +1 -1
- package/root.js +3 -1
- package/third-party/snyk/snapshot.json +2 -2
- package/tsconfig-all.json +15 -0
- package/tsconfig-base.json +24 -0
- package/tsconfig.json +8 -18
- package/types/artifacts.d.ts +7 -7
- package/types/config.d.ts +1 -1
- package/types/gatherer.d.ts +7 -1
- package/types/lhr/flow.d.ts +0 -1
- package/types/lhr/lhr.d.ts +5 -1
- package/types/lhr/tsconfig.json +4 -14
- package/types/protocol.d.ts +2 -0
- package/types/smokehouse.d.ts +2 -1
- package/dist/report/flow.js +0 -149
- package/dist/report/standalone.js +0 -228
- package/flow-report/test/common-test.tsx +0 -131
- package/lighthouse-core/gather/gatherers/host-form-factor.js +0 -31
- package/lighthouse-core/gather/gatherers/host-user-agent.js +0 -29
|
@@ -289,6 +289,25 @@ describe('CategoryRenderer', () => {
|
|
|
289
289
|
assert.ok(description.querySelector('a'), 'description contains converted markdown links');
|
|
290
290
|
});
|
|
291
291
|
|
|
292
|
+
it('renders the category header with fraction', () => {
|
|
293
|
+
const categoryDOM = renderer.render(
|
|
294
|
+
category,
|
|
295
|
+
sampleResults.categoryGroups,
|
|
296
|
+
{gatherMode: 'snapshot'}
|
|
297
|
+
);
|
|
298
|
+
|
|
299
|
+
const gauge = categoryDOM.querySelector('.lh-fraction__content');
|
|
300
|
+
assert.equal(gauge.textContent.trim(), '49/54', 'fraction is included');
|
|
301
|
+
|
|
302
|
+
const score = categoryDOM.querySelector('.lh-category-header');
|
|
303
|
+
const title = score.querySelector('.lh-fraction__label');
|
|
304
|
+
const description = score.querySelector('.lh-category-header__description');
|
|
305
|
+
|
|
306
|
+
assert.deepEqual(score, score.firstElementChild, 'first child is a score');
|
|
307
|
+
assert.equal(title.textContent, category.title, 'title is set');
|
|
308
|
+
assert.ok(description.querySelector('a'), 'description contains converted markdown links');
|
|
309
|
+
});
|
|
310
|
+
|
|
292
311
|
it('renders the failed audits grouped by group', () => {
|
|
293
312
|
// Fail all the audits.
|
|
294
313
|
const categoryClone = JSON.parse(JSON.stringify(category));
|
package/report/tsconfig.json
CHANGED
|
@@ -1,36 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../tsconfig-base.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
4
|
"outDir": "../.tmp/tsbuildinfo/report",
|
|
5
|
-
"emitDeclarationOnly": true,
|
|
6
|
-
"declarationMap": true,
|
|
7
5
|
|
|
8
6
|
// Limit to base JS and DOM defs.
|
|
9
7
|
"lib": ["es2020", "dom", "dom.iterable"],
|
|
10
|
-
// Don't include any types from node_modules
|
|
8
|
+
// Don't include any types from node_modules/.
|
|
11
9
|
"types": [],
|
|
12
|
-
"target": "es2020",
|
|
13
|
-
"module": "es2020",
|
|
14
|
-
"moduleResolution": "node",
|
|
15
|
-
|
|
16
|
-
"allowJs": true,
|
|
17
|
-
"checkJs": true,
|
|
18
|
-
"strict": true,
|
|
19
|
-
// TODO: remove the next line to be fully `strict`.
|
|
20
|
-
"useUnknownInCatchVariables": false,
|
|
21
|
-
|
|
22
|
-
// "listFiles": true,
|
|
23
|
-
// "noErrorTruncation": true,
|
|
24
|
-
"extendedDiagnostics": true,
|
|
25
10
|
},
|
|
26
|
-
"include": [
|
|
27
|
-
"**/*.js",
|
|
28
|
-
"types/**/*.d.ts",
|
|
29
|
-
],
|
|
30
11
|
"references": [
|
|
31
12
|
{"path": "../types/lhr/"},
|
|
32
13
|
{"path": "./generator/"}
|
|
33
14
|
],
|
|
15
|
+
"include": [
|
|
16
|
+
"**/*.js",
|
|
17
|
+
"types/**/*.d.ts",
|
|
18
|
+
],
|
|
34
19
|
"exclude": [
|
|
35
20
|
"generator/**/*.js",
|
|
36
21
|
// These test files require further changes before they can be type checked.
|
package/root.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
{"id":"npm:angular:20160122","severity":"medium","semver":{"vulnerable":[">=1.3.0 <1.5.0-rc.2"]}},
|
|
17
17
|
{"id":"npm:angular:20140608","severity":"low","semver":{"vulnerable":["<1.3.0"]}},
|
|
18
18
|
{"id":"npm:angular:20131113","severity":"high","semver":{"vulnerable":["<1.2.2"]}},
|
|
19
|
-
{"id":"npm:angular:20140908","severity":"medium","semver":{"vulnerable":["<1.3.0-rc.
|
|
19
|
+
{"id":"npm:angular:20140908","severity":"medium","semver":{"vulnerable":["<1.3.0-rc.5"]}},
|
|
20
20
|
{"id":"npm:angular:20161101","severity":"medium","semver":{"vulnerable":[">=1.5.0 <1.5.9"]}},
|
|
21
21
|
{"id":"npm:angular:20150909","severity":"high","semver":{"vulnerable":["<1.5.0-beta.2"]}},
|
|
22
22
|
{"id":"npm:angular:20151205","severity":"medium","semver":{"vulnerable":["<1.5.0-rc.0"]}},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
{"id":"npm:angular:20150310","severity":"high","semver":{"vulnerable":["<1.4.0-beta.6"]}},
|
|
29
29
|
{"id":"npm:angular:20141104","severity":"medium","semver":{"vulnerable":["<1.3.2"]}},
|
|
30
30
|
{"id":"npm:angular:20130621","severity":"medium","semver":{"vulnerable":["<1.2.0"]}},
|
|
31
|
-
{"id":"npm:angular:20140909","severity":"high","semver":{"vulnerable":[">=1.2.19 <1.2.
|
|
31
|
+
{"id":"npm:angular:20140909","severity":"high","semver":{"vulnerable":[">=1.2.19 <1.2.27"]}},
|
|
32
32
|
{"id":"npm:angular:20130625","severity":"high","semver":{"vulnerable":["<1.1.5"]}}
|
|
33
33
|
],
|
|
34
34
|
"backbone":[
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Compilation entry point for all tsc projects within Lighthouse.
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
"references": [
|
|
5
|
+
{"path": "./"},
|
|
6
|
+
{"path": "./types/lhr/"},
|
|
7
|
+
{"path": "./report/"},
|
|
8
|
+
{"path": "./report/generator/"},
|
|
9
|
+
{"path": "./lighthouse-viewer/"},
|
|
10
|
+
{"path": "./lighthouse-treemap/"},
|
|
11
|
+
{"path": "./flow-report/"},
|
|
12
|
+
],
|
|
13
|
+
"files": [],
|
|
14
|
+
"include": [],
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Base compiler options for all tsconfig files.
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"composite": true,
|
|
6
|
+
"emitDeclarationOnly": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
|
|
9
|
+
"target": "es2020",
|
|
10
|
+
"module": "es2020",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
|
|
14
|
+
"allowJs": true,
|
|
15
|
+
"checkJs": true,
|
|
16
|
+
"strict": true,
|
|
17
|
+
// TODO: remove the next line to be fully `strict`.
|
|
18
|
+
"useUnknownInCatchVariables": false,
|
|
19
|
+
|
|
20
|
+
// "listFiles": true,
|
|
21
|
+
// "noErrorTruncation": true,
|
|
22
|
+
"extendedDiagnostics": true,
|
|
23
|
+
},
|
|
24
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "./tsconfig-base.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"target": "ES2020",
|
|
6
|
-
"allowJs": true,
|
|
7
|
-
"checkJs": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
// TODO: remove the next line to be fully `strict`.
|
|
10
|
-
"useUnknownInCatchVariables": false,
|
|
11
|
-
// "listFiles": true,
|
|
12
|
-
// "noErrorTruncation": true,
|
|
4
|
+
"outDir": ".tmp/tsbuildinfo/",
|
|
13
5
|
|
|
6
|
+
// TODO(esmodules): included to support require('file.json'). Remove on the switch to ES Modules.
|
|
14
7
|
"resolveJsonModule": true,
|
|
15
|
-
"diagnostics": true,
|
|
16
|
-
"composite": true,
|
|
17
|
-
"outDir": ".tmp/tsbuildinfo/",
|
|
18
8
|
},
|
|
9
|
+
"references": [
|
|
10
|
+
{"path": "./types/lhr/"},
|
|
11
|
+
{"path": "./report/"},
|
|
12
|
+
{"path": "./report/generator/"},
|
|
13
|
+
],
|
|
19
14
|
"include": [
|
|
20
15
|
"root.js",
|
|
21
16
|
"lighthouse-cli/**/*.js",
|
|
@@ -35,11 +30,6 @@
|
|
|
35
30
|
"third-party/snyk/snapshot.json",
|
|
36
31
|
"lighthouse-core/audits/byte-efficiency/polyfill-graph-data.json",
|
|
37
32
|
],
|
|
38
|
-
"references": [
|
|
39
|
-
{"path": "./types/lhr/"},
|
|
40
|
-
{"path": "./report/"},
|
|
41
|
-
{"path": "./report/generator/"},
|
|
42
|
-
],
|
|
43
33
|
"exclude": [
|
|
44
34
|
"lighthouse-core/test/audits/**/*.js",
|
|
45
35
|
"lighthouse-core/test/fixtures/**/*.js",
|
package/types/artifacts.d.ts
CHANGED
|
@@ -54,6 +54,12 @@ interface UniversalBaseArtifacts {
|
|
|
54
54
|
settings: Config.Settings;
|
|
55
55
|
/** The timing instrumentation of the gather portion of a run. */
|
|
56
56
|
Timing: Artifacts.MeasureEntry[];
|
|
57
|
+
/** Device which Chrome is running on. */
|
|
58
|
+
HostFormFactor: 'desktop'|'mobile';
|
|
59
|
+
/** The user agent string of the version of Chrome used. */
|
|
60
|
+
HostUserAgent: string;
|
|
61
|
+
/** Information about how Lighthouse artifacts were gathered. */
|
|
62
|
+
GatherContext: {gatherMode: Gatherer.GatherMode};
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
/**
|
|
@@ -70,10 +76,6 @@ interface ContextualBaseArtifacts {
|
|
|
70
76
|
* The set of base artifacts that were replaced by standard gatherers in Fraggle Rock.
|
|
71
77
|
*/
|
|
72
78
|
interface LegacyBaseArtifacts {
|
|
73
|
-
/** Device which Chrome is running on. */
|
|
74
|
-
HostFormFactor: 'desktop'|'mobile';
|
|
75
|
-
/** The user agent string of the version of Chrome used. */
|
|
76
|
-
HostUserAgent: string;
|
|
77
79
|
/** The user agent string that Lighthouse used to load the page. Set to the empty string if unknown. */
|
|
78
80
|
NetworkUserAgent: string;
|
|
79
81
|
/** Information on detected tech stacks (e.g. JS libraries) used by the page. */
|
|
@@ -144,8 +146,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts,LegacyBaseArt
|
|
|
144
146
|
FormElements: Artifacts.Form[];
|
|
145
147
|
/** Screenshot of the entire page (rather than just the above the fold content). */
|
|
146
148
|
FullPageScreenshot: Artifacts.FullPageScreenshot | null;
|
|
147
|
-
/** Information about how Lighthouse artifacts were gathered. */
|
|
148
|
-
GatherContext: {gatherMode: Gatherer.GatherMode};
|
|
149
149
|
/** Information about event listeners registered on the global object. */
|
|
150
150
|
GlobalListeners: Array<Artifacts.GlobalListener>;
|
|
151
151
|
/** Whether the page ended up on an HTTPS page after attempting to load the HTTP version. */
|
|
@@ -165,7 +165,7 @@ export interface GathererArtifacts extends PublicGathererArtifacts,LegacyBaseArt
|
|
|
165
165
|
/** Size info of all network records sent without compression and their size after gzipping. */
|
|
166
166
|
ResponseCompression: {requestId: string, url: string, mimeType: string, transferSize: number, resourceSize: number, gzipSize?: number}[];
|
|
167
167
|
/** Information on fetching and the content of the /robots.txt file. */
|
|
168
|
-
RobotsTxt: {status: number|null, content: string|null};
|
|
168
|
+
RobotsTxt: {status: number|null, content: string|null, errorMessage?: string};
|
|
169
169
|
/** Version information for all ServiceWorkers active after the first page load. */
|
|
170
170
|
ServiceWorker: {versions: LH.Crdp.ServiceWorker.ServiceWorkerVersion[], registrations: LH.Crdp.ServiceWorker.ServiceWorkerRegistration[]};
|
|
171
171
|
/** Source maps of scripts executed in the page. */
|
package/types/config.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ declare module Config {
|
|
|
64
64
|
interface FRContext {
|
|
65
65
|
gatherMode?: Gatherer.GatherMode;
|
|
66
66
|
configPath?: string;
|
|
67
|
-
settingsOverrides?: SharedFlagsSettings
|
|
67
|
+
settingsOverrides?: SharedFlagsSettings & Pick<LH.Flags, 'plugins'>;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
interface SharedPassNavigationJson {
|
package/types/gatherer.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import ExecutionContext = require('../lighthouse-core/gather/driver/execution-co
|
|
|
12
12
|
import Fetcher = require('../lighthouse-core/gather/fetcher');
|
|
13
13
|
import ArbitraryEqualityMap = require('../lighthouse-core/lib/arbitrary-equality-map');
|
|
14
14
|
|
|
15
|
-
import {Artifacts, BaseArtifacts, GathererArtifacts} from './artifacts';
|
|
15
|
+
import {Artifacts, BaseArtifacts, FRBaseArtifacts, GathererArtifacts} from './artifacts';
|
|
16
16
|
import Config from './config';
|
|
17
17
|
import {IcuMessage} from './lhr/i18n';
|
|
18
18
|
import Result from './lhr/lhr';
|
|
@@ -22,6 +22,7 @@ import {Trace, DevtoolsLog} from './artifacts';
|
|
|
22
22
|
declare module Gatherer {
|
|
23
23
|
/** The Lighthouse wrapper around a raw CDP session. */
|
|
24
24
|
interface FRProtocolSession {
|
|
25
|
+
setTargetInfo(targetInfo: LH.Crdp.Target.TargetInfo): void;
|
|
25
26
|
hasNextProtocolTimeout(): boolean;
|
|
26
27
|
getNextProtocolTimeout(): number;
|
|
27
28
|
setNextProtocolTimeout(ms: number): void;
|
|
@@ -29,8 +30,11 @@ declare module Gatherer {
|
|
|
29
30
|
once<TEvent extends keyof LH.CrdpEvents>(event: TEvent, callback: (...args: LH.CrdpEvents[TEvent]) => void): void;
|
|
30
31
|
addProtocolMessageListener(callback: (payload: Protocol.RawEventMessage) => void): void
|
|
31
32
|
removeProtocolMessageListener(callback: (payload: Protocol.RawEventMessage) => void): void
|
|
33
|
+
addSessionAttachedListener(callback: (session: FRProtocolSession) => void): void
|
|
34
|
+
removeSessionAttachedListener(callback: (session: FRProtocolSession) => void): void
|
|
32
35
|
off<TEvent extends keyof LH.CrdpEvents>(event: TEvent, callback: (...args: LH.CrdpEvents[TEvent]) => void): void;
|
|
33
36
|
sendCommand<TMethod extends keyof LH.CrdpCommands>(method: TMethod, ...params: LH.CrdpCommands[TMethod]['paramsType']): Promise<LH.CrdpCommands[TMethod]['returnType']>;
|
|
37
|
+
dispose(): Promise<void>;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
/** The limited driver interface shared between pre and post Fraggle Rock Lighthouse. */
|
|
@@ -48,6 +52,8 @@ declare module Gatherer {
|
|
|
48
52
|
gatherMode: GatherMode;
|
|
49
53
|
/** The connection to the page being analyzed. */
|
|
50
54
|
driver: FRTransitionalDriver;
|
|
55
|
+
/** The set of base artifacts that are always collected. */
|
|
56
|
+
baseArtifacts: FRBaseArtifacts;
|
|
51
57
|
/** The cached results of computed artifacts. */
|
|
52
58
|
computedCache: Map<string, ArbitraryEqualityMap>;
|
|
53
59
|
/** The set of available dependencies requested by the current gatherer. */
|
package/types/lhr/flow.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import Result from './lhr';
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The full output of a Lighthouse flow. Includes a series of Lighthouse runs.
|
|
11
|
-
* TODO(FR-COMPAT): Add flow specific metadata (e.g. interaction steps).
|
|
12
11
|
*/
|
|
13
12
|
export default interface FlowResult {
|
|
14
13
|
/** Ordered list of lighthouse results corresponding to a navigation, timespan, or snapshot. */
|
package/types/lhr/lhr.d.ts
CHANGED
|
@@ -41,7 +41,11 @@ interface Result {
|
|
|
41
41
|
/** Execution timings for the Lighthouse run */
|
|
42
42
|
timing: Result.Timing;
|
|
43
43
|
/** Strings for the report and the record of all formatted string locations in the LHR and their corresponding source values. */
|
|
44
|
-
i18n: {
|
|
44
|
+
i18n: {
|
|
45
|
+
rendererFormattedStrings: Record<string, string>;
|
|
46
|
+
/** Optional because LR has many old LHRs that return nothing for this property. */
|
|
47
|
+
icuMessagePaths?: Result.IcuMessagePaths;
|
|
48
|
+
};
|
|
45
49
|
/** An array containing the result of all stack packs. */
|
|
46
50
|
stackPacks?: Result.StackPack[];
|
|
47
51
|
}
|
package/types/lhr/tsconfig.json
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../../tsconfig-base.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"target": "esnext",
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
|
|
8
|
-
"strict": true,
|
|
9
|
-
"extendedDiagnostics": true,
|
|
4
|
+
"outDir": "../../.tmp/tsbuildinfo/types/lhr",
|
|
10
5
|
|
|
11
|
-
// We only need the base JS definitions, no
|
|
6
|
+
// We only need the base JS definitions, no DOM, etc.
|
|
12
7
|
"lib": ["esnext"],
|
|
8
|
+
// Don't include any types from node_modules/.
|
|
13
9
|
"types": [],
|
|
14
|
-
|
|
15
|
-
// "listFiles": true,
|
|
16
|
-
// "noErrorTruncation": true,
|
|
17
|
-
|
|
18
|
-
"composite": true,
|
|
19
|
-
"outDir": "../../.tmp/tsbuildinfo/types/lhr",
|
|
20
10
|
},
|
|
21
11
|
"include": [
|
|
22
12
|
"*.d.ts",
|
package/types/protocol.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ declare module Protocol {
|
|
|
39
39
|
type StrictEventEmitter<TEventRecord extends Record<keyof TEventRecord, any[]>> = {
|
|
40
40
|
on<E extends keyof TEventRecord>(event: E, listener: (...args: TEventRecord[E]) => void): void;
|
|
41
41
|
|
|
42
|
+
off<E extends keyof TEventRecord>(event: E, listener: Function): void;
|
|
43
|
+
|
|
42
44
|
addListener<E extends keyof TEventRecord>(event: E, listener: (...args: TEventRecord[E]) => void): void;
|
|
43
45
|
|
|
44
46
|
removeListener<E extends keyof TEventRecord>(event: E, listener: Function): void;
|
package/types/smokehouse.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ declare global {
|
|
|
14
14
|
audits: Record<string, any>;
|
|
15
15
|
requestedUrl: string;
|
|
16
16
|
finalUrl: string | RegExp;
|
|
17
|
-
|
|
17
|
+
userAgent?: string | RegExp;
|
|
18
|
+
runWarnings?: Array<string|RegExp> | {length: string | number};
|
|
18
19
|
runtimeError?: {
|
|
19
20
|
code?: any;
|
|
20
21
|
message?: any;
|