sitespeed.io 37.1.0 → 37.1.2

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 CHANGED
@@ -1,6 +1,14 @@
1
1
 
2
2
  # CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
3
3
 
4
+ # 37.1.2 - 2025-03-11
5
+ ### Fixed
6
+ * Show just the filename instead of the full path to the file in the HTML [#4477](https://github.com/sitespeedio/sitespeed.io/pull/4477).
7
+
8
+ ## 37.1.1 - 2025-03-10
9
+ ### Fixed
10
+ * Multiple fixes to better handle if a user journey scripting fails [#4474](https://github.com/sitespeedio/sitespeed.io/pull/4474) and [#4475](https://github.com/sitespeedio/sitespeed.io/pull/4475).
11
+
4
12
  ## 37.1.0 - 2025-03-08
5
13
  ### Fixed
6
14
  * Simplified logic for uploading files to S3 since we have reports that it do not work 100% [#4472](https://github.com/sitespeedio/sitespeed.io/pull/4472).
@@ -17,7 +17,12 @@ export function pathToFolder(url, options, alias) {
17
17
 
18
18
  const pathSegments = [];
19
19
  const urlSegments = [];
20
- pathSegments.push('pages', parsedUrl.hostname.split('.').join('_'));
20
+
21
+ // If a measurements fail and we use a script file and no URL
22
+ // has been tested, we don't have a hostname
23
+ if (parsedUrl.hostname) {
24
+ pathSegments.push('pages', parsedUrl.hostname.split('.').join('_'));
25
+ }
21
26
 
22
27
  if (options.urlMetaData && options.urlMetaData[url]) {
23
28
  pathSegments.push(options.urlMetaData[url]);
@@ -185,7 +185,7 @@ export default class BrowsertimePlugin extends SitespeedioPlugin {
185
185
  // https://github.com/sitespeedio/sitespeed.io/issues/2341
186
186
  for (const element of result) {
187
187
  // Browsertime supports alias for URLS in a script
188
- const alias = element.info.alias;
188
+ const alias = element.info?.alias;
189
189
  if (alias) {
190
190
  if (this.scriptOrMultiple) {
191
191
  url = element.info.url;
@@ -207,14 +207,32 @@ export default class BrowsertimePlugin extends SitespeedioPlugin {
207
207
  resultIndex++
208
208
  ) {
209
209
  axeAggregatorPerURL = new AxeAggregator(this.options);
210
+ // Send errors from Browsertime as early as possible
211
+ // Check for errors. Browsertime errors is an array of all iterations
212
+ // [[],[],[]] where one iteration can have multiple errors
213
+ for (let errorsForOneIteration of result[resultIndex].errors) {
214
+ if (Array.isArray(errorsForOneIteration)) {
215
+ for (let error of errorsForOneIteration) {
216
+ super.sendMessage('error', error, _merge({ url }));
217
+ }
218
+ } else {
219
+ super.sendMessage(
220
+ 'error',
221
+ `${errorsForOneIteration} ${result[resultIndex].failureMessages}`,
222
+ _merge({ url })
223
+ );
224
+ }
225
+ }
210
226
  // If we use scripts or multiple, use the URL from the tested page
211
227
  // so that we can handle click on links etc
212
228
  // see https://github.com/sitespeedio/sitespeed.io/issues/2260
213
229
  // we could change the plugins but since they do not work with
214
230
  // multiple/scripting lets do it like this for now
215
231
  if (this.scriptOrMultiple) {
216
- url = result[resultIndex].info.url;
217
- group = parse(url).hostname;
232
+ url = result[resultIndex].info?.url;
233
+ if (url) {
234
+ group = parse(url).hostname;
235
+ }
218
236
  }
219
237
  let runIndex = 0;
220
238
  for (let browserScriptsData of result[resultIndex].browserScripts) {
@@ -597,14 +615,6 @@ export default class BrowsertimePlugin extends SitespeedioPlugin {
597
615
  group
598
616
  });
599
617
  }
600
-
601
- // Check for errors. Browsertime errors is an array of all iterations
602
- // [[],[],[]] where one iteration can have multiple errors
603
- for (let errorsForOneIteration of result[resultIndex].errors) {
604
- for (let error of errorsForOneIteration) {
605
- super.sendMessage('error', error, _merge({ url }));
606
- }
607
- }
608
618
  }
609
619
  break;
610
620
  } catch (error) {
package/lib/sitespeed.js CHANGED
@@ -123,7 +123,7 @@ export async function run(options) {
123
123
  resultUrls,
124
124
  timestamp,
125
125
  budget: budgetResult,
126
- name: url,
126
+ name: url.startsWith('http') ? url : path.basename(url),
127
127
  log,
128
128
  getLogger,
129
129
  messageMaker,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "sitespeed.io",
3
- "version": "37.1.0",
3
+ "version": "37.1.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "sitespeed.io",
9
- "version": "37.1.0",
9
+ "version": "37.1.2",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
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": "37.1.0",
8
+ "version": "37.1.2",
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",