browsertime 15.1.0 → 15.3.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 +15 -0
- package/lib/chrome/webdriver/chromium.js +23 -1
- package/lib/support/cli.js +6 -0
- package/lib/support/getViewPort.js +6 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 15.3.0 - 2022-03-07
|
|
4
|
+
### Added
|
|
5
|
+
* Chrome: If you set --user-data-dir you can clean the directory between each iteration using `--chrome.cleanUserDataDir` [#1739](https://github.com/sitespeedio/browsertime/pull/1739)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## 15.2.0 - 2022-03-04
|
|
9
|
+
### Added
|
|
10
|
+
* Updated to Chromedriver and Edgedriver 99.
|
|
11
|
+
* Updated Docker container to use Chrome and Edge 99 [#1738](https://github.com/sitespeedio/browsertime/pull/1738).
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
* Added more view ports for emulated mobile in Chrome [#1736](https://github.com/sitespeedio/browsertime/pull/1736).
|
|
15
|
+
## 15.1.1 - 2022-02-24
|
|
16
|
+
### Fixed
|
|
17
|
+
* Updated Chromedriver dependency that fixes installation on M1 and [some send keys issues](https://chromedriver.storage.googleapis.com/98.0.4758.102/notes.txt).
|
|
3
18
|
## 15.1.0 - 2022-02-24
|
|
4
19
|
### Added
|
|
5
20
|
* Collect timings from main document. The result includes a field named mainDocumentTimings and contains blocked, dns, connect, send, wait, receive, ssl as long as you get a HAR file from the browser [#1735](https://github.com/sitespeedio/browsertime/pull/1735).
|
|
@@ -9,12 +9,14 @@ const path = require('path');
|
|
|
9
9
|
const parseCpuTrace = require('../parseCpuTrace');
|
|
10
10
|
const har = require('../har');
|
|
11
11
|
const harBuilder = require('../../support/har');
|
|
12
|
+
const util = require('../../support/util');
|
|
12
13
|
const webdriver = require('selenium-webdriver');
|
|
13
14
|
const traceCategoriesParser = require('../traceCategoriesParser');
|
|
14
15
|
const pathToFolder = require('../../support/pathToFolder');
|
|
15
16
|
const ChromeDevtoolsProtocol = require('../chromeDevtoolsProtocol');
|
|
16
17
|
const { Android } = require('../../android');
|
|
17
18
|
const unlink = promisify(fs.unlink);
|
|
19
|
+
const rm = promisify(fs.rm);
|
|
18
20
|
|
|
19
21
|
class Chromium {
|
|
20
22
|
constructor(storageManager, options) {
|
|
@@ -408,7 +410,27 @@ class Chromium {
|
|
|
408
410
|
/**
|
|
409
411
|
* Before the browser is stopped/closed.
|
|
410
412
|
*/
|
|
411
|
-
async afterBrowserStopped() {
|
|
413
|
+
async afterBrowserStopped() {
|
|
414
|
+
// If we supply a user data dir on desktop, we want to clean up before each start
|
|
415
|
+
if (
|
|
416
|
+
this.chrome.args &&
|
|
417
|
+
this.chrome.cleanUserDataDir &&
|
|
418
|
+
!this.chrome.android
|
|
419
|
+
) {
|
|
420
|
+
const args = util.toArray(this.chrome.args);
|
|
421
|
+
for (let arg of args) {
|
|
422
|
+
if (arg.includes('user-data-dir')) {
|
|
423
|
+
const userDataDir = arg.split('=')[1];
|
|
424
|
+
try {
|
|
425
|
+
await rm(userDataDir, { recursive: true });
|
|
426
|
+
log.info(`Deleted user data dir: ${userDataDir}`);
|
|
427
|
+
} catch (e) {
|
|
428
|
+
log.error(`Could not delete user data dir: ${userDataDir}`, e);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
412
434
|
|
|
413
435
|
async getHARs() {
|
|
414
436
|
if (!this.skipHar) {
|
package/lib/support/cli.js
CHANGED
|
@@ -287,6 +287,12 @@ module.exports.parseCommandLine = function parseCommandLine() {
|
|
|
287
287
|
'Prevent Browsertime from setting its default options for Chrome',
|
|
288
288
|
group: 'chrome'
|
|
289
289
|
})
|
|
290
|
+
.option('chrome.cleanUserDataDir', {
|
|
291
|
+
type: 'boolean',
|
|
292
|
+
describe:
|
|
293
|
+
'If you use --user-data-dir as an argument to Chrome and want to clean that directory between each iteration you should use --chrome.cleanUserDataDir true.',
|
|
294
|
+
group: 'chrome'
|
|
295
|
+
})
|
|
290
296
|
.option('cpu', {
|
|
291
297
|
type: 'boolean',
|
|
292
298
|
describe:
|
|
@@ -22,7 +22,12 @@ const sizeMap = {
|
|
|
22
22
|
'Pixel 2': '412x732',
|
|
23
23
|
'Pixel 2 XL': '412x824',
|
|
24
24
|
iPad: '768x1024',
|
|
25
|
-
'iPad Pro': '1024x1366'
|
|
25
|
+
'iPad Pro': '1024x1366',
|
|
26
|
+
'iPhone XR': '414x896',
|
|
27
|
+
'iPhone SE': '377x668',
|
|
28
|
+
'iPhone 12 Pro': '390x844',
|
|
29
|
+
'Pixel 5': '394x852',
|
|
30
|
+
'Samsung Galaxy S8+': '412x846'
|
|
26
31
|
};
|
|
27
32
|
|
|
28
33
|
module.exports = function (options) {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Browsertime",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.0",
|
|
4
4
|
"bin": "./bin/browsertime.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@cypress/xvfb": "1.2.4",
|
|
7
7
|
"@devicefarmer/adbkit": "2.11.3",
|
|
8
|
-
"@sitespeed.io/chromedriver": "
|
|
9
|
-
"@sitespeed.io/edgedriver": "
|
|
8
|
+
"@sitespeed.io/chromedriver": "99.0.4844-51",
|
|
9
|
+
"@sitespeed.io/edgedriver": "99.0.1150-25",
|
|
10
10
|
"@sitespeed.io/geckodriver": "0.30.0",
|
|
11
11
|
"@sitespeed.io/throttle": "3.0.0",
|
|
12
12
|
"@sitespeed.io/tracium": "0.3.3",
|