lighthouse 8.4.0-dev.20210918 → 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 +36 -13
- package/flow-report/src/summary/summary.tsx +23 -4
- package/lighthouse-core/fraggle-rock/gather/driver.js +7 -0
- package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +2 -0
- package/lighthouse-core/fraggle-rock/gather/session.js +9 -0
- package/lighthouse-core/fraggle-rock/gather/snapshot-runner.js +2 -0
- package/lighthouse-core/fraggle-rock/gather/timespan-runner.js +1 -0
- package/lighthouse-core/gather/driver.js +5 -0
- package/package.json +1 -1
- package/types/gatherer.d.ts +1 -0
package/changelog.md
CHANGED
|
@@ -1,3 +1,82 @@
|
|
|
1
|
+
<a name="8.5.0"></a>
|
|
2
|
+
# 8.5.0 (2021-09-21)
|
|
3
|
+
[Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v8.4.0...v8.5.0)
|
|
4
|
+
|
|
5
|
+
We expect this release to ship in the DevTools of [Chrome 96](https://chromiumdash.appspot.com/schedule), and to PageSpeed Insights within 2 weeks.
|
|
6
|
+
|
|
7
|
+
## New Contributors
|
|
8
|
+
|
|
9
|
+
Thanks to our new contributors 👽🐷🐰🐯🐻!
|
|
10
|
+
|
|
11
|
+
Konstantin Popov @KonstHardy
|
|
12
|
+
Can Umay @canumay
|
|
13
|
+
|
|
14
|
+
## Core
|
|
15
|
+
|
|
16
|
+
* lazy-lcp: fix failureTitle in lcp-lazy-loaded ([#13049](https://github.com/GoogleChrome/lighthouse/pull/13049))
|
|
17
|
+
* tracing: remove cpu_profiler.hires ([#13056](https://github.com/GoogleChrome/lighthouse/pull/13056))
|
|
18
|
+
* tsc: add base tsconfig for config inheritance ([#13072](https://github.com/GoogleChrome/lighthouse/pull/13072))
|
|
19
|
+
* make main tsc compile cacheable ([#13069](https://github.com/GoogleChrome/lighthouse/pull/13069))
|
|
20
|
+
|
|
21
|
+
## ⛏️👷 Fraggle Rock
|
|
22
|
+
|
|
23
|
+
Support for auditing user flows ([#11313](https://github.com/GoogleChrome/lighthouse/issues/11313))
|
|
24
|
+
|
|
25
|
+
* cleanup driver on run completion ([#13062](https://github.com/GoogleChrome/lighthouse/pull/13062))
|
|
26
|
+
* setup emulation and throttling for timespans ([#13058](https://github.com/GoogleChrome/lighthouse/pull/13058))
|
|
27
|
+
* support additionalTraceCategories ([#13030](https://github.com/GoogleChrome/lighthouse/pull/13030))
|
|
28
|
+
* add support for plugins ([#13028](https://github.com/GoogleChrome/lighthouse/pull/13028))
|
|
29
|
+
* move GatherContext to baseArtifacts ([#13033](https://github.com/GoogleChrome/lighthouse/pull/13033))
|
|
30
|
+
* preserve traces on failed page load ([#13027](https://github.com/GoogleChrome/lighthouse/pull/13027))
|
|
31
|
+
* move HostUserAgent/FormFactor back to base artifacts ([#12969](https://github.com/GoogleChrome/lighthouse/pull/12969))
|
|
32
|
+
* use devtools throttling by default in timespan mode ([#13013](https://github.com/GoogleChrome/lighthouse/pull/13013))
|
|
33
|
+
* collect OOPIF network data ([#12992](https://github.com/GoogleChrome/lighthouse/pull/12992))
|
|
34
|
+
* flow: summary sections ([#13086](https://github.com/GoogleChrome/lighthouse/pull/13086))
|
|
35
|
+
* flow: topbar ([#13065](https://github.com/GoogleChrome/lighthouse/pull/13065))
|
|
36
|
+
|
|
37
|
+
## CLI
|
|
38
|
+
|
|
39
|
+
* convert to ES modules ([#13045](https://github.com/GoogleChrome/lighthouse/pull/13045))
|
|
40
|
+
|
|
41
|
+
## Report
|
|
42
|
+
|
|
43
|
+
* make metric value more prominent in table ([#13036](https://github.com/GoogleChrome/lighthouse/pull/13036))
|
|
44
|
+
* 3p-filter: drop for/id as elements are already nested ([#13067](https://github.com/GoogleChrome/lighthouse/pull/13067))
|
|
45
|
+
* add gatherMode option to category score ([#13029](https://github.com/GoogleChrome/lighthouse/pull/13029))
|
|
46
|
+
* add fractional category scores ([#13009](https://github.com/GoogleChrome/lighthouse/pull/13009))
|
|
47
|
+
|
|
48
|
+
## Deps
|
|
49
|
+
|
|
50
|
+
* update to latest @rollup/plugin-typescript ([#13075](https://github.com/GoogleChrome/lighthouse/pull/13075))
|
|
51
|
+
* snyk: update snyk snapshot ([#13019](https://github.com/GoogleChrome/lighthouse/pull/13019))
|
|
52
|
+
|
|
53
|
+
## Clients
|
|
54
|
+
|
|
55
|
+
* lr: bundle smokehouse as commonjs ([#13074](https://github.com/GoogleChrome/lighthouse/pull/13074))
|
|
56
|
+
* add canonical link to viewer and treemap ([#13032](https://github.com/GoogleChrome/lighthouse/pull/13032))
|
|
57
|
+
|
|
58
|
+
## Docs
|
|
59
|
+
|
|
60
|
+
* readme: add Peyk to the list of integrations ([#13055](https://github.com/GoogleChrome/lighthouse/pull/13055))
|
|
61
|
+
|
|
62
|
+
## Tests
|
|
63
|
+
|
|
64
|
+
* add FR integration scenarios ([#13092](https://github.com/GoogleChrome/lighthouse/pull/13092))
|
|
65
|
+
* update SVGOMG expectations ([#13088](https://github.com/GoogleChrome/lighthouse/pull/13088))
|
|
66
|
+
* restore use of latest node 16 in CI ([#13079](https://github.com/GoogleChrome/lighthouse/pull/13079))
|
|
67
|
+
* eslint: trailing commas for import/export ([#13059](https://github.com/GoogleChrome/lighthouse/pull/13059))
|
|
68
|
+
* smokehouse: add flag for test sharding ([#13047](https://github.com/GoogleChrome/lighthouse/pull/13047))
|
|
69
|
+
* smokehouse: convert to ES modules ([#13046](https://github.com/GoogleChrome/lighthouse/pull/13046))
|
|
70
|
+
* fix flaky robots smoke failure ([#13031](https://github.com/GoogleChrome/lighthouse/pull/13031))
|
|
71
|
+
* smoke: upload smokehouse artifacts on failure ([#13010](https://github.com/GoogleChrome/lighthouse/pull/13010))
|
|
72
|
+
|
|
73
|
+
## Misc
|
|
74
|
+
|
|
75
|
+
* build: fix minifyFileTransform stream bug in Node 16 ([#13073](https://github.com/GoogleChrome/lighthouse/pull/13073))
|
|
76
|
+
* fix typo in lighthouse-treemap/app/src/main.js ([#13076](https://github.com/GoogleChrome/lighthouse/pull/13076))
|
|
77
|
+
* proto: add i18n.icuMessagePaths ([#13068](https://github.com/GoogleChrome/lighthouse/pull/13068))
|
|
78
|
+
* remove all FR-COMPAT todos ([#13023](https://github.com/GoogleChrome/lighthouse/pull/13023))
|
|
79
|
+
|
|
1
80
|
<a name="8.4.0"></a>
|
|
2
81
|
# 8.4.0 (2021-09-08)
|
|
3
82
|
[Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v8.3.0...v8.4.0)
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
--app-font-size: 12px;
|
|
9
9
|
--base-spacing: 16px;
|
|
10
10
|
--category-summary-font-size: 18px;
|
|
11
|
+
--double-base-spacing: calc(var(--base-spacing) * 2);
|
|
11
12
|
--gather-mode-icon-size: 16px;
|
|
12
13
|
--half-base-spacing: calc(var(--base-spacing) / 2);
|
|
13
14
|
--separator-color: var(--color-gray-300);
|
|
@@ -189,14 +190,21 @@
|
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
.Summary {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
display: grid;
|
|
194
|
+
grid-template-columns: minmax(5%, 1fr) auto minmax(5%, 1fr);
|
|
195
|
+
justify-content: start;
|
|
196
|
+
width: 100%;
|
|
197
|
+
}
|
|
198
|
+
.Summary > * {
|
|
199
|
+
grid-column: 2;
|
|
200
|
+
}
|
|
201
|
+
.Summary > .Separator {
|
|
202
|
+
grid-column: 1 / span 3;
|
|
196
203
|
}
|
|
197
204
|
|
|
198
205
|
.SummaryHeader {
|
|
199
|
-
margin: var(--base-spacing)
|
|
206
|
+
margin: calc(var(--base-spacing) * 3) 0px;
|
|
207
|
+
width: 100%;
|
|
200
208
|
}
|
|
201
209
|
|
|
202
210
|
.SummaryHeader__title {
|
|
@@ -208,12 +216,22 @@
|
|
|
208
216
|
font-size: var(--summary-subtitle-font-size);
|
|
209
217
|
}
|
|
210
218
|
|
|
219
|
+
.SummarySectionHeader {
|
|
220
|
+
margin-top: var(--double-base-spacing);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.SummarySectionHeader__content {
|
|
224
|
+
margin: var(--base-spacing) 0px;
|
|
225
|
+
}
|
|
226
|
+
|
|
211
227
|
.SummaryFlow {
|
|
212
228
|
width: 100%;
|
|
229
|
+
max-width: max-content;
|
|
213
230
|
display: grid;
|
|
214
231
|
grid-auto-rows: min-content;
|
|
215
232
|
grid-template-columns: min-content min-content 4fr 1fr 1fr 1fr 1fr;
|
|
216
233
|
align-items: center;
|
|
234
|
+
margin: var(--base-spacing) 0px;
|
|
217
235
|
}
|
|
218
236
|
.SummaryFlow .lh-fraction__content {
|
|
219
237
|
padding: 0px;
|
|
@@ -260,11 +278,18 @@
|
|
|
260
278
|
}
|
|
261
279
|
|
|
262
280
|
.SummaryFlowStep__label {
|
|
281
|
+
grid-column: 3;
|
|
282
|
+
margin: var(--half-base-spacing);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.SummaryFlowStep__mode {
|
|
286
|
+
color: var(--color-gray-700);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.SummaryFlowStep__link {
|
|
263
290
|
font-size: var(--summary-flow-step-label-font-size);
|
|
264
291
|
color: var(--color-gray-800);
|
|
265
292
|
text-decoration: underline;
|
|
266
|
-
grid-column: 3;
|
|
267
|
-
margin: var(--half-base-spacing);
|
|
268
293
|
}
|
|
269
294
|
|
|
270
295
|
.SummaryCategory {
|
|
@@ -283,7 +308,8 @@
|
|
|
283
308
|
align-items: center;
|
|
284
309
|
justify-content: center;
|
|
285
310
|
padding: var(--half-base-spacing);
|
|
286
|
-
background-color: var(--color-gray-
|
|
311
|
+
background-color: var(--color-gray-100);
|
|
312
|
+
border-top: 1px solid var(--color-gray-300);
|
|
287
313
|
text-align: center;
|
|
288
314
|
}
|
|
289
315
|
.SummaryNavigationHeader__url {
|
|
@@ -291,14 +317,11 @@
|
|
|
291
317
|
text-align: left;
|
|
292
318
|
}
|
|
293
319
|
|
|
294
|
-
.
|
|
320
|
+
.SummaryFlowStep__separator {
|
|
295
321
|
display: contents;
|
|
296
322
|
}
|
|
297
|
-
|
|
298
|
-
.SummaryFlowStep__divider--line {
|
|
323
|
+
.SummaryFlowStep__separator > .Separator {
|
|
299
324
|
grid-column-end: span 5;
|
|
300
|
-
height: 1px;
|
|
301
|
-
background-color: var(--separator-color);
|
|
302
325
|
}
|
|
303
326
|
|
|
304
327
|
.SummaryCategory__null {
|
|
@@ -7,13 +7,18 @@
|
|
|
7
7
|
import {FunctionComponent} from 'preact';
|
|
8
8
|
import {useMemo} from 'preact/hooks';
|
|
9
9
|
|
|
10
|
-
import {FlowSegment} from '../common';
|
|
10
|
+
import {FlowSegment, Separator} from '../common';
|
|
11
11
|
import {getScreenDimensions, getScreenshot, useDerivedStepNames, useFlowResult} from '../util';
|
|
12
12
|
import {Util} from '../../../report/renderer/util';
|
|
13
13
|
import {CategoryScore} from '../wrappers/category-score';
|
|
14
14
|
|
|
15
15
|
const DISPLAYED_CATEGORIES = ['performance', 'accessibility', 'best-practices', 'seo'];
|
|
16
16
|
const THUMBNAIL_WIDTH = 50;
|
|
17
|
+
const MODE_DESCRIPTIONS: Record<LH.Result.GatherMode, string> = {
|
|
18
|
+
'navigation': 'Page load',
|
|
19
|
+
'timespan': 'User interactions',
|
|
20
|
+
'snapshot': 'Captured state of page',
|
|
21
|
+
};
|
|
17
22
|
|
|
18
23
|
const SummaryNavigationHeader: FunctionComponent<{url: string}> = ({url}) => {
|
|
19
24
|
return (
|
|
@@ -72,9 +77,9 @@ export const SummaryFlowStep: FunctionComponent<{
|
|
|
72
77
|
{
|
|
73
78
|
lhr.gatherMode === 'navigation' || hashIndex === 0 ?
|
|
74
79
|
<SummaryNavigationHeader url={lhr.finalUrl}/> :
|
|
75
|
-
<div className="
|
|
80
|
+
<div className="SummaryFlowStep__separator">
|
|
76
81
|
<FlowSegment/>
|
|
77
|
-
<
|
|
82
|
+
<Separator/>
|
|
78
83
|
</div>
|
|
79
84
|
}
|
|
80
85
|
<img
|
|
@@ -84,7 +89,10 @@ export const SummaryFlowStep: FunctionComponent<{
|
|
|
84
89
|
style={{width: THUMBNAIL_WIDTH, maxHeight: thumbnailHeight}}
|
|
85
90
|
/>
|
|
86
91
|
<FlowSegment mode={lhr.gatherMode}/>
|
|
87
|
-
<
|
|
92
|
+
<div className="SummaryFlowStep__label">
|
|
93
|
+
<div className="SummaryFlowStep__mode">{MODE_DESCRIPTIONS[lhr.gatherMode]}</div>
|
|
94
|
+
<a className="SummaryFlowStep__link" href={`#index=${hashIndex}`}>{label}</a>
|
|
95
|
+
</div>
|
|
88
96
|
{
|
|
89
97
|
DISPLAYED_CATEGORIES.map(c => (
|
|
90
98
|
<SummaryCategory
|
|
@@ -156,10 +164,21 @@ export const SummaryHeader: FunctionComponent = () => {
|
|
|
156
164
|
);
|
|
157
165
|
};
|
|
158
166
|
|
|
167
|
+
const SummarySectionHeader: FunctionComponent = ({children}) => {
|
|
168
|
+
return (
|
|
169
|
+
<div className="SummarySectionHeader">
|
|
170
|
+
<div className="SummarySectionHeader__content">{children}</div>
|
|
171
|
+
<Separator/>
|
|
172
|
+
</div>
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
|
|
159
176
|
export const Summary: FunctionComponent = () => {
|
|
160
177
|
return (
|
|
161
178
|
<div className="Summary" data-testid="Summary">
|
|
162
179
|
<SummaryHeader/>
|
|
180
|
+
<Separator/>
|
|
181
|
+
<SummarySectionHeader>ALL REPORTS</SummarySectionHeader>
|
|
163
182
|
<SummaryFlow/>
|
|
164
183
|
</div>
|
|
165
184
|
);
|
|
@@ -28,6 +28,7 @@ const defaultSession = {
|
|
|
28
28
|
addSessionAttachedListener: throwNotConnectedFn,
|
|
29
29
|
removeSessionAttachedListener: throwNotConnectedFn,
|
|
30
30
|
sendCommand: throwNotConnectedFn,
|
|
31
|
+
dispose: throwNotConnectedFn,
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
/** @implements {LH.Gatherer.FRTransitionalDriver} */
|
|
@@ -72,6 +73,12 @@ class Driver {
|
|
|
72
73
|
this._executionContext = new ExecutionContext(this._session);
|
|
73
74
|
this._fetcher = new Fetcher(this._session, this._executionContext);
|
|
74
75
|
}
|
|
76
|
+
|
|
77
|
+
/** @return {Promise<void>} */
|
|
78
|
+
async disconnect() {
|
|
79
|
+
if (!this._session) return;
|
|
80
|
+
await this._session.dispose();
|
|
81
|
+
}
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
module.exports = Driver;
|
|
@@ -262,6 +262,8 @@ async function _navigations({driver, config, requestedUrl, baseArtifacts, comput
|
|
|
262
262
|
async function _cleanup({requestedUrl, driver, config}) {
|
|
263
263
|
const didResetStorage = !config.settings.disableStorageReset;
|
|
264
264
|
if (didResetStorage) await storage.clearDataForOrigin(driver.defaultSession, requestedUrl);
|
|
265
|
+
|
|
266
|
+
await driver.disconnect();
|
|
265
267
|
}
|
|
266
268
|
|
|
267
269
|
/**
|
|
@@ -163,6 +163,15 @@ class ProtocolSession {
|
|
|
163
163
|
if (timeout) clearTimeout(timeout);
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Disposes of a session so that it can no longer talk to Chrome.
|
|
169
|
+
* @return {Promise<void>}
|
|
170
|
+
*/
|
|
171
|
+
async dispose() {
|
|
172
|
+
this._session.removeAllListeners();
|
|
173
|
+
await this._session.detach();
|
|
174
|
+
}
|
|
166
175
|
}
|
|
167
176
|
|
|
168
177
|
module.exports = ProtocolSession;
|
|
@@ -58,6 +58,7 @@ async function startTimespan(options) {
|
|
|
58
58
|
await collectPhaseArtifacts({phase: 'stopSensitiveInstrumentation', ...phaseOptions});
|
|
59
59
|
await collectPhaseArtifacts({phase: 'stopInstrumentation', ...phaseOptions});
|
|
60
60
|
await collectPhaseArtifacts({phase: 'getArtifact', ...phaseOptions});
|
|
61
|
+
await driver.disconnect();
|
|
61
62
|
|
|
62
63
|
const artifacts = await awaitArtifacts(artifactState);
|
|
63
64
|
return finalizeArtifacts(baseArtifacts, artifacts);
|
|
@@ -127,6 +127,11 @@ class Driver {
|
|
|
127
127
|
return this._connection.disconnect();
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
/** @return {Promise<void>} */
|
|
131
|
+
dispose() {
|
|
132
|
+
return this.disconnect();
|
|
133
|
+
}
|
|
134
|
+
|
|
130
135
|
/**
|
|
131
136
|
* Get the browser WebSocket endpoint for devtools protocol clients like Puppeteer.
|
|
132
137
|
* Only works with WebSocket connection, not extension or devtools.
|
package/package.json
CHANGED
package/types/gatherer.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ declare module Gatherer {
|
|
|
34
34
|
removeSessionAttachedListener(callback: (session: FRProtocolSession) => void): void
|
|
35
35
|
off<TEvent extends keyof LH.CrdpEvents>(event: TEvent, callback: (...args: LH.CrdpEvents[TEvent]) => void): void;
|
|
36
36
|
sendCommand<TMethod extends keyof LH.CrdpCommands>(method: TMethod, ...params: LH.CrdpCommands[TMethod]['paramsType']): Promise<LH.CrdpCommands[TMethod]['returnType']>;
|
|
37
|
+
dispose(): Promise<void>;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/** The limited driver interface shared between pre and post Fraggle Rock Lighthouse. */
|