browsertime 24.0.0 → 24.1.0
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 +12 -0
- package/lib/core/engine/index.js +40 -1
- package/lib/support/images/index.js +13 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 24.1.0 - 2025-01-27
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
* Include Chrome/Firefox configuration in the browser section of the result JSON [#2259](https://github.com/sitespeedio/browsertime/pull/2259)
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
* Upgraded to use Webdriver 4.28.1 [#2258](https://github.com/sitespeedio/browsertime/pull/2258).
|
|
10
|
+
|
|
11
|
+
## 24.0.1 - 2025-01-21
|
|
12
|
+
### Fixed
|
|
13
|
+
* If Jimp is missing when storing an image, log and write the file as PNG [#2257](https://github.com/sitespeedio/browsertime/pull/2257).
|
|
14
|
+
|
|
3
15
|
## 24.0.0 - 2025-01-20
|
|
4
16
|
|
|
5
17
|
The 24.0.0 release remove a lot of dependencies. Since we implemented Browsertime the first time, there are many things that are easy to do in modern NodeJS. Those things have now been implemented in Browsertime.
|
package/lib/core/engine/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
addConnectivity,
|
|
11
11
|
removeConnectivity
|
|
12
12
|
} from '../../connectivity/index.js';
|
|
13
|
-
import { logResultLogLine, getProperty } from '../../support/util.js';
|
|
13
|
+
import { logResultLogLine, getProperty, toArray } from '../../support/util.js';
|
|
14
14
|
import {
|
|
15
15
|
getFullyLoaded,
|
|
16
16
|
getMainDocumentTimings,
|
|
@@ -30,6 +30,8 @@ import {
|
|
|
30
30
|
loadPageCompleteScript
|
|
31
31
|
} from '../../support/engineUtils.js';
|
|
32
32
|
import { getAvailablePort } from '../../support/getPort.js';
|
|
33
|
+
import { traceCategories as defaultChromeTraceCategories } from '../../chrome/settings/traceCategories.js';
|
|
34
|
+
|
|
33
35
|
const log = getLogger('browsertime');
|
|
34
36
|
const defaults = {
|
|
35
37
|
scripts: [],
|
|
@@ -369,6 +371,43 @@ export class Engine {
|
|
|
369
371
|
for (let result of totalResult) {
|
|
370
372
|
result.info.browser.name = extras.har.log.browser.name;
|
|
371
373
|
result.info.browser.version = extras.har.log.browser.version;
|
|
374
|
+
if (options.browser === 'firefox' && options.firefox) {
|
|
375
|
+
result.info.browser.args = options.firefox.args;
|
|
376
|
+
if (options.firefox.geckoProfiler === true) {
|
|
377
|
+
result.info.browser.geckProfilerFeatures =
|
|
378
|
+
options.firefox.geckoProfilerParams.features;
|
|
379
|
+
}
|
|
380
|
+
result.info.browser.preference = options.firefox.preference;
|
|
381
|
+
} else if (options.browser === 'chrome') {
|
|
382
|
+
if (options.chrome) {
|
|
383
|
+
result.info.browser.args = options.chrome.args;
|
|
384
|
+
}
|
|
385
|
+
if (
|
|
386
|
+
options.chrome &&
|
|
387
|
+
(options.cpu || options.chrome.timeline || options.chrome.trace)
|
|
388
|
+
) {
|
|
389
|
+
// get correct trace categories
|
|
390
|
+
let chromeTraceCategories = options.chrome.traceCategories
|
|
391
|
+
? options.chrome.traceCategories.split(',')
|
|
392
|
+
: [...defaultChromeTraceCategories];
|
|
393
|
+
|
|
394
|
+
if (options.chrome.enableTraceScreenshots) {
|
|
395
|
+
chromeTraceCategories.push(
|
|
396
|
+
'disabled-by-default-devtools.screenshot'
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (options.chrome && options.chrome.traceCategory) {
|
|
401
|
+
const extraCategories = toArray(options.chrome.traceCategory);
|
|
402
|
+
Array.prototype.push.apply(
|
|
403
|
+
chromeTraceCategories,
|
|
404
|
+
extraCategories
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
result.info.browser.traceCategories = chromeTraceCategories;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
372
411
|
}
|
|
373
412
|
} else if (options.browser === 'safari') {
|
|
374
413
|
for (let result of totalResult) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { pathToFolder } from '../pathToFolder.js';
|
|
3
3
|
import { loadCustomJimp } from '../../screenshot/loadCustomJimp.js';
|
|
4
|
+
import { getLogger } from '@sitespeed.io/log';
|
|
5
|
+
const log = getLogger('browsertime');
|
|
6
|
+
|
|
4
7
|
export async function savePngWithoutResize(
|
|
5
8
|
name,
|
|
6
9
|
data,
|
|
@@ -38,6 +41,11 @@ export async function savePng(
|
|
|
38
41
|
buffer,
|
|
39
42
|
path.join(pathToFolder(url, options), dir)
|
|
40
43
|
);
|
|
44
|
+
} else {
|
|
45
|
+
log.info(
|
|
46
|
+
'Missing Jimp dependency so you can only save images as png at viewport size'
|
|
47
|
+
);
|
|
48
|
+
return savePngWithoutResize(name, data, url, storageManager, dir, options);
|
|
41
49
|
}
|
|
42
50
|
}
|
|
43
51
|
export async function saveJpg(
|
|
@@ -63,5 +71,10 @@ export async function saveJpg(
|
|
|
63
71
|
buffer,
|
|
64
72
|
path.join(pathToFolder(url, options), dir)
|
|
65
73
|
);
|
|
74
|
+
} else {
|
|
75
|
+
log.info(
|
|
76
|
+
'Missing Jimp dependency so you can only save images as png at viewport size'
|
|
77
|
+
);
|
|
78
|
+
return savePngWithoutResize(name, data, url, storageManager, dir, options);
|
|
66
79
|
}
|
|
67
80
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browsertime",
|
|
3
3
|
"description": "Get performance metrics from your web page using Browsertime.",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.1.0",
|
|
5
5
|
"bin": "./bin/browsertime.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./types/scripting.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"fast-stats": "0.0.7",
|
|
20
20
|
"ff-test-bidi-har-export": "0.0.17",
|
|
21
21
|
"lodash.merge": "4.6.2",
|
|
22
|
-
"selenium-webdriver": "4.
|
|
22
|
+
"selenium-webdriver": "4.28.1",
|
|
23
23
|
"yargs": "17.7.2"
|
|
24
24
|
},
|
|
25
25
|
"optionalDependencies": {
|