sitespeed.io 35.7.4 → 36.0.0-alpha.1
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/.dockerignore +4 -1
- package/CHANGELOG.md +57 -0
- package/Dockerfile +10 -6
- package/Dockerfile-slim +9 -7
- package/LICENSE +1 -1
- package/bin/browsertimeWebPageReplay.js +1 -1
- package/lib/cli/cli.js +22 -25
- package/lib/core/logging.js +6 -98
- package/lib/core/queue.js +112 -0
- package/lib/core/queueHandler.js +20 -28
- package/lib/core/resultsStorage/pathToFolder.js +3 -3
- package/lib/core/resultsStorage/storageManager.js +7 -5
- package/lib/plugins/assets/index.js +1 -1
- package/lib/plugins/axe/axePostScript.cjs +4 -6
- package/lib/plugins/axe/index.js +2 -2
- package/lib/plugins/browsertime/analyzer.js +6 -7
- package/lib/plugins/browsertime/browsertimeAggregator.js +64 -42
- package/lib/plugins/browsertime/filmstrip.js +2 -2
- package/lib/plugins/browsertime/index.js +3 -3
- package/lib/plugins/budget/deprecatedVerify.js +2 -2
- package/lib/plugins/budget/index.js +2 -2
- package/lib/plugins/budget/json.js +2 -2
- package/lib/plugins/budget/junit.js +2 -2
- package/lib/plugins/budget/tap.js +2 -2
- package/lib/plugins/budget/verify.js +2 -2
- package/lib/plugins/coach/aggregator.js +7 -9
- package/lib/plugins/coach/index.js +2 -2
- package/lib/plugins/compare/helper.js +2 -2
- package/lib/plugins/compare/index.js +2 -2
- package/lib/plugins/crawler/index.js +3 -6
- package/lib/plugins/crux/index.js +2 -2
- package/lib/plugins/crux/send.js +2 -2
- package/lib/plugins/domains/aggregator.js +9 -11
- package/lib/plugins/domains/index.js +1 -1
- package/lib/plugins/gcs/index.js +17 -16
- package/lib/plugins/grafana/send-annotation.js +2 -2
- package/lib/plugins/graphite/data-generator.js +13 -17
- package/lib/plugins/graphite/index.js +4 -3
- package/lib/plugins/graphite/send-annotation.js +2 -2
- package/lib/plugins/graphite/sender.js +2 -2
- package/lib/plugins/html/dataCollector.js +8 -14
- package/lib/plugins/html/htmlBuilder.js +12 -10
- package/lib/plugins/html/index.js +2 -5
- package/lib/plugins/html/renderer.js +2 -2
- package/lib/plugins/html/setup/summaryBoxes.js +2 -2
- package/lib/plugins/html/templates/url/coach/technology.pug +10 -8
- package/lib/plugins/html/templates/url/includes/tabScripts.js +1 -1
- package/lib/plugins/influxdb/data-generator.js +6 -8
- package/lib/plugins/influxdb/index.js +3 -4
- package/lib/plugins/influxdb/send-annotation.js +2 -2
- package/lib/plugins/influxdb/send-annotationV2.js +2 -2
- package/lib/plugins/lateststorer/index.js +2 -5
- package/lib/plugins/matrix/index.js +2 -2
- package/lib/plugins/matrix/send.js +2 -2
- package/lib/plugins/messagelogger/index.js +4 -3
- package/lib/plugins/pagexray/index.js +2 -2
- package/lib/plugins/pagexray/pagexrayAggregator.js +11 -10
- package/lib/plugins/remove/index.js +2 -2
- package/lib/plugins/s3/index.js +29 -28
- package/lib/plugins/s3/limit.js +34 -0
- package/lib/plugins/scp/index.js +6 -10
- package/lib/plugins/slack/index.js +20 -21
- package/lib/plugins/sustainable/helper.js +1 -1
- package/lib/plugins/sustainable/index.js +35 -14
- package/lib/plugins/text/color.js +30 -0
- package/lib/plugins/text/textBuilder.js +50 -20
- package/lib/sitespeed.js +11 -15
- package/lib/support/fileUtil.js +40 -0
- package/lib/support/filterRegistry.js +4 -4
- package/lib/support/flattenMessage.js +2 -2
- package/lib/support/messageMaker.js +2 -2
- package/lib/support/metricsFilter.js +9 -16
- package/lib/support/osUtil.js +36 -0
- package/lib/support/util.js +24 -0
- package/npm-shrinkwrap.json +1244 -2685
- package/package.json +17 -35
- package/tools/postinstall.js +61 -0
- package/.github/CONTRIBUTING.md +0 -24
- package/.github/FUNDING.yml +0 -12
- package/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +0 -65
- package/.github/ISSUE_TEMPLATE/FEATURE_IMPROVEMENT.yml +0 -15
- package/.github/ISSUE_TEMPLATE/QUESTION.yml +0 -15
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -14
- package/.github/budget.json +0 -13
- package/.github/workflows/building-docker-autobuild.yml +0 -30
- package/.github/workflows/building-docker-release.yml +0 -76
- package/.github/workflows/crux-test.yml +0 -23
- package/.github/workflows/docker-scan.yml +0 -29
- package/.github/workflows/docker.yml +0 -39
- package/.github/workflows/linux.yml +0 -80
- package/.github/workflows/safari.yml +0 -30
- package/.github/workflows/sitespeed-io-action-example.yml +0 -22
- package/.github/workflows/unittests.yml +0 -41
- package/.github/workflows/windows.yml +0 -39
- package/.github/workflows/windowsFull.yml +0 -36
- package/.netlify +0 -1
- package/.spelling +0 -58
- package/Gemfile +0 -4
- package/Gemfile.lock +0 -53
- package/docs/README.md +0 -10
- package/lib/plugins/sustainable/data/url2green.json.gz +0 -0
- package/release/feed.js +0 -198
- package/release/friendlyNames.js +0 -9
- package/release/friendlyNamesBudget.js +0 -15
- package/wpr-record.log +0 -102
- package/wpr-replay.log +0 -96
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"sitespeed.io": "./bin/sitespeed.js",
|
|
6
6
|
"sitespeed.io-wpr": "./bin/browsertimeWebPageReplay.js"
|
|
7
7
|
},
|
|
8
|
-
"version": "
|
|
8
|
+
"version": "36.0.0-alpha.1",
|
|
9
9
|
"description": "sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"performance",
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"build:css": "npm run build:css-light && npm run build:css-dark",
|
|
57
57
|
"build:css-light": "sass lib/plugins/html/src/sass/main-light.scss > lib/plugins/html/assets/css/index-light.css && cleancss -o lib/plugins/html/assets/css/index-light.min.css lib/plugins/html/assets/css/index-light.css && rm lib/plugins/html/assets/css/index-light.css ",
|
|
58
58
|
"build:css-dark": "sass lib/plugins/html/src/sass/main-dark.scss > lib/plugins/html/assets/css/index-dark.css && cleancss -o lib/plugins/html/assets/css/index-dark.min.css lib/plugins/html/assets/css/index-dark.css && rm lib/plugins/html/assets/css/index-dark.css",
|
|
59
|
-
"generate:assets": "mkdir -p assets/$npm_package_version && cp -R lib/plugins/html/assets/ assets/$npm_package_version/"
|
|
59
|
+
"generate:assets": "mkdir -p assets/$npm_package_version && cp -R lib/plugins/html/assets/ assets/$npm_package_version/",
|
|
60
|
+
"postinstall": "node tools/postinstall.js"
|
|
60
61
|
},
|
|
61
62
|
"engines": {
|
|
62
63
|
"node": ">=14.19.1"
|
|
@@ -65,10 +66,10 @@
|
|
|
65
66
|
"ava": "6.1.3",
|
|
66
67
|
"changelog-parser": "3.0.1",
|
|
67
68
|
"clean-css-cli": "5.6.3",
|
|
68
|
-
"eslint": "9.
|
|
69
|
+
"eslint": "9.7.0",
|
|
69
70
|
"eslint-config-prettier": "9.1.0",
|
|
70
|
-
"eslint-plugin-prettier": "5.1
|
|
71
|
-
"eslint-plugin-unicorn": "
|
|
71
|
+
"eslint-plugin-prettier": "5.2.1",
|
|
72
|
+
"eslint-plugin-unicorn": "56.0.1",
|
|
72
73
|
"feed": "4.2.2",
|
|
73
74
|
"jsdoc": "4.0.3",
|
|
74
75
|
"license-checker": "^25.0.0",
|
|
@@ -80,54 +81,35 @@
|
|
|
80
81
|
},
|
|
81
82
|
"exports": "./lib/sitespeed.js",
|
|
82
83
|
"dependencies": {
|
|
83
|
-
"@
|
|
84
|
+
"@aws-sdk/client-s3": "3.717.0",
|
|
85
|
+
"@google-cloud/storage": "7.14.0",
|
|
84
86
|
"@influxdata/influxdb-client": "1.33.2",
|
|
85
|
-
"@
|
|
86
|
-
"@
|
|
87
|
+
"@sitespeed.io/log": "0.2.3",
|
|
88
|
+
"@sitespeed.io/plugin": "1.0.0",
|
|
89
|
+
"@tgwf/co2": "0.16.4",
|
|
90
|
+
"@slack/webhook": "7.0.4",
|
|
87
91
|
"axe-core": "4.10.2",
|
|
88
|
-
"browsertime": "
|
|
89
|
-
"coach-core": "8.
|
|
90
|
-
"cli-color": "2.0.4",
|
|
91
|
-
"concurrent-queue": "7.0.2",
|
|
92
|
+
"browsertime": "24.0.0-alpha.3",
|
|
93
|
+
"coach-core": "8.1.1",
|
|
92
94
|
"dayjs": "1.11.11",
|
|
93
95
|
"fast-crc32c": "2.0.0",
|
|
94
|
-
"fast-stats": "0.0.
|
|
95
|
-
"find-up": "7.0.0",
|
|
96
|
-
"fs-extra": "11.2.0",
|
|
97
|
-
"getos": "3.2.1",
|
|
96
|
+
"fast-stats": "0.0.7",
|
|
98
97
|
"import-global": "1.1.1",
|
|
99
98
|
"influx": "5.9.3",
|
|
100
|
-
"intel": "1.2.0",
|
|
101
|
-
"jstransformer-markdown-it": "3.0.0",
|
|
102
99
|
"junit-report-builder": "3.2.1",
|
|
103
|
-
"lodash.chunk": "4.2.0",
|
|
104
|
-
"lodash.clonedeep": "4.5.0",
|
|
105
|
-
"lodash.flatten": "4.4.0",
|
|
106
|
-
"lodash.foreach": "4.5.0",
|
|
107
100
|
"lodash.get": "4.4.2",
|
|
108
|
-
"lodash.isempty": "4.4.0",
|
|
109
101
|
"lodash.merge": "4.6.2",
|
|
110
|
-
"lodash.pick": "4.4.0",
|
|
111
|
-
"lodash.pullall": "4.2.0",
|
|
112
|
-
"lodash.reduce": "4.6.0",
|
|
113
102
|
"lodash.set": "4.3.2",
|
|
114
|
-
"lodash.union": "4.6.0",
|
|
115
103
|
"markdown": "0.5.0",
|
|
116
104
|
"node-scp": "0.0.23",
|
|
117
|
-
"node-slack": "0.0.7",
|
|
118
105
|
"ora": "8.0.1",
|
|
119
|
-
"os-name": "6.0.0",
|
|
120
|
-
"p-limit": "6.1.0",
|
|
121
106
|
"pug": "3.0.3",
|
|
122
|
-
"recursive-readdir": "2.2.3",
|
|
123
107
|
"simplecrawler": "1.1.9",
|
|
124
|
-
"@sitespeed.io/plugin": "0.0.6",
|
|
125
108
|
"tape": "5.8.1",
|
|
126
|
-
"text-table": "0.2.0",
|
|
127
|
-
"uuid": "10.0.0",
|
|
128
109
|
"yargs": "17.7.2"
|
|
129
110
|
},
|
|
130
111
|
"overrides": {
|
|
131
|
-
"minimist": "^1.2.6"
|
|
112
|
+
"minimist": "^1.2.6",
|
|
113
|
+
"whatwg-url": "^14.0.0"
|
|
132
114
|
}
|
|
133
115
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { existsSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { mkdirSync } from 'node:fs';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import https from 'node:https';
|
|
7
|
+
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
|
|
10
|
+
const DEFAULT_URL2GREEN_URL =
|
|
11
|
+
'https://raw.githubusercontent.com/sitespeedio/url2green/main/url2green.json.gz';
|
|
12
|
+
|
|
13
|
+
const URL2GREEN_FILE_PATH = `${__dirname}/../lib/plugins/sustainable/data/url2green.json.gz`;
|
|
14
|
+
|
|
15
|
+
const DOWNLOAD_URL2GREEN = process.env.DOWNLOAD_URL2GREEN || 'false';
|
|
16
|
+
|
|
17
|
+
function downloadFile(url, destinationPath) {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
https
|
|
20
|
+
.get(url, response => {
|
|
21
|
+
if (response.statusCode !== 200) {
|
|
22
|
+
reject(new Error(`Failed to get '${url}' (${response.statusCode})`));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const fileChunks = [];
|
|
27
|
+
response.on('data', chunk => fileChunks.push(chunk));
|
|
28
|
+
response.on('end', () => {
|
|
29
|
+
try {
|
|
30
|
+
const fileBuffer = Buffer.concat(fileChunks);
|
|
31
|
+
mkdirSync(path.dirname(destinationPath), { recursive: true });
|
|
32
|
+
writeFileSync(destinationPath, fileBuffer);
|
|
33
|
+
resolve();
|
|
34
|
+
} catch (error) {
|
|
35
|
+
reject(error);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
})
|
|
39
|
+
.on('error', reject);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function run() {
|
|
44
|
+
if (DOWNLOAD_URL2GREEN === 'true') {
|
|
45
|
+
if (existsSync(URL2GREEN_FILE_PATH)) {
|
|
46
|
+
console.log('URL2GREEN file already exists. Skipping download.');
|
|
47
|
+
} else {
|
|
48
|
+
console.log('URL2GREEN file is missing. Downloading...');
|
|
49
|
+
try {
|
|
50
|
+
await downloadFile(DEFAULT_URL2GREEN_URL, URL2GREEN_FILE_PATH);
|
|
51
|
+
console.log('URL2GREEN file downloaded successfully.');
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error('Failed to download URL2GREEN file:', error.message);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
console.log('Skipping URL2GREEN file download (DOWNLOAD_URL2GREEN=false).');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
await run();
|
package/.github/CONTRIBUTING.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# How to contribute
|
|
2
|
-
Sitespeed.io continues to evolve thanks to people who contributes, so please please help out. Check our [list](../HELP.md) of what you can do to help us.
|
|
3
|
-
|
|
4
|
-
## Making changes
|
|
5
|
-
If you want help out, that's great! Before taking the time to code something big, feel free to open an issue first proposing your idea to other contributors, that way you can get feedback on the idea before taking time to write precious code.
|
|
6
|
-
|
|
7
|
-
## Add a defect
|
|
8
|
-
Please make sure you run the [latest version](https://www.npmjs.com/package/sitespeed.io) of sitespeed.io. Then check the [defect/bug list](https://github.com/sitespeedio/sitespeed.io/issues?labels=bug&page=1&state=open) to make sure that it hasn't been filed yet.
|
|
9
|
-
|
|
10
|
-
If you find a defect, please file a bug report. Include the following:
|
|
11
|
-
- Explain the bug/defect and what you where doing.
|
|
12
|
-
- OS & versions
|
|
13
|
-
- Always add the URL of the page you where analysing (if it is secret, drop me an email peter**at**soulgalore.com and send me the address).
|
|
14
|
-
- Add a screenshot and clearly point out where the defect is (if applicable)
|
|
15
|
-
- Include the content of the sitespeed.io.log file in a [gist](https://gist.github.com/) and attach it to the issue.
|
|
16
|
-
|
|
17
|
-
If you have the skills & the time, it is perfect if you send a pull request with a fix, that helps us a lot!
|
|
18
|
-
|
|
19
|
-
## Add a change request/new functionality request
|
|
20
|
-
If you have an idea or something that you need sitespeed.io to handle, add an issue and lets discuss it there. Ideas/changes/requests are very very welcome!
|
|
21
|
-
|
|
22
|
-
Thanks for your time & support!
|
|
23
|
-
|
|
24
|
-
Peter
|
package/.github/FUNDING.yml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: [soulgalore]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: sitespeedio
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
otechie: # Replace with a single Otechie username
|
|
12
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
name: Bug Report
|
|
2
|
-
description: File a bug report
|
|
3
|
-
labels: [bug]
|
|
4
|
-
body:
|
|
5
|
-
- type: markdown
|
|
6
|
-
attributes:
|
|
7
|
-
value: Thanks for reporting issues back to sitespeed.io!
|
|
8
|
-
- type: checkboxes
|
|
9
|
-
id: Reproducable
|
|
10
|
-
attributes:
|
|
11
|
-
label: Have you read the documentation?
|
|
12
|
-
description: Please double check that this question hasn't already answered in the [documentation](https://www.sitespeed.io/documentation/sitespeed.io/) (use the `Search`). Also please read [how to make a good bug report](https://www.sitespeed.io/documentation/sitespeed.io/bug-report/) and check [how to debug your script](https://www.sitespeed.io/documentation/sitespeed.io/scripting/#debug).
|
|
13
|
-
options:
|
|
14
|
-
- label: Yes, I've read the [how to make a reproducable bug guide](https://www.sitespeed.io/documentation/sitespeed.io/bug-report/)
|
|
15
|
-
required: true
|
|
16
|
-
- label: Yes, I've read the [how to debug my script guide](https://www.sitespeed.io/documentation/sitespeed.io/scripting/#debug)
|
|
17
|
-
required: false
|
|
18
|
-
- type: input
|
|
19
|
-
id: url
|
|
20
|
-
attributes:
|
|
21
|
-
label: URL
|
|
22
|
-
description: What URL did you run sitespeed.io on? If you can't share your URL please make a minimial repro to a public location (e.g. https://glitch.com/, http://jsbin.com/, etc)
|
|
23
|
-
placeholder: https://example.com
|
|
24
|
-
validations:
|
|
25
|
-
required: true
|
|
26
|
-
- type: textarea
|
|
27
|
-
id: whaw
|
|
28
|
-
attributes:
|
|
29
|
-
label: What are you trying to accomplish
|
|
30
|
-
description: A brief description of what you tried to do and what went wrong.
|
|
31
|
-
validations:
|
|
32
|
-
required: true
|
|
33
|
-
- type: dropdown
|
|
34
|
-
id: browser
|
|
35
|
-
attributes:
|
|
36
|
-
label: What browser did you use?
|
|
37
|
-
description: Extra bonus if you try the issue in multiple browsers
|
|
38
|
-
multiple: true
|
|
39
|
-
options:
|
|
40
|
-
- Chrome
|
|
41
|
-
- Firefox
|
|
42
|
-
- Edge
|
|
43
|
-
- Safari Mac OS
|
|
44
|
-
- Safari iOS
|
|
45
|
-
- Chrome Android
|
|
46
|
-
- Firefox Android
|
|
47
|
-
- Other
|
|
48
|
-
validations:
|
|
49
|
-
required: true
|
|
50
|
-
- type: textarea
|
|
51
|
-
id: how-to-reproduce
|
|
52
|
-
attributes:
|
|
53
|
-
label: How to reproduce
|
|
54
|
-
description: Please copy and paste how you run so we can reproduce. This will be automatically formatted into code, so no need for backticks. Remember to follow the [how to make a good bug report guide](https://www.sitespeed.io/documentation/sitespeed.io/bug-report/)!
|
|
55
|
-
render: shell
|
|
56
|
-
validations:
|
|
57
|
-
required: true
|
|
58
|
-
- type: textarea
|
|
59
|
-
id: logs
|
|
60
|
-
attributes:
|
|
61
|
-
label: Log output
|
|
62
|
-
description: Please copy and paste the full log output from your test (please DO NOT take a screenshot of the log output). This will be automatically formatted into code, so no need for backticks. If the log output is large please use a [gist](https://gist.github.com)!
|
|
63
|
-
render: shell
|
|
64
|
-
validations:
|
|
65
|
-
required: false
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
name: New feature or improvement
|
|
2
|
-
description: Suggest a new feature or something that can be improved
|
|
3
|
-
labels: [feature, improvement]
|
|
4
|
-
body:
|
|
5
|
-
- type: markdown
|
|
6
|
-
attributes:
|
|
7
|
-
value: |
|
|
8
|
-
Suggest a new feature or something that can be improved
|
|
9
|
-
- type: textarea
|
|
10
|
-
id: your-idea
|
|
11
|
-
attributes:
|
|
12
|
-
label: Feature/improvement
|
|
13
|
-
description: You can also disuss new features/improvements in the [sitespeed.io Slack channel](https://join.slack.com/t/sitespeedio/shared_invite/zt-296jzr7qs-d6DId2KpEnMPJSQ8_R~WFw).
|
|
14
|
-
validations:
|
|
15
|
-
required: true
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
name: Question
|
|
2
|
-
description: Ask a question about sitespeed.io
|
|
3
|
-
labels: [question]
|
|
4
|
-
body:
|
|
5
|
-
- type: markdown
|
|
6
|
-
attributes:
|
|
7
|
-
value: |
|
|
8
|
-
Ask a question about sitespeed.io
|
|
9
|
-
- type: textarea
|
|
10
|
-
id: your-question
|
|
11
|
-
attributes:
|
|
12
|
-
label: Your question
|
|
13
|
-
description: Please double check that this question hasn't already answered in the [documentation](https://www.sitespeed.io/documentation/sitespeed.io/) (use the `Search`) or [old GitHub issues](https://github.com/sitespeedio/sitespeed.io/issues?q=is%3Aissue+is%3Aclosed). You can also ask questions in the [sitespeed.io Slack channel](https://join.slack.com/t/sitespeedio/shared_invite/zt-296jzr7qs-d6DId2KpEnMPJSQ8_R~WFw). And if your question is more like a bug, please [use the bug report form](https://github.com/sitespeedio/sitespeed.io/issues/new?assignees=&labels=bug&template=BUG_REPORT.yml)
|
|
14
|
-
validations:
|
|
15
|
-
required: true
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
### Your checklist for a pull request to sitespeed.io
|
|
2
|
-
Please review the [guidelines for contributing](CONTRIBUTING.md) to this repository.
|
|
3
|
-
|
|
4
|
-
- [ ] I'm making a big change or adding functionality so I've already opened an issue proposing the change to other contributors, so I got feedback on the idea before took the time to write precious code
|
|
5
|
-
- [ ] Check that your change/fix has corresponding unit tests (if applicable)
|
|
6
|
-
- [ ] Squash commits so it looks sane
|
|
7
|
-
- [ ] Update the documentation https://github.com/sitespeedio/sitespeed.io/tree/main/docs in another PR
|
|
8
|
-
- [ ] Verify that the test works by running `npm test` and test linting by `npm run lint`
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Description
|
|
12
|
-
Please describe your pull request and tell us the fix #
|
|
13
|
-
|
|
14
|
-
Thank you for making sitespeed.io even better!
|
package/.github/budget.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: Build autobuild container that runs tests on dashboard.sitespeed.io
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
jobs:
|
|
7
|
-
docker:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
if: ${{ !contains(github.event.head_commit.message, 'docs:') }}
|
|
10
|
-
steps:
|
|
11
|
-
-
|
|
12
|
-
name: Set up QEMU
|
|
13
|
-
uses: docker/setup-qemu-action@v3
|
|
14
|
-
-
|
|
15
|
-
name: Set up Docker Buildx
|
|
16
|
-
uses: docker/setup-buildx-action@v3
|
|
17
|
-
-
|
|
18
|
-
name: Login to DockerHub
|
|
19
|
-
uses: docker/login-action@v3
|
|
20
|
-
with:
|
|
21
|
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
22
|
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
23
|
-
-
|
|
24
|
-
name: Build and push sitespeed.io
|
|
25
|
-
uses: docker/build-push-action@v5
|
|
26
|
-
with:
|
|
27
|
-
platforms: linux/amd64
|
|
28
|
-
push: true
|
|
29
|
-
provenance: false
|
|
30
|
-
tags: sitespeedio/sitespeed.io-autobuild:main
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
name: Build Docker containers on new tag
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
tags:
|
|
5
|
-
- 'v*.*.*'
|
|
6
|
-
jobs:
|
|
7
|
-
docker:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
-
|
|
11
|
-
name: Checkout
|
|
12
|
-
uses: actions/checkout@v4
|
|
13
|
-
-
|
|
14
|
-
name: Set up QEMU
|
|
15
|
-
uses: docker/setup-qemu-action@v3
|
|
16
|
-
-
|
|
17
|
-
name: Set up Docker Buildx
|
|
18
|
-
uses: docker/setup-buildx-action@v3
|
|
19
|
-
-
|
|
20
|
-
name: Login to DockerHub
|
|
21
|
-
uses: docker/login-action@v3
|
|
22
|
-
with:
|
|
23
|
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
24
|
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
25
|
-
- name: Extract version
|
|
26
|
-
id: extract_version
|
|
27
|
-
run: |
|
|
28
|
-
VERSION_TAG=${GITHUB_REF#refs/tags/}
|
|
29
|
-
echo "Git tag: $VERSION_TAG"
|
|
30
|
-
|
|
31
|
-
VERSION=${VERSION_TAG#v}
|
|
32
|
-
echo "Full version without 'v': $VERSION"
|
|
33
|
-
|
|
34
|
-
MAJOR_VERSION=${VERSION%%.*}
|
|
35
|
-
echo "Major version: $MAJOR_VERSION"
|
|
36
|
-
|
|
37
|
-
echo "SITESPEED_VERSION=$VERSION" >> $GITHUB_OUTPUT
|
|
38
|
-
echo "SITESPEED_MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_OUTPUT
|
|
39
|
-
-
|
|
40
|
-
name: Build and push sitespeed.io
|
|
41
|
-
uses: docker/build-push-action@v5
|
|
42
|
-
with:
|
|
43
|
-
context: .
|
|
44
|
-
platforms: linux/amd64,linux/arm64
|
|
45
|
-
push: true
|
|
46
|
-
provenance: false
|
|
47
|
-
tags: |
|
|
48
|
-
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_VERSION }}
|
|
49
|
-
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_MAJOR_VERSION }}
|
|
50
|
-
sitespeedio/sitespeed.io:latest
|
|
51
|
-
-
|
|
52
|
-
name: Build and push sitespeed.io+1
|
|
53
|
-
uses: docker/build-push-action@v5
|
|
54
|
-
with:
|
|
55
|
-
context: .
|
|
56
|
-
platforms: linux/amd64,linux/arm64
|
|
57
|
-
file: ./docker/Dockerfile-plus1
|
|
58
|
-
build-args: version=${{ steps.extract_version.outputs.SITESPEED_VERSION }}
|
|
59
|
-
push: true
|
|
60
|
-
provenance: false
|
|
61
|
-
tags: |
|
|
62
|
-
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_VERSION }}-plus1
|
|
63
|
-
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_MAJOR_VERSION }}-plus1
|
|
64
|
-
-
|
|
65
|
-
name: Build and push sitespeed.io-slim
|
|
66
|
-
uses: docker/build-push-action@v5
|
|
67
|
-
with:
|
|
68
|
-
context: .
|
|
69
|
-
platforms: linux/amd64,linux/arm64
|
|
70
|
-
file: ./Dockerfile-slim
|
|
71
|
-
build-args: version=${{ steps.extract_version.outputs.SITESPEED_VERSION }}
|
|
72
|
-
push: true
|
|
73
|
-
provenance: false
|
|
74
|
-
tags: |
|
|
75
|
-
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_VERSION }}-slim
|
|
76
|
-
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_MAJOR_VERSION }}-slim
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: Test CRUX
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
pull_request:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
if: ${{ !contains(github.event.head_commit.message, 'docs:') }}
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- name: Use Node.js
|
|
16
|
-
uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version: '20.x'
|
|
19
|
-
- name: Install sitespeed.io
|
|
20
|
-
run: npm ci
|
|
21
|
-
- name: Run tests with CruX
|
|
22
|
-
run: bin/sitespeed.js -b chrome -n 1 --crux.key ${{ secrets.CRUX_KEY }} https://en.wikipedia.org/wiki/Main_Page --plugins.remove browsertime
|
|
23
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: Docker security scan
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
pull_request:
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
name: Build
|
|
10
|
-
runs-on: ubuntu-20.04
|
|
11
|
-
if: ${{ !contains(github.event.head_commit.message, 'docs:') }}
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout code
|
|
14
|
-
uses: actions/checkout@v4
|
|
15
|
-
|
|
16
|
-
- name: Build an image from Dockerfile
|
|
17
|
-
run: |
|
|
18
|
-
docker buildx install
|
|
19
|
-
docker buildx build --load --platform linux/amd64 -t docker.io/sitespeedio/sitespeed.io:${{ github.sha }} .
|
|
20
|
-
|
|
21
|
-
- name: Run Trivy vulnerability scanner
|
|
22
|
-
uses: aquasecurity/trivy-action@master
|
|
23
|
-
with:
|
|
24
|
-
image-ref: 'docker.io/sitespeedio/sitespeed.io:${{ github.sha }}'
|
|
25
|
-
format: 'table'
|
|
26
|
-
exit-code: '1'
|
|
27
|
-
ignore-unfixed: true
|
|
28
|
-
vuln-type: 'os,library'
|
|
29
|
-
severity: 'CRITICAL'
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: Docker
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
pull_request:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
if: ${{ !contains(github.event.head_commit.message, 'docs:') }}
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- name: Build Docker containers
|
|
16
|
-
run: |
|
|
17
|
-
docker buildx install
|
|
18
|
-
docker buildx build --load --platform linux/amd64 -t sitespeedio/sitespeed.io .
|
|
19
|
-
docker buildx build --load --platform linux/amd64 -t sitespeedio/sitespeed.io:slim --file Dockerfile-slim .
|
|
20
|
-
- name: Install local HTTP server
|
|
21
|
-
run: npm install serve -g
|
|
22
|
-
- name: Start local HTTP server
|
|
23
|
-
run: (serve test/data/html/ -l 3001&)
|
|
24
|
-
- name: Run test on default container for Chrome
|
|
25
|
-
run: docker run --rm -v "$(pwd)":/sitespeed.io --network=host sitespeedio/sitespeed.io http://127.0.0.1:3001 -n 1 -b chrome
|
|
26
|
-
- name: Run test on default container for Firefox
|
|
27
|
-
run: docker run --rm -v "$(pwd)":/sitespeed.io --network=host sitespeedio/sitespeed.io http://127.0.0.1:3001 -n 1 -b firefox
|
|
28
|
-
- name: Run test on default container for Edge
|
|
29
|
-
run: docker run --rm -v "$(pwd)":/sitespeed.io --network=host sitespeedio/sitespeed.io http://127.0.0.1:3001 -n 1 -b edge
|
|
30
|
-
- name: Run test on slim container
|
|
31
|
-
run: docker run --rm -v "$(pwd)":/sitespeed.io --network=host sitespeedio/sitespeed.io:slim http://127.0.0.1:3001 -n 1 --browsertime.firefox.preference "devtools.netmonitor.persistlog:true"
|
|
32
|
-
- name: Test WebPageReplay with Chrome
|
|
33
|
-
run: docker run --cap-add=NET_ADMIN --rm -v "$(pwd)":/sitespeed.io -e REPLAY=true -e LATENCY=100 sitespeedio/sitespeed.io https://www.sitespeed.io -n 3 -b chrome
|
|
34
|
-
- name: Test WebPageReplay user journey with Chrome
|
|
35
|
-
run: docker run --cap-add=NET_ADMIN --rm -v "$(pwd)":/sitespeed.io -e REPLAY=true -e LATENCY=100 sitespeedio/sitespeed.io test/prepostscripts/multiWindows.cjs -n 1 -b chrome --multi
|
|
36
|
-
- name: Test WebPageReplay with Firefox
|
|
37
|
-
run: docker run --cap-add=NET_ADMIN --rm -v "$(pwd)":/sitespeed.io --network=host -e REPLAY=true -e LATENCY=100 sitespeedio/sitespeed.io https://www.sitespeed.io -n 3 -b firefox --browsertime.firefox.acceptInsecureCerts true
|
|
38
|
-
- name: Run Chrome test with config
|
|
39
|
-
run: docker run --rm -v "$(pwd)":/sitespeed.io --network=host sitespeedio/sitespeed.io http://127.0.0.1:3001 -b chrome --config test/exampleConfig.json
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
name: Linux browsers
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
pull_request:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
if: ${{ !contains(github.event.head_commit.message, 'docs:') }}
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- name: Use Node.js
|
|
16
|
-
uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version: '20.x'
|
|
19
|
-
- name: Install sitespeed.io
|
|
20
|
-
run: npm ci
|
|
21
|
-
- name: Install Chrome
|
|
22
|
-
run: |
|
|
23
|
-
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
|
24
|
-
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
|
25
|
-
sudo apt-get update
|
|
26
|
-
sudo apt-get --only-upgrade install google-chrome-stable
|
|
27
|
-
google-chrome --version
|
|
28
|
-
- name: Install dependencies
|
|
29
|
-
run: |
|
|
30
|
-
python -m pip install --upgrade --user pip
|
|
31
|
-
python -m pip install --user scipy
|
|
32
|
-
python -m pip show scipy
|
|
33
|
-
- name: Install Firefox
|
|
34
|
-
uses: browser-actions/setup-firefox@latest
|
|
35
|
-
#with:
|
|
36
|
-
# firefox-version: '94.0'
|
|
37
|
-
- name: Setup environment
|
|
38
|
-
run: docker compose -f test/docker-compose.yml up -d
|
|
39
|
-
- name: Browser versions
|
|
40
|
-
run: |
|
|
41
|
-
google-chrome --version
|
|
42
|
-
firefox --version
|
|
43
|
-
- name: Install local HTTP server
|
|
44
|
-
run: npm install serve -g
|
|
45
|
-
- name: Start local HTTP server
|
|
46
|
-
run: (serve test/data/html/ -l 3001&)
|
|
47
|
-
- name: Test old budget
|
|
48
|
-
run: bin/sitespeed.js -b firefox -n 2 --budget.configPath test/oldBudget.json --summary --xvfb http://127.0.0.1:3001/simple/
|
|
49
|
-
- name: Test new budget file with junit
|
|
50
|
-
run: bin/sitespeed.js --useHash -n 1 --budget.configPath test/budget.json --xvfb --budget.output junit http://127.0.0.1:3001/simple/#heybaberia
|
|
51
|
-
- name: Test new budget file with tap
|
|
52
|
-
run: bin/sitespeed.js --useHash -n 1 --budget.configPath test/budget.json --xvfb --budget.output tap http://127.0.0.1:3001/simple/#heybaberia
|
|
53
|
-
- name: Test new budget file with json
|
|
54
|
-
run: bin/sitespeed.js --useHash -n 1 --budget.configPath test/budget.json --xvfb --budget.output json http://127.0.0.1:3001/simple/#heybaberia
|
|
55
|
-
- name: Use AXE
|
|
56
|
-
run: bin/sitespeed.js --useAlias start --mobile -n 1 --utc --axe.enable --xvfb http://127.0.0.1:3001/simple/
|
|
57
|
-
- name: Use Fireefox with --mobile
|
|
58
|
-
run: bin/sitespeed.js -b firefox --metrics.list --mobile -n 1 http://127.0.0.1:3001/simple/ --sustainable.enable --xvfb
|
|
59
|
-
- name: Test --multi
|
|
60
|
-
run: bin/sitespeed.js --multi -b chrome -n 1 test/prepostscripts/preSample.js http://127.0.0.1:3001/simple/ test/prepostscripts/postSample.js --xvfb --browsertime.cjs
|
|
61
|
-
- name: Test --multi and --tcpdump
|
|
62
|
-
run: bin/sitespeed.js --multi -n 1 http://127.0.0.1:3001/simple/ http://127.0.0.1:3001/dimple/ --tcpdump --xvfb --browsertime.cjs
|
|
63
|
-
- name: Test --multi with one file
|
|
64
|
-
run: bin/sitespeed.js --multi -n 3 test/prepostscripts/multi.js --xvfb --browsertime.cjs
|
|
65
|
-
- name: Test setting HTML output pageSummaries
|
|
66
|
-
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ http://127.0.0.1:3001/dimple/ -v -n 1 --html.pageSummaryMetrics transferSize.css --html.pageSummaryMetrics requests.httpErrors --html.pageSummaryMetrics score.performance --xvfb
|
|
67
|
-
- name: Test setting HTML output summary boxes
|
|
68
|
-
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -v -n 1 --html.summaryBoxes score.performance --html.summaryBoxes timings.firstPaint --xvfb
|
|
69
|
-
- name: Run test with Graphite
|
|
70
|
-
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --graphite.host 127.0.0.1 --xvfb
|
|
71
|
-
- name: Run test without a CLI
|
|
72
|
-
run: xvfb-run node test/runWithoutCli.js
|
|
73
|
-
- name: Run test with Influx 1.8
|
|
74
|
-
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --xvfb --logToFile --resultBaseUrl https://result.sitespeed.io --influxdb.annotationScreenshot=true
|
|
75
|
-
- name: Run test with Influx 2.6.1
|
|
76
|
-
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --influxdb.port 8087 --influxdb.version 2 --influxdb.organisation sitespeed --influxdb.token sitespeed --xvfb --resultBaseUrl https://result.sitespeed.io --influxdb.annotationScreenshot=true
|
|
77
|
-
- name: Run Chrome test with config
|
|
78
|
-
run: node bin/sitespeed.js --config test/exampleConfig.json http://127.0.0.1:3001/simple/ --xvfb
|
|
79
|
-
- name: Run Chrome test using compare plugin
|
|
80
|
-
run: node bin/sitespeed.js --compare.id compare --compare.saveBaseline --compare.baselinePath test/ http://127.0.0.1:3001/simple/ --xvfb
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: OSX Safari
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
pull_request:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: macos-latest
|
|
12
|
-
if: ${{ !contains(github.event.head_commit.message, 'docs:') }}
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- name: Use Node.js
|
|
16
|
-
uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version: '20.x'
|
|
19
|
-
- name: Install dependencies
|
|
20
|
-
run: |
|
|
21
|
-
sudo safaridriver --enable
|
|
22
|
-
npm ci
|
|
23
|
-
- name: Install local HTTP server
|
|
24
|
-
run: npm install serve -g
|
|
25
|
-
- name: Start local HTTP server
|
|
26
|
-
run: (serve test/data/html/ -l 3001&)
|
|
27
|
-
- name: Run test
|
|
28
|
-
run: bin/sitespeed.js -b safari http://127.0.0.1:3001/
|
|
29
|
-
- name: Run Safari test with config
|
|
30
|
-
run: node bin/sitespeed.js -b safari --config test/exampleConfig.json http://127.0.0.1:3001/
|