Use Coach 8.0.0 and display versions. (#3953)

https://github.com/sitespeedio/sitespeed.io/issues/3949
This commit is contained in:
Peter Hedenskog 2023-08-31 05:33:00 +02:00 committed by GitHub
parent f80bbd9c0a
commit e664183c94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 47 additions and 29 deletions

View File

@ -10,7 +10,13 @@ import isEmpty from 'lodash.isempty';
import get from 'lodash.get';
import { Stats } from 'fast-stats';
import coach from 'coach-core';
const { pickAPage, analyseHar, merge } = coach;
const {
pickAPage,
analyseHar,
merge,
getThirdPartyWebVersion,
getWappalyzerCoreVersion
} = coach;
import { SitespeedioPlugin } from '@sitespeed.io/plugin';
import { summarizeStats } from '../../support/statsHelpers.js';
@ -505,6 +511,11 @@ export default class BrowsertimePlugin extends SitespeedioPlugin {
);
advice = merge(coachAdvice, harResult);
}
const thirdPartyWebVersion = getThirdPartyWebVersion();
const wappalyzerVersion = getWappalyzerCoreVersion();
advice.thirdPartyWebVersion = thirdPartyWebVersion;
advice.wappalyzerVersion = wappalyzerVersion;
super.sendMessage('coach.run', advice, {
url,
group,

View File

@ -54,6 +54,7 @@ mixin adviceInfo(name, id, perfectScore, node)
p #{perfectScore}
- const advice = pageInfo.data.coach.run ? pageInfo.data.coach.run.advice : pageInfo.data.coach.pageSummary.advice;
- const coachVersion = pageInfo.data.coach.run ? pageInfo.data.coach.run.version : pageInfo.data.coach.pageSummary.version;
small
if advice
@ -73,7 +74,7 @@ small
h2 Coach
p.small
a(href='https://github.com/sitespeedio/coach') The coach
|  helps you find performance problems on your web page using web performance best practice rules. And gives you advice on privacy and best practices.
|  helps you find performance problems on your web page using web performance best practice rules. And gives you advice on privacy and best practices. Tested using Coach-core version #{coachVersion}.
script(type='text/javascript').
function toggleRow(toggleElement) {

View File

@ -1,7 +1,11 @@
- const wappalyserVersion = pageInfo.data.coach.run ? pageInfo.data.coach.run.wappalyzerVersion : pageInfo.data.coach.pageSummary.wappalyzerVersion;
- const thirdPartyWebVersion = pageInfo.data.coach.run ? pageInfo.data.coach.run.thirdPartyWebVersion : pageInfo.data.coach.pageSummary.thirdPartyWebVersion;
a#technology
h2 Technologies used to build the page.
p Data collected using
a(href='https://github.com/AliasIO/wappalyzer') Wappalyzer.
a(href='https://github.com/dochne/wappalyzer') Wappalyzer
| version #{wappalyserVersion}.
| Use
code --browsertime.firefox.includeResponseBodies html
| or
@ -27,7 +31,7 @@ else
if (advice.info.thirdparty && Object.keys(advice.info.thirdparty.toolsByCategory).length > 0)
p Data collected using
a(href='https://github.com/patrickhulce/third-party-web') Third Party Web.
a(href='https://github.com/patrickhulce/third-party-web') Third Party Web #{thirdPartyWebVersion}
table
each data, category in advice.info.thirdparty.toolsByCategory

View File

@ -21,9 +21,10 @@ a#third-party
a#third-party-categories
h2 Third party
- const thirdPartyWebVersion = pageInfo.data.coach.run ? pageInfo.data.coach.run.thirdPartyWebVersion : pageInfo.data.coach.pageSummary.thirdPartyWebVersion;
p Third party requests categorised by
a(href='https://github.com/patrickhulce/third-party-web') Third party web
| .
|  version #{thirdPartyWebVersion}.
if thirdparty.category && Object.keys(thirdparty.category).length > 0
.row

47
npm-shrinkwrap.json generated
View File

@ -17,7 +17,7 @@
"axe-core": "4.7.2",
"browsertime": "17.15.0",
"cli-color": "2.0.3",
"coach-core": "7.2.1",
"coach-core": "8.0.0",
"concurrent-queue": "7.0.2",
"dayjs": "1.11.9",
"fast-crc32c": "2.0.0",
@ -2425,9 +2425,9 @@
}
},
"node_modules/coach-core": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/coach-core/-/coach-core-7.2.1.tgz",
"integrity": "sha512-Mci7Pwf+jmUmpAuao07v1n1yyHs3rQJQwLfRh7xs8ixzl7i0t1XfYWWKF2rdM7UeVmkJUadTdw24N3QotYBWSQ==",
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/coach-core/-/coach-core-8.0.0.tgz",
"integrity": "sha512-Jq1n+utKMuXJA0KC1JjTyCBQJPQFEsPdTN/HiSwvW4U8p5B/pe9lxvrYNIc7Oc/VhkBjXgNlfdsxIbxtCfh0xw==",
"dependencies": {
"filter-files": "0.4.0",
"json-stable-stringify": "1.0.2",
@ -2435,8 +2435,8 @@
"lodash.merge": "4.6.2",
"lodash.sortby": "4.7.0",
"pagexray": "4.4.2",
"third-party-web": "0.23.0",
"wappalyzer-core": "6.10.62"
"third-party-web": "0.24.0",
"wappalyzer-core": "6.10.66"
},
"engines": {
"node": ">=14.0.0"
@ -8781,9 +8781,9 @@
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
},
"node_modules/third-party-web": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.23.0.tgz",
"integrity": "sha512-JMN1CYDnalQKs4Iyp2/HH1bhy4Euw5Tt1SSAANxmIQCXHrsMiD0c46KNDiRteuKkghXNEOzFlGoXAp3ewXdCXQ=="
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.24.0.tgz",
"integrity": "sha512-mMkV7LE857QCG9DM/mkZoqsEEbJmtimnWBgm/bAmJuRlfVM29OLhPFse1ayrW1xmtJqg7bVU6ZBtjz8vVQGq2g=="
},
"node_modules/through": {
"version": "2.3.8",
@ -9125,9 +9125,10 @@
}
},
"node_modules/wappalyzer-core": {
"version": "6.10.62",
"resolved": "https://registry.npmjs.org/wappalyzer-core/-/wappalyzer-core-6.10.62.tgz",
"integrity": "sha512-cCRWcH1L5E6UhCgnPw3w09bBfqH35OL87RjQri7QtQRqxjBlHr+BWKRObphAG0nBo1N01VZe/1EE/zRtEaUBHw==",
"version": "6.10.66",
"resolved": "https://registry.npmjs.org/wappalyzer-core/-/wappalyzer-core-6.10.66.tgz",
"integrity": "sha512-7EOYy4DpdRcfoW00SfCwKjJE3//AAbyl2dzuG6DgICKPoRf60ero/1fBHOB2ipVTmIxpnnlsJ8jY0r5McwRwtA==",
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
"funding": [
{
"url": "https://github.com/sponsors/aliasio"
@ -11239,9 +11240,9 @@
}
},
"coach-core": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/coach-core/-/coach-core-7.2.1.tgz",
"integrity": "sha512-Mci7Pwf+jmUmpAuao07v1n1yyHs3rQJQwLfRh7xs8ixzl7i0t1XfYWWKF2rdM7UeVmkJUadTdw24N3QotYBWSQ==",
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/coach-core/-/coach-core-8.0.0.tgz",
"integrity": "sha512-Jq1n+utKMuXJA0KC1JjTyCBQJPQFEsPdTN/HiSwvW4U8p5B/pe9lxvrYNIc7Oc/VhkBjXgNlfdsxIbxtCfh0xw==",
"requires": {
"filter-files": "0.4.0",
"json-stable-stringify": "1.0.2",
@ -11249,8 +11250,8 @@
"lodash.merge": "4.6.2",
"lodash.sortby": "4.7.0",
"pagexray": "4.4.2",
"third-party-web": "0.23.0",
"wappalyzer-core": "6.10.62"
"third-party-web": "0.24.0",
"wappalyzer-core": "6.10.66"
}
},
"code-excerpt": {
@ -16073,9 +16074,9 @@
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
},
"third-party-web": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.23.0.tgz",
"integrity": "sha512-JMN1CYDnalQKs4Iyp2/HH1bhy4Euw5Tt1SSAANxmIQCXHrsMiD0c46KNDiRteuKkghXNEOzFlGoXAp3ewXdCXQ=="
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.24.0.tgz",
"integrity": "sha512-mMkV7LE857QCG9DM/mkZoqsEEbJmtimnWBgm/bAmJuRlfVM29OLhPFse1ayrW1xmtJqg7bVU6ZBtjz8vVQGq2g=="
},
"through": {
"version": "2.3.8",
@ -16351,9 +16352,9 @@
"dev": true
},
"wappalyzer-core": {
"version": "6.10.62",
"resolved": "https://registry.npmjs.org/wappalyzer-core/-/wappalyzer-core-6.10.62.tgz",
"integrity": "sha512-cCRWcH1L5E6UhCgnPw3w09bBfqH35OL87RjQri7QtQRqxjBlHr+BWKRObphAG0nBo1N01VZe/1EE/zRtEaUBHw=="
"version": "6.10.66",
"resolved": "https://registry.npmjs.org/wappalyzer-core/-/wappalyzer-core-6.10.66.tgz",
"integrity": "sha512-7EOYy4DpdRcfoW00SfCwKjJE3//AAbyl2dzuG6DgICKPoRf60ero/1fBHOB2ipVTmIxpnnlsJ8jY0r5McwRwtA=="
},
"webidl-conversions": {
"version": "3.0.1",

View File

@ -84,7 +84,7 @@
"aws-sdk": "2.1327.0",
"axe-core": "4.7.2",
"browsertime": "17.15.0",
"coach-core": "7.2.1",
"coach-core": "8.0.0",
"cli-color": "2.0.3",
"concurrent-queue": "7.0.2",
"dayjs": "1.11.9",