browsertime 17.0.0-beta.4 → 17.0.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +22 -13
  2. package/bin/browsertime.js +4 -4
  3. package/bin/browsertimeWebPageReplay.js +2 -2
  4. package/index.js +2 -2
  5. package/lib/android/gnirehtet.js +1 -2
  6. package/lib/android/root.js +57 -16
  7. package/lib/chrome/chromeDevtoolsProtocol.js +2 -3
  8. package/lib/chrome/har.js +1 -1
  9. package/lib/chrome/longTaskMetrics.js +1 -1
  10. package/lib/chrome/parseCpuTrace.js +2 -2
  11. package/lib/chrome/settings/chromeAndroidOptions.js +1 -1
  12. package/lib/chrome/settings/chromeDesktopOptions.js +1 -1
  13. package/lib/chrome/settings/traceCategories.js +1 -1
  14. package/lib/chrome/traceCategoriesParser.js +3 -3
  15. package/lib/chrome/webdriver/builder.js +1 -1
  16. package/lib/chrome/webdriver/chromium.js +13 -17
  17. package/lib/chrome/webdriver/setupChromiumOptions.js +18 -13
  18. package/lib/connectivity/humble.js +10 -12
  19. package/lib/connectivity/index.js +1 -1
  20. package/lib/core/engine/collector.js +2 -4
  21. package/lib/core/engine/command/addText.js +1 -2
  22. package/lib/core/engine/command/android.js +1 -1
  23. package/lib/core/engine/command/cache.js +1 -2
  24. package/lib/core/engine/command/chromeDevToolsProtocol.js +1 -2
  25. package/lib/core/engine/command/click.js +1 -2
  26. package/lib/core/engine/command/debug.js +1 -3
  27. package/lib/core/engine/command/javaScript.js +1 -2
  28. package/lib/core/engine/command/measure.js +13 -15
  29. package/lib/core/engine/command/meta.js +1 -1
  30. package/lib/core/engine/command/navigation.js +1 -1
  31. package/lib/core/engine/command/screenshot.js +1 -1
  32. package/lib/core/engine/command/scroll.js +1 -1
  33. package/lib/core/engine/command/select.js +1 -1
  34. package/lib/core/engine/command/set.js +1 -1
  35. package/lib/core/engine/command/stopWatch.js +1 -1
  36. package/lib/core/engine/command/switch.js +44 -1
  37. package/lib/core/engine/command/util/lcpHighlightScript.js +1 -1
  38. package/lib/core/engine/command/util/lsHighlightScript.js +1 -1
  39. package/lib/core/engine/command/wait.js +1 -1
  40. package/lib/core/engine/index.js +12 -12
  41. package/lib/core/engine/iteration.js +27 -27
  42. package/lib/core/engine/run.js +1 -1
  43. package/lib/core/pageCompleteChecks/defaultPageCompleteCheck.js +1 -1
  44. package/lib/core/pageCompleteChecks/pageCompleteCheckByInactivity.js +1 -1
  45. package/lib/core/pageCompleteChecks/spaInactivity.js +1 -1
  46. package/lib/core/seleniumRunner.js +9 -11
  47. package/lib/edge/webdriver/builder.js +1 -1
  48. package/lib/extensionserver/index.js +2 -4
  49. package/lib/extensionserver/setup.js +1 -1
  50. package/lib/firefox/geckoProfiler.js +46 -16
  51. package/lib/firefox/getHAR.js +1 -1
  52. package/lib/firefox/memoryReport.js +1 -1
  53. package/lib/firefox/settings/disableSafeBrowsingPreferences.js +1 -1
  54. package/lib/firefox/settings/disableTrackingProtectionPreferences.js +1 -1
  55. package/lib/firefox/settings/firefoxPreferences.js +1 -1
  56. package/lib/firefox/webdriver/builder.js +9 -9
  57. package/lib/firefox/webdriver/firefox.js +24 -6
  58. package/lib/safari/webdriver/safari.js +1 -1
  59. package/lib/screenshot/defaults.js +1 -1
  60. package/lib/screenshot/index.js +3 -5
  61. package/lib/support/cli.js +5 -5
  62. package/lib/support/dns.js +1 -1
  63. package/lib/support/engineUtils.js +5 -13
  64. package/lib/support/getViewPort.js +1 -1
  65. package/lib/support/har/index.js +6 -8
  66. package/lib/support/images/index.js +1 -1
  67. package/lib/support/logging.js +1 -1
  68. package/lib/support/pathToFolder.js +4 -4
  69. package/lib/support/preURL.js +1 -1
  70. package/lib/support/processes.js +1 -1
  71. package/lib/support/setResourceTimingBufferSize.js +1 -1
  72. package/lib/support/stop.js +1 -1
  73. package/lib/support/storageManager.js +1 -3
  74. package/lib/support/tcpdump.js +2 -2
  75. package/lib/support/xvfb.js +2 -4
  76. package/lib/video/postprocessing/finetune/addTextToVideo.js +3 -3
  77. package/lib/video/postprocessing/finetune/convertFps.js +1 -1
  78. package/lib/video/postprocessing/finetune/getFont.js +1 -1
  79. package/lib/video/postprocessing/finetune/getTimingMetrics.js +2 -2
  80. package/lib/video/postprocessing/finetune/index.js +4 -4
  81. package/lib/video/postprocessing/finetune/removeOrange.js +1 -1
  82. package/lib/video/postprocessing/visualmetrics/extraMetrics.js +1 -1
  83. package/lib/video/postprocessing/visualmetrics/getVideoMetrics.js +2 -2
  84. package/lib/video/screenRecording/android/recorder.js +1 -1
  85. package/lib/video/screenRecording/desktop/convert.js +1 -1
  86. package/lib/video/screenRecording/desktop/desktopRecorder.js +3 -3
  87. package/lib/video/screenRecording/desktop/ffmpegRecorder.js +6 -6
  88. package/lib/video/screenRecording/desktop/osx/getSPDisplaysDataType.js +1 -1
  89. package/lib/video/screenRecording/desktop/osx/getScreen.js +1 -1
  90. package/lib/video/screenRecording/firefox/firefoxWindowRecorder.js +1 -1
  91. package/lib/video/screenRecording/ios/convertToMp4.js +1 -1
  92. package/lib/video/screenRecording/ios/iosRecorder.js +2 -2
  93. package/lib/video/screenRecording/iosSimulator/convertToMp4.js +1 -1
  94. package/lib/video/screenRecording/iosSimulator/recorder.js +2 -2
  95. package/lib/video/screenRecording/recorder.js +6 -6
  96. package/lib/video/screenRecording/setOrangeBackground.js +1 -1
  97. package/lib/video/video.js +9 -11
  98. package/package.json +17 -17
@@ -4,7 +4,7 @@ import { resolve, join } from 'node:path';
4
4
  import { execaCommand as command } from 'execa';
5
5
  import { promisify } from 'node:util';
6
6
  import { unlink as _unlink } from 'node:fs';
7
- import convert from './convertToMp4.js';
7
+ import { convert } from './convertToMp4.js';
8
8
  import intel from 'intel';
9
9
  const log = intel.getLogger('browsertime.video');
10
10
  const unlink = promisify(_unlink);
@@ -13,7 +13,7 @@ const moduleRootPath = resolve(__dirname, '..', '..', '..', '..');
13
13
  const QVH = resolve(moduleRootPath, 'vendor', 'mac', 'x86', 'qvh');
14
14
  const delay = ms => new Promise(res => setTimeout(res, ms));
15
15
 
16
- export default class IOSRecorder {
16
+ export class IOSRecorder {
17
17
  constructor(options, baseDir) {
18
18
  this.options = options;
19
19
  this.uuid = options.safari.deviceUDID;
@@ -2,7 +2,7 @@ import { execa } from 'execa';
2
2
  import intel from 'intel';
3
3
  const log = intel.getLogger('browsertime.video');
4
4
 
5
- export default async function convert(source, destination) {
5
+ export async function convert(source, destination) {
6
6
  const scriptArguments = [
7
7
  // '-framerate',
8
8
  // 60,
@@ -3,12 +3,12 @@ import util from 'node:util';
3
3
  import fs from 'node:fs';
4
4
  import { execa } from 'execa';
5
5
  import intel from 'intel';
6
- import { default as convert } from './convertToMp4.js';
6
+ import { convert } from './convertToMp4.js';
7
7
  const unlink = util.promisify(fs.unlink);
8
8
  const delay = ms => new Promise(res => setTimeout(res, ms));
9
9
  const log = intel.getLogger('browsertime.video');
10
10
 
11
- export default class IOSSimulatorRecorder {
11
+ export class IOSSimulatorRecorder {
12
12
  constructor(options, baseDir) {
13
13
  this.options = options;
14
14
  this.tmpVideo = path.join(baseDir, 'tmp.mov');
@@ -1,11 +1,11 @@
1
1
  import { isAndroidConfigured } from '../../android/index.js';
2
- import AndroidRecorder from './android/recorder.js';
3
- import DesktopRecorder from './desktop/desktopRecorder.js';
4
- import FirefoxWindowRecorder from './firefox/firefoxWindowRecorder.js';
5
- import IOSSimulatorRecorder from './iosSimulator/recorder.js';
6
- import IOSRecorder from './ios/iosRecorder.js';
2
+ import { AndroidRecorder } from './android/recorder.js';
3
+ import { DesktopRecorder } from './desktop/desktopRecorder.js';
4
+ import { FirefoxWindowRecorder } from './firefox/firefoxWindowRecorder.js';
5
+ import { IOSSimulatorRecorder } from './iosSimulator/recorder.js';
6
+ import { IOSRecorder } from './ios/iosRecorder.js';
7
7
 
8
- export default function getRecorder(options, browser, baseDir) {
8
+ export function getRecorder(options, browser, baseDir) {
9
9
  if (
10
10
  options.browser === 'firefox' &&
11
11
  options.firefox &&
@@ -1,7 +1,7 @@
1
1
  import intel from 'intel';
2
2
  import { until, By } from 'selenium-webdriver';
3
3
  const log = intel.getLogger('browsertime.video');
4
- export default async function (driver) {
4
+ export async function setOrangeBackground(driver) {
5
5
  log.debug('Add orange color');
6
6
  // We tried other ways for Android (access an orange page)
7
7
  // That works fine ... but break scripts
@@ -1,16 +1,16 @@
1
1
  import { join } from 'node:path';
2
2
  import get from 'lodash.get';
3
- import getRecorder from './screenRecording/recorder.js';
4
- import getVideoMetrics from './postprocessing/visualmetrics/getVideoMetrics.js';
5
- import finetuneVideo from './postprocessing/finetune/index.js';
3
+ import { getRecorder } from './screenRecording/recorder.js';
4
+ import { getVideoMetrics } from './postprocessing/visualmetrics/getVideoMetrics.js';
5
+ import { finetuneVideo } from './postprocessing/finetune/index.js';
6
6
  import { rename, removeFile, removeDirAndFiles } from '../support/fileUtil.js';
7
- import pathToFolders from '../support/pathToFolder.js';
7
+ import { pathToFolder } from '../support/pathToFolder.js';
8
8
 
9
9
  /**
10
10
  * Create a new Video that handles everything with the video
11
11
  * @class
12
12
  */
13
- class Video {
13
+ export class Video {
14
14
  constructor(storageManager, options, browser) {
15
15
  this.options = options;
16
16
  this.storageManager = storageManager;
@@ -24,15 +24,15 @@ class Video {
24
24
  this.index = index;
25
25
 
26
26
  this.videoDir = await storageManager.createSubDataDir(
27
- join(pathToFolders(url, this.options), 'video')
27
+ join(pathToFolder(url, this.options), 'video')
28
28
  );
29
29
 
30
30
  await storageManager.createSubDataDir(
31
- join(pathToFolders(url, this.options), 'video', 'images', '' + index)
31
+ join(pathToFolder(url, this.options), 'video', 'images', '' + index)
32
32
  );
33
33
 
34
34
  this.filmstripDir = await storageManager.createSubDataDir(
35
- join(pathToFolders(url, this.options), 'filmstrip', '' + index)
35
+ join(pathToFolder(url, this.options), 'filmstrip', '' + index)
36
36
  );
37
37
  }
38
38
 
@@ -60,7 +60,7 @@ class Video {
60
60
  this.isRecording = false;
61
61
  this.videoPath = join(
62
62
  this.storageManager.directory,
63
- pathToFolders(url, this.options),
63
+ pathToFolder(url, this.options),
64
64
  'video',
65
65
  this.index + '.mp4'
66
66
  );
@@ -120,5 +120,3 @@ class Video {
120
120
  return this.recorder.timeToFirstFrame;
121
121
  }
122
122
  }
123
-
124
- export default Video;
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "description": "Browsertime",
3
- "version": "17.0.0-beta.4",
3
+ "version": "17.0.0",
4
4
  "bin": "./bin/browsertime.js",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "@cypress/xvfb": "1.2.4",
8
8
  "@devicefarmer/adbkit": "2.11.3",
9
- "@sitespeed.io/chromedriver": "106.0.5249-61",
10
- "@sitespeed.io/edgedriver": "106.0.1370-34",
11
- "@sitespeed.io/geckodriver": "0.31.0-c",
9
+ "@sitespeed.io/chromedriver": "110.0.5481-77",
10
+ "@sitespeed.io/edgedriver": "109.0.1518-70",
11
+ "@sitespeed.io/geckodriver": "0.32.0",
12
12
  "@sitespeed.io/throttle": "5.0.0",
13
13
  "@sitespeed.io/tracium": "0.3.3",
14
14
  "btoa": "1.2.1",
15
15
  "chrome-har": "0.13.0",
16
- "chrome-remote-interface": "0.31.3",
17
- "dayjs": "1.11.6",
16
+ "chrome-remote-interface": "0.32.0",
17
+ "dayjs": "1.11.7",
18
18
  "execa": "6.1.0",
19
19
  "fast-stats": "0.0.6",
20
20
  "find-up": "6.3.0",
@@ -27,21 +27,21 @@
27
27
  "lodash.merge": "4.6.2",
28
28
  "lodash.pick": "4.4.0",
29
29
  "lodash.set": "4.3.2",
30
- "selenium-webdriver": "4.5.0",
31
- "yargs": "17.6.0"
30
+ "selenium-webdriver": "4.8.0",
31
+ "yargs": "17.6.2"
32
32
  },
33
33
  "optionalDependencies": {
34
- "jimp": "0.16.2"
34
+ "jimp": "0.22.1"
35
35
  },
36
36
  "devDependencies": {
37
- "ava": "5.0.1",
38
- "eslint": "8.26.0",
39
- "eslint-config-prettier": "8.5.0",
37
+ "ava": "5.1.0",
38
+ "eslint": "8.31.0",
39
+ "eslint-config-prettier": "8.6.0",
40
40
  "eslint-plugin-prettier": "4.2.1",
41
- "eslint-plugin-unicorn": "44.0.2",
42
- "prettier": "2.7.1",
43
- "serve-handler": "6.1.3",
44
- "serve": "14.0.1"
41
+ "eslint-plugin-unicorn": "45.0.2",
42
+ "prettier": "2.8.2",
43
+ "serve-handler": "6.1.5",
44
+ "serve": "14.1.2"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=14.19.1"
@@ -93,7 +93,7 @@
93
93
  "!test/data"
94
94
  ],
95
95
  "concurrency": 1,
96
- "failFast": false,
96
+ "failFast": true,
97
97
  "require": [
98
98
  "./test/util/setup.js"
99
99
  ],