lighthouse 9.6.3 → 9.6.6
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 +6059 -0
- package/lighthouse-core/audits/network-requests.js +8 -0
- package/lighthouse-core/computed/main-thread-tasks.js +2 -1
- package/lighthouse-core/lib/tracehouse/main-thread-tasks.js +4 -3
- package/lighthouse-core/lib/url-shim.js +2 -2
- package/lighthouse-core/scripts/package.json +4 -0
- package/package.json +3 -3
- package/shared/localization/locales/en-US.json +2 -2
- package/shared/localization/locales/en-XL.json +2 -2
|
@@ -110,6 +110,14 @@ class NetworkRequests extends Audit {
|
|
|
110
110
|
|
|
111
111
|
const tableDetails = Audit.makeTableDetails(headings, results);
|
|
112
112
|
|
|
113
|
+
// Include starting timestamp to allow syncing requests with navStart/metric timestamps.
|
|
114
|
+
const networkStartTimeTs = Number.isFinite(earliestStartTime) ?
|
|
115
|
+
earliestStartTime * 1_000_000 : undefined;
|
|
116
|
+
tableDetails.debugData = {
|
|
117
|
+
type: 'debugdata',
|
|
118
|
+
networkStartTimeTs,
|
|
119
|
+
};
|
|
120
|
+
|
|
113
121
|
return {
|
|
114
122
|
score: 1,
|
|
115
123
|
details: tableDetails,
|
|
@@ -17,7 +17,8 @@ class MainThreadTasks {
|
|
|
17
17
|
*/
|
|
18
18
|
static async compute_(trace, context) {
|
|
19
19
|
const {mainThreadEvents, frames, timestamps} = await ProcessedTrace.request(trace, context);
|
|
20
|
-
return MainThreadTasks_.getMainThreadTasks(mainThreadEvents, frames, timestamps.traceEnd
|
|
20
|
+
return MainThreadTasks_.getMainThreadTasks(mainThreadEvents, frames, timestamps.traceEnd,
|
|
21
|
+
timestamps.timeOrigin);
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -561,9 +561,10 @@ class MainThreadTasks {
|
|
|
561
561
|
* @param {LH.TraceEvent[]} mainThreadEvents
|
|
562
562
|
* @param {Array<{id: string, url: string}>} frames
|
|
563
563
|
* @param {number} traceEndTs
|
|
564
|
+
* @param {number} [traceStartTs] Optional time-0 ts for tasks. Tasks before this point will have negative start/end times. Defaults to the first task found.
|
|
564
565
|
* @return {TaskNode[]}
|
|
565
566
|
*/
|
|
566
|
-
static getMainThreadTasks(mainThreadEvents, frames, traceEndTs) {
|
|
567
|
+
static getMainThreadTasks(mainThreadEvents, frames, traceEndTs, traceStartTs) {
|
|
567
568
|
const timers = new Map();
|
|
568
569
|
const xhrs = new Map();
|
|
569
570
|
const frameURLsById = new Map();
|
|
@@ -587,8 +588,8 @@ class MainThreadTasks {
|
|
|
587
588
|
priorTaskData.lastTaskURLs = task.attributableURLs;
|
|
588
589
|
}
|
|
589
590
|
|
|
590
|
-
// Rebase all the times to be relative to start of trace
|
|
591
|
-
const firstTs =
|
|
591
|
+
// Rebase all the times to be relative to start of trace and covert to ms.
|
|
592
|
+
const firstTs = traceStartTs ?? tasks[0].startTime;
|
|
592
593
|
for (const task of tasks) {
|
|
593
594
|
task.startTime = (task.startTime - firstTs) / 1000;
|
|
594
595
|
task.endTime = (task.endTime - firstTs) / 1000;
|
|
@@ -236,9 +236,9 @@ class URLShim extends URL {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
if (url.protocol === 'data:') {
|
|
239
|
-
const match = url.pathname.match(
|
|
239
|
+
const match = url.pathname.match(/^(image\/(png|jpeg|svg\+xml|webp|gif|avif))[;,]/);
|
|
240
240
|
if (!match) return undefined;
|
|
241
|
-
return match[
|
|
241
|
+
return match[1];
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
const match = url.pathname.toLowerCase().match(/\.(png|jpeg|jpg|svg|webp|gif|avif)$/);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lighthouse",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.6",
|
|
4
4
|
"description": "Automated auditing, performance metrics, and best practices for the web.",
|
|
5
5
|
"main": "./lighthouse-core/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"axe-core": "4.4.1",
|
|
185
185
|
"chrome-launcher": "^0.15.0",
|
|
186
186
|
"configstore": "^5.0.1",
|
|
187
|
-
"csp_evaluator": "1.1.
|
|
187
|
+
"csp_evaluator": "1.1.1",
|
|
188
188
|
"cssstyle": "1.2.1",
|
|
189
189
|
"enquirer": "^2.3.6",
|
|
190
190
|
"http-link-header": "^0.8.0",
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"jpeg-js": "^0.4.3",
|
|
193
193
|
"js-library-detector": "^6.5.0",
|
|
194
194
|
"lighthouse-logger": "^1.3.0",
|
|
195
|
-
"lighthouse-stack-packs": "
|
|
195
|
+
"lighthouse-stack-packs": "1.8.2",
|
|
196
196
|
"lodash": "^4.17.21",
|
|
197
197
|
"lookup-closest-locale": "6.2.0",
|
|
198
198
|
"metaviewport-parser": "0.2.0",
|
|
@@ -2586,7 +2586,7 @@
|
|
|
2586
2586
|
"message": "If you are using React Router, minimize usage of the `<Redirect>` component for [route navigations](https://reacttraining.com/react-router/web/api/Redirect)."
|
|
2587
2587
|
},
|
|
2588
2588
|
"node_modules/lighthouse-stack-packs/packs/react.js | server-response-time": {
|
|
2589
|
-
"message": "If you are server-side rendering any React components, consider using `
|
|
2589
|
+
"message": "If you are server-side rendering any React components, consider using `renderToPipeableStream()` or `renderToStaticNodeStream()` to allow the client to receive and hydrate different parts of the markup instead of all at once. [Learn more](https://reactjs.org/docs/react-dom-server.html#renderToPipeableStream)."
|
|
2590
2590
|
},
|
|
2591
2591
|
"node_modules/lighthouse-stack-packs/packs/react.js | unminified-css": {
|
|
2592
2592
|
"message": "If your build system minifies CSS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build)."
|
|
@@ -2604,7 +2604,7 @@
|
|
|
2604
2604
|
"message": "Consider uploading your GIF to a service which will make it available to embed as an HTML5 video."
|
|
2605
2605
|
},
|
|
2606
2606
|
"node_modules/lighthouse-stack-packs/packs/wordpress.js | modern-image-formats": {
|
|
2607
|
-
"message": "Consider using
|
|
2607
|
+
"message": "Consider using the [Performance Lab](https://wordpress.org/plugins/performance-lab/) plugin to automatically convert your uploaded JPEG images into WebP, wherever supported."
|
|
2608
2608
|
},
|
|
2609
2609
|
"node_modules/lighthouse-stack-packs/packs/wordpress.js | offscreen-images": {
|
|
2610
2610
|
"message": "Install a [lazy-load WordPress plugin](https://wordpress.org/plugins/search/lazy+load/) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://wordpress.org/plugins/amp/)."
|
|
@@ -2586,7 +2586,7 @@
|
|
|
2586
2586
|
"message": "Îf́ ŷóû ár̂é ûśîńĝ Ŕêáĉt́ R̂óût́êŕ, m̂ín̂ím̂íẑé ûśâǵê óf̂ t́ĥé `<Redirect>` ĉóm̂ṕôńêńt̂ f́ôŕ [r̂óût́ê ńâv́îǵât́îón̂ś](https://reacttraining.com/react-router/web/api/Redirect)."
|
|
2587
2587
|
},
|
|
2588
2588
|
"node_modules/lighthouse-stack-packs/packs/react.js | server-response-time": {
|
|
2589
|
-
"message": "Îf́ ŷóû ár̂é ŝér̂v́êŕ-ŝíd̂é r̂én̂d́êŕîńĝ án̂ý R̂éâćt̂ ćôḿp̂ón̂én̂t́ŝ, ćôńŝíd̂ér̂ úŝín̂ǵ `
|
|
2589
|
+
"message": "Îf́ ŷóû ár̂é ŝér̂v́êŕ-ŝíd̂é r̂én̂d́êŕîńĝ án̂ý R̂éâćt̂ ćôḿp̂ón̂én̂t́ŝ, ćôńŝíd̂ér̂ úŝín̂ǵ `renderToPipeableStream()` ôŕ `renderToStaticNodeStream()` t̂ó âĺl̂óŵ t́ĥé ĉĺîén̂t́ t̂ó r̂éĉéîv́ê án̂d́ ĥýd̂ŕât́ê d́îf́f̂ér̂én̂t́ p̂ár̂t́ŝ óf̂ t́ĥé m̂ár̂ḱûṕ îńŝt́êád̂ óf̂ ál̂ĺ ât́ ôńĉé. [L̂éâŕn̂ ḿôŕê](https://reactjs.org/docs/react-dom-server.html#renderToPipeableStream)."
|
|
2590
2590
|
},
|
|
2591
2591
|
"node_modules/lighthouse-stack-packs/packs/react.js | unminified-css": {
|
|
2592
2592
|
"message": "Îf́ ŷóûŕ b̂úîĺd̂ śŷśt̂ém̂ ḿîńîf́îéŝ ĆŜŚ f̂íl̂éŝ áût́ôḿât́îćâĺl̂ý, êńŝúr̂é t̂h́ât́ ŷóû ár̂é d̂ép̂ĺôýîńĝ t́ĥé p̂ŕôd́ûćt̂íôń b̂úîĺd̂ óf̂ ýôúr̂ áp̂ṕl̂íĉát̂íôń. Ŷóû ćâń ĉh́êćk̂ t́ĥíŝ ẃît́ĥ t́ĥé R̂éâćt̂ D́êv́êĺôṕêŕ T̂óôĺŝ éx̂t́êńŝíôń. [L̂éâŕn̂ ḿôŕê](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build)."
|
|
@@ -2604,7 +2604,7 @@
|
|
|
2604
2604
|
"message": "Ĉón̂śîd́êŕ ûṕl̂óâd́îńĝ ýôúr̂ ǴÎF́ t̂ó â śêŕv̂íĉé ŵh́îćĥ ẃîĺl̂ ḿâḱê ít̂ áv̂áîĺâb́l̂é t̂ó êḿb̂éd̂ áŝ án̂ H́T̂ḾL̂5 v́îd́êó."
|
|
2605
2605
|
},
|
|
2606
2606
|
"node_modules/lighthouse-stack-packs/packs/wordpress.js | modern-image-formats": {
|
|
2607
|
-
"message": "Ĉón̂śîd́êŕ ûśîńĝ
|
|
2607
|
+
"message": "Ĉón̂śîd́êŕ ûśîńĝ t́ĥé [P̂ér̂f́ôŕm̂án̂ćê Ĺâb́](https://wordpress.org/plugins/performance-lab/) p̂ĺûǵîń t̂ó âút̂óm̂át̂íĉál̂ĺŷ ćôńv̂ér̂t́ ŷóûŕ ûṕl̂óâd́êd́ ĴṔÊǴ îḿâǵêś îńt̂ó Ŵéb̂Ṕ, ŵh́êŕêv́êŕ ŝúp̂ṕôŕt̂éd̂."
|
|
2608
2608
|
},
|
|
2609
2609
|
"node_modules/lighthouse-stack-packs/packs/wordpress.js | offscreen-images": {
|
|
2610
2610
|
"message": "Îńŝt́âĺl̂ á [l̂áẑý-l̂óâd́ Ŵór̂d́P̂ŕêśŝ ṕl̂úĝín̂](https://wordpress.org/plugins/search/lazy+load/) t́ĥát̂ ṕr̂óv̂íd̂éŝ t́ĥé âb́îĺît́ŷ t́ô d́êf́êŕ âńŷ óf̂f́ŝćr̂éêń îḿâǵêś, ôŕ ŝẃît́ĉh́ t̂ó â t́ĥém̂é t̂h́ât́ p̂ŕôv́îd́êś t̂h́ât́ f̂ún̂ćt̂íôńâĺît́ŷ. Ál̂śô ćôńŝíd̂ér̂ úŝín̂ǵ [t̂h́ê ÁM̂Ṕ p̂ĺûǵîń](https://wordpress.org/plugins/amp/)."
|