browsertime 22.10.1 → 23.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.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,26 @@
1
1
  # Browsertime changelog (we do [semantic versioning](https://semver.org))
2
2
 
3
+ ## 23.0.0 - 2024-09-23
4
+
5
+ ### Breaking
6
+ * Disable camel case configuration that comes automatically with yargs [#2182](https://github.com/sitespeedio/browsertime/pull/2182). This is a breaking change ONLY if you didn't follow our doecumentation/help and used internal YARGS configuration names for our CLI configuration.
7
+
8
+ ### Added
9
+ * Updated Docker container with Chrome 129, Firefox 130. New Chromedriver [#2181](https://github.com/sitespeedio/browsertime/pull/2181).
10
+
11
+ ### Fixed
12
+ * Updated to Selenium 4.25.0 [#2185](https://github.com/sitespeedio/browsertime/pull/2185).
13
+ * Use HAR export 0.0.15 for upcoming changes in Firefox [#2184](https://github.com/sitespeedio/browsertime/pull/2184).
14
+ * Fixes the internal configuration object for android. The old solution created an array with objects instead of just keys on the object.[#2183](https://github.com/sitespeedio/browsertime/pull/2183).
15
+
16
+ ## 22.10.2 - 2024-09-13
17
+ ### Fixed
18
+ * Fix for wait.byIdAndVisible command [#2179](https://github.com/sitespeedio/browsertime/pull/2179).
3
19
 
4
20
  ## 22.10.1 - 2024-09-04
5
21
  ### Fixed
6
22
  * Upgraded Bidi HAR to 0.0.14 that filters out data:text URLs thar is picked up in Firefox 130 [#2177](https://github.com/sitespeedio/browsertime/pull/2177).
23
+ * Call stopSampling on browser stop during android power testing [#2176](https://github.com/sitespeedio/browsertime/pull/2176).
7
24
 
8
25
  ## 22.10.0 - 2024-09-03
9
26
  ### Added
@@ -55,12 +55,15 @@ export class Wait {
55
55
  * @returns {Promise<void>} A promise that resolves when the element is found or the time times out.
56
56
  * @throws {Error} Throws an error if the element is not found within the specified time.
57
57
  */
58
- async byIdAndVisible(id, maxTime) {
58
+ async byIdAndVisible(id, maxTime = 6000) {
59
59
  const driver = this.browser.getDriver();
60
60
  await this.byId(id, maxTime);
61
61
  try {
62
+ driver.findElement;
62
63
  await driver.wait(
63
- webdriver.until.elementIsVisible(webdriver.By.id(id)),
64
+ webdriver.until.elementIsVisible(
65
+ driver.findElement(webdriver.By.id(id))
66
+ ),
64
67
  maxTime
65
68
  );
66
69
  } catch (error) {
@@ -63,11 +63,6 @@ function validateInput(argv) {
63
63
  }
64
64
  }
65
65
 
66
- // hack to keep backward compability to --android
67
- if (argv.android[0] === true) {
68
- set(argv, 'android.enabled', true);
69
- }
70
-
71
66
  if (argv.chrome && argv.chrome.mobileEmulation) {
72
67
  const m = argv.chrome.mobileEmulation;
73
68
  if (!(m.deviceName || (m.height && m.width && m.pixelRatio))) {
@@ -144,9 +139,16 @@ function validateInput(argv) {
144
139
  }
145
140
 
146
141
  export function parseCommandLine() {
147
- let yargsInstance = yargs(hideBin(process.argv));
142
+ let argvFix = process.argv.map(arg =>
143
+ arg === '--android' ? '--android.enabled' : arg
144
+ );
145
+
146
+ let yargsInstance = yargs(hideBin(argvFix));
148
147
  let validated = yargsInstance
149
- .parserConfiguration({ 'deep-merge-config': true })
148
+ .parserConfiguration({
149
+ 'camel-case-expansion': false,
150
+ 'deep-merge-config': true
151
+ })
150
152
  .env('BROWSERTIME')
151
153
  .usage('$0 [options] <url>/<scriptFile>')
152
154
  .require(1, 'One or more url or script files')
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "browsertime",
3
3
  "description": "Get performance metrics from your web page using Browsertime.",
4
- "version": "22.10.1",
4
+ "version": "23.0.0",
5
5
  "bin": "./bin/browsertime.js",
6
6
  "type": "module",
7
7
  "types": "./types/scripting.d.ts",
8
8
  "dependencies": {
9
9
  "@cypress/xvfb": "1.2.4",
10
10
  "@devicefarmer/adbkit": "3.2.6",
11
- "@sitespeed.io/chromedriver": "128.0.6613-86",
11
+ "@sitespeed.io/chromedriver": "129.0.6668-58",
12
12
  "@sitespeed.io/edgedriver": "126.0.2592-102",
13
13
  "@sitespeed.io/geckodriver": "0.35.0",
14
14
  "@sitespeed.io/throttle": "5.0.1",
@@ -19,7 +19,7 @@
19
19
  "dayjs": "1.11.13",
20
20
  "execa": "9.3.1",
21
21
  "fast-stats": "0.0.7",
22
- "ff-test-bidi-har-export": "0.0.14",
22
+ "ff-test-bidi-har-export": "0.0.15",
23
23
  "find-up": "7.0.0",
24
24
  "get-port": "7.1.0",
25
25
  "hasbin": "1.2.3",
@@ -30,7 +30,7 @@
30
30
  "lodash.merge": "4.6.2",
31
31
  "lodash.pick": "4.4.0",
32
32
  "lodash.set": "4.3.2",
33
- "selenium-webdriver": "4.24.0",
33
+ "selenium-webdriver": "4.25.0",
34
34
  "usb-power-profiling": "1.4.0",
35
35
  "yargs": "17.7.2"
36
36
  },
@@ -33,7 +33,7 @@ export class Wait {
33
33
  * @returns {Promise<void>} A promise that resolves when the element is found or the time times out.
34
34
  * @throws {Error} Throws an error if the element is not found within the specified time.
35
35
  */
36
- byIdAndVisible(id: string, maxTime: number): Promise<void>;
36
+ byIdAndVisible(id: string, maxTime?: number): Promise<void>;
37
37
  /**
38
38
  * Waits for an element located by XPath to appear within a maximum time.
39
39
  *
@@ -1 +1 @@
1
- {"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/wait.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH;IACE,kDASC;IARC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,0BAA0C;IAG5C;;;;;;;;OAQG;IACH,SALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAiBzB;IAED;;;;;;;;OAQG;IACH,mBALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAgBzB;IAED;;;;;;;;OAQG;IACH,eALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAmBzB;IAED;;;;;;;;OAQG;IACH,qBALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAuBzB;IAED;;;;;;;OAOG;IACH,WAHW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;;;OAKG;IACH,oBAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;;;;;;OAQG;IACH,0BALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAiBzB;CACF"}
1
+ {"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/wait.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH;IACE,kDASC;IARC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,0BAA0C;IAG5C;;;;;;;;OAQG;IACH,SALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAiBzB;IAED;;;;;;;;OAQG;IACH,mBALW,MAAM,YACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAmBzB;IAED;;;;;;;;OAQG;IACH,eALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAmBzB;IAED;;;;;;;;OAQG;IACH,qBALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAuBzB;IAED;;;;;;;OAOG;IACH,WAHW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;;;OAKG;IACH,oBAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;;;;;;OAQG;IACH,0BALW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAiBzB;CACF"}