Merge branch 'main' into actions

This commit is contained in:
Peter Hedenskog 2025-04-30 07:00:43 +02:00 committed by GitHub
commit f79e108019
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 108 additions and 75 deletions

View File

@ -7,7 +7,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'docs:') }}
steps:
- name: Checkout code

View File

@ -1,5 +1,9 @@
# CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
## 37.4.2 - 2025-04-19
### Fixed
* s3: If you add Expires to your object using the API, it was broken since the upgrade to v3. This fix change so we allways use a Date when setting Expires [#4503](https://github.com/sitespeedio/sitespeed.io/pull/4503).
* Make sure that HAR files included in the HTML excludes closing script tags in the body of an response [#4500](https://github.com/sitespeedio/sitespeed.io/pull/4500).
## 37.4.1 - 2025-04-10
### Fixed

View File

@ -1,4 +1,4 @@
FROM sitespeedio/webbrowsers:chrome-135.0-firefox-137.0-edge-135.0-1
FROM sitespeedio/webbrowsers:chrome-136.0-firefox-138.0-edge-135.0
ARG TARGETPLATFORM=linux/amd64

View File

@ -1 +1 @@
24.5.2
24.5.3

View File

@ -1 +1 @@
37.4.1
37.4.2

View File

@ -20,6 +20,8 @@ You can run it with:
docker run --shm-size=1g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-plus1 https://www.sitespeed.io/ --plugins.remove @sitespeed.io/plugin-lighthouse
```
You would also need to add the `--gpsi.key YOUR_GPSI_KEY` to sitespeed.io. The GPSI key is provided by Google and you can get it [here](https://cloud.google.com/docs/authentication/api-keys).
The container also includes Lighthouse. We automatically release a new version of the container per release by adding *-plus1* to the tag. If you use Graphite/InfluxDb the score from Lighthouse and GPSI will be automatically stored.
The plugin will send a request to the Google Page Speed Servers and parse the result. The result will look something like this:

View File

@ -2,7 +2,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>sitespeed.io-release-feed</id>
<title>sitespeed.io release feed</title>
<updated>2025-04-10T00:00:00.000Z</updated>
<updated>2025-04-19T00:00:00.000Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<author>
<name>Peter Hedenskog</name>
@ -15,6 +15,24 @@
<logo>https://www.sitespeed.io/img/logos/sitespeed.io.png</logo>
<icon>http://www.sitespeed.io/favicon.ico</icon>
<rights>All rights reserved 2022, Peter Hedenskog and team</rights>
<entry>
<title type="html"><![CDATA[sitespeed.io 37.4.2]]></title>
<id>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.2</id>
<link href="https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.2"/>
<updated>2025-04-19T00:00:00.000Z</updated>
<summary type="html"><![CDATA[<h3>Fixed</h3>
<ul>
<li>s3: If you add Expires to your object using the API, it was broken since the upgrade to v3. This fix change so we allways use a Date when setting Expires <a href="https://github.com/sitespeedio/sitespeed.io/pull/4503">#4503</a>.</li>
</ul>
<ul>
<li>Make sure that HAR files included in the HTML excludes closing script tags in the body of an response <a href="https://github.com/sitespeedio/sitespeed.io/pull/4500">#4500</a>.</li>
</ul>
]]></summary>
<author>
<name>Sitespeed.io</name>
<uri>https://www.sitespeed.io</uri>
</author>
</entry>
<entry>
<title type="html"><![CDATA[sitespeed.io 37.4.1]]></title>
<id>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.1</id>
@ -267,21 +285,6 @@
<ul>
<li>Simplified logic for uploading files to S3 since we have reports that it do not work 100% <a href="https://github.com/sitespeedio/sitespeed.io/pull/4472">#4472</a>.</li>
</ul>
]]></summary>
<author>
<name>Sitespeed.io</name>
<uri>https://www.sitespeed.io</uri>
</author>
</entry>
<entry>
<title type="html"><![CDATA[sitespeed.io 37.0.4]]></title>
<id>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.0.4</id>
<link href="https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.0.4"/>
<updated>2025-03-07T00:00:00.000Z</updated>
<summary type="html"><![CDATA[<h3>Fixed</h3>
<ul>
<li>Sending annotations to Graphite failed because of InfluxDB check <a href="https://github.com/sitespeedio/sitespeed.io/pull/4469">#4469</a>.</li>
</ul>
]]></summary>
<author>
<name>Sitespeed.io</name>

View File

@ -4,7 +4,7 @@
<title>sitespeed.io release feed</title>
<link>https://www.sitespeed.io</link>
<description>New releases and changelog feed of sitespeed.io</description>
<lastBuildDate>Thu, 10 Apr 2025 00:00:00 GMT</lastBuildDate>
<lastBuildDate>Sat, 19 Apr 2025 00:00:00 GMT</lastBuildDate>
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<generator>https://github.com/jpmonette/feed</generator>
<language>en</language>
@ -15,6 +15,21 @@
</image>
<copyright>All rights reserved 2022, Peter Hedenskog and team</copyright>
<atom:link href="https://www.sitespeed.io/feed/rss.xml" rel="self" type="application/rss+xml"/>
<item>
<title><![CDATA[sitespeed.io 37.4.2]]></title>
<link>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.2</link>
<guid>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.2</guid>
<pubDate>Sat, 19 Apr 2025 00:00:00 GMT</pubDate>
<description><![CDATA[<h3>Fixed</h3>
<ul>
<li>s3: If you add Expires to your object using the API, it was broken since the upgrade to v3. This fix change so we allways use a Date when setting Expires <a href="https://github.com/sitespeedio/sitespeed.io/pull/4503">#4503</a>.</li>
</ul>
<ul>
<li>Make sure that HAR files included in the HTML excludes closing script tags in the body of an response <a href="https://github.com/sitespeedio/sitespeed.io/pull/4500">#4500</a>.</li>
</ul>
]]></description>
<enclosure url="https://www.sitespeed.io/img/logos/sitespeed.io.png" length="0" type="image/png"/>
</item>
<item>
<title><![CDATA[sitespeed.io 37.4.1]]></title>
<link>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.1</link>
@ -219,18 +234,6 @@
<ul>
<li>Simplified logic for uploading files to S3 since we have reports that it do not work 100% <a href="https://github.com/sitespeedio/sitespeed.io/pull/4472">#4472</a>.</li>
</ul>
]]></description>
<enclosure url="https://www.sitespeed.io/img/logos/sitespeed.io.png" length="0" type="image/png"/>
</item>
<item>
<title><![CDATA[sitespeed.io 37.0.4]]></title>
<link>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.0.4</link>
<guid>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.0.4</guid>
<pubDate>Fri, 07 Mar 2025 00:00:00 GMT</pubDate>
<description><![CDATA[<h3>Fixed</h3>
<ul>
<li>Sending annotations to Graphite failed because of InfluxDB check <a href="https://github.com/sitespeedio/sitespeed.io/pull/4469">#4469</a>.</li>
</ul>
]]></description>
<enclosure url="https://www.sitespeed.io/img/logos/sitespeed.io.png" length="0" type="image/png"/>
</item>

View File

@ -2,7 +2,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>sitespeed.io-release-feed</id>
<title>sitespeed.io release feed</title>
<updated>2025-04-10T17:03:46.065Z</updated>
<updated>2025-04-19T11:19:54.540Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<author>
<name>Peter Hedenskog</name>
@ -16,6 +16,24 @@
<icon>http://www.sitespeed.io/favicon.ico</icon>
<rights>All rights reserved 2022, Peter Hedenskog and team</rights>
<category term="Web Performance"/>
<entry>
<title type="html"><![CDATA[sitespeed.io 37.4.2]]></title>
<id>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.2</id>
<link href="https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.2"/>
<updated>2025-04-19T00:00:00.000Z</updated>
<summary type="html"><![CDATA[<h3>Fixed</h3>
<ul>
<li>s3: If you add Expires to your object using the API, it was broken since the upgrade to v3. This fix change so we allways use a Date when setting Expires <a href="https://github.com/sitespeedio/sitespeed.io/pull/4503">#4503</a>.</li>
</ul>
<ul>
<li>Make sure that HAR files included in the HTML excludes closing script tags in the body of an response <a href="https://github.com/sitespeedio/sitespeed.io/pull/4500">#4500</a>.</li>
</ul>
]]></summary>
<author>
<name>Sitespeed.io</name>
<uri>https://www.sitespeed.io</uri>
</author>
</entry>
<entry>
<title type="html"><![CDATA[sitespeed.io 37.4.1]]></title>
<id>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.1</id>
@ -152,21 +170,6 @@
<ul>
<li>Simplified logic for uploading files to S3 since we have reports that it do not work 100% <a href="https://github.com/sitespeedio/sitespeed.io/pull/4472">#4472</a>.</li>
</ul>
]]></summary>
<author>
<name>Sitespeed.io</name>
<uri>https://www.sitespeed.io</uri>
</author>
</entry>
<entry>
<title type="html"><![CDATA[sitespeed.io 37.0.4]]></title>
<id>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.0.4</id>
<link href="https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.0.4"/>
<updated>2025-03-07T00:00:00.000Z</updated>
<summary type="html"><![CDATA[<h3>Fixed</h3>
<ul>
<li>Sending annotations to Graphite failed because of InfluxDB check <a href="https://github.com/sitespeedio/sitespeed.io/pull/4469">#4469</a>.</li>
</ul>
]]></summary>
<author>
<name>Sitespeed.io</name>

View File

@ -4,7 +4,7 @@
<title>sitespeed.io release feed</title>
<link>https://www.sitespeed.io</link>
<description>New releases and changelog feed of sitespeed.io</description>
<lastBuildDate>Thu, 10 Apr 2025 17:03:46 GMT</lastBuildDate>
<lastBuildDate>Sat, 19 Apr 2025 11:19:54 GMT</lastBuildDate>
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<generator>https://github.com/jpmonette/feed</generator>
<language>en</language>
@ -16,6 +16,21 @@
<copyright>All rights reserved 2022, Peter Hedenskog and team</copyright>
<category>Web Performance</category>
<atom:link href="https://www.sitespeed.io/feed/rss.xml" rel="self" type="application/rss+xml"/>
<item>
<title><![CDATA[sitespeed.io 37.4.2]]></title>
<link>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.2</link>
<guid>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.2</guid>
<pubDate>Sat, 19 Apr 2025 00:00:00 GMT</pubDate>
<description><![CDATA[<h3>Fixed</h3>
<ul>
<li>s3: If you add Expires to your object using the API, it was broken since the upgrade to v3. This fix change so we allways use a Date when setting Expires <a href="https://github.com/sitespeedio/sitespeed.io/pull/4503">#4503</a>.</li>
</ul>
<ul>
<li>Make sure that HAR files included in the HTML excludes closing script tags in the body of an response <a href="https://github.com/sitespeedio/sitespeed.io/pull/4500">#4500</a>.</li>
</ul>
]]></description>
<enclosure url="https://www.sitespeed.io/img/logos/sitespeed.io.png" length="0" type="image/png"/>
</item>
<item>
<title><![CDATA[sitespeed.io 37.4.1]]></title>
<link>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.4.1</link>
@ -128,18 +143,6 @@
<ul>
<li>Simplified logic for uploading files to S3 since we have reports that it do not work 100% <a href="https://github.com/sitespeedio/sitespeed.io/pull/4472">#4472</a>.</li>
</ul>
]]></description>
<enclosure url="https://www.sitespeed.io/img/logos/sitespeed.io.png" length="0" type="image/png"/>
</item>
<item>
<title><![CDATA[sitespeed.io 37.0.4]]></title>
<link>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.0.4</link>
<guid>https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md#37.0.4</guid>
<pubDate>Fri, 07 Mar 2025 00:00:00 GMT</pubDate>
<description><![CDATA[<h3>Fixed</h3>
<ul>
<li>Sending annotations to Graphite failed because of InfluxDB check <a href="https://github.com/sitespeedio/sitespeed.io/pull/4469">#4469</a>.</li>
</ul>
]]></description>
<enclosure url="https://www.sitespeed.io/img/logos/sitespeed.io.png" length="0" type="image/png"/>
</item>

View File

@ -3,7 +3,7 @@
//- specific run (the median run) in summaryPageHAR.
//- Inline script tags breaks the output
- dahar = h.get(pageInfo.data, 'browsertime.run.har', summaryPageHAR)
- dahar = JSON.stringify(dahar.log).split('</script>').join('&lt;/script&gt;')
- dahar = JSON.stringify(dahar.log).split('</script>').join('&lt;/script&gt;').split('<script>').join('&lt;script&gt;')
script(src= assetsPath + 'js/perf-cascade.min.js')
script(type='text/javascript').

View File

@ -12,19 +12,35 @@ import { runWithConcurrencyLimit } from './limit.js';
const log = getLogger('sitespeedio.plugin.s3');
const normalizeExpires = maybeSeconds => {
if (typeof maybeSeconds === 'number' && Number.isFinite(maybeSeconds)) {
const seconds = Number.parseInt(maybeSeconds, 10);
const expires = new Date(Date.now() + seconds * 1000);
log.info('Setting s3.expires to ' + expires);
return expires;
}
return maybeSeconds;
};
async function uploadFile(file, s3Client, s3Options, prefix, baseDir) {
const stream = await fsPromises.readFile(file);
const contentType = getContentType(file);
const subPath = path.relative(baseDir, file);
const parameters = {
const baseParams = {
Bucket: s3Options.bucketname,
Key: path.join(s3Options.path || prefix, subPath),
Body: stream,
ContentType: contentType,
ACL: s3Options.acl,
...s3Options.params
ACL: s3Options.acl
};
const userParams = { ...s3Options.params };
if ('Expires' in userParams) {
userParams.Expires = normalizeExpires(userParams.Expires);
}
const parameters = { ...baseParams, ...userParams };
try {
await s3Client.send(new PutObjectCommand(parameters));
log.debug(`Uploaded ${file} to S3 bucket ${s3Options.bucketname}`);

13
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "sitespeed.io",
"version": "37.4.1",
"version": "37.4.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sitespeed.io",
"version": "37.4.1",
"version": "37.4.2",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@ -17,7 +17,7 @@
"@slack/webhook": "7.0.4",
"@tgwf/co2": "0.16.4",
"axe-core": "4.10.2",
"browsertime": "24.5.2",
"browsertime": "24.5.3",
"coach-core": "8.1.1",
"dayjs": "1.11.11",
"fast-crc32c": "2.0.0",
@ -3231,10 +3231,9 @@
}
},
"node_modules/browsertime": {
"version": "24.5.2",
"resolved": "https://registry.npmjs.org/browsertime/-/browsertime-24.5.2.tgz",
"integrity": "sha512-TAgeT+qzr8rBjDLS2xRyqME6My1vUT/c4s5/1yaqAT1quxHWOhva75xJho16NCuGm6JpenQQTHBvgNCWK8he1Q==",
"license": "MIT",
"version": "24.5.3",
"resolved": "https://registry.npmjs.org/browsertime/-/browsertime-24.5.3.tgz",
"integrity": "sha512-ZXi0Af1APuXNUrHc2qIwEO9+tpwVePFzHjX7mvi2Qu09uuzBWjQsihyPl8t9u4/tUtQu60zi9ii1hMVmCEbW6w==",
"dependencies": {
"@devicefarmer/adbkit": "3.3.8",
"@sitespeed.io/chromedriver": "134.0.6998-35",

View File

@ -5,7 +5,7 @@
"sitespeed.io": "./bin/sitespeed.js",
"sitespeed.io-wpr": "./bin/browsertimeWebPageReplay.js"
},
"version": "37.4.1",
"version": "37.4.2",
"description": "sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your websites speed using real browsers in various environments.",
"keywords": [
"performance",
@ -88,7 +88,7 @@
"@tgwf/co2": "0.16.4",
"@slack/webhook": "7.0.4",
"axe-core": "4.10.2",
"browsertime": "24.5.2",
"browsertime": "24.5.3",
"coach-core": "8.1.1",
"dayjs": "1.11.11",
"fast-crc32c": "2.0.0",