sitespeed.io 34.1.0 → 34.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,5 +1,13 @@
1
1
  # CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
2
2
 
3
+ ## 34.1.2 - 2024-06-12
4
+ ### Fixed
5
+ * Using `--preWarmServer` resulted in trying to use an Android phone to prewarm. Fixed in [#4182](https://github.com/sitespeedio/sitespeed.io/pull/4182).
6
+
7
+ ## 34.1.1 - 2024-06-07
8
+ ### Fixed
9
+ * Enabling extra profile run/video run didn't stop the Browsertime engine in the correct place. PR [#4179](https://github.com/sitespeedio/sitespeed.io/pull/4179) fixes that.
10
+
3
11
  ## 34.1.0 - 2024-06-06
4
12
  ### Added
5
13
  * Add `--enableVideoRun`. You can use it together with `--video false --visualMetrics true` to do one extra run where the video is kept. This is useful for tests against replay proxies [#4177](https://github.com/sitespeedio/sitespeed.io/pull/4177).
@@ -24,25 +24,28 @@ async function preWarmServer(urls, options, scriptOrMultiple) {
24
24
  browser: options.browser,
25
25
  iterations: 1,
26
26
  xvfb: options.xvfb,
27
- android: options.android,
28
27
  docker: options.docker,
29
28
  headless: options.headless
30
29
  };
31
- const chromeDevice = get(options, 'chrome.android.deviceSerial');
32
- const firefoxDevice = get(options, 'firefox.android.deviceSerial');
30
+
31
+ if (options.android.enabled) {
32
+ preWarmOptions.android = options.android;
33
+ const chromeDevice = get(options, 'chrome.android.deviceSerial');
34
+ const firefoxDevice = get(options, 'firefox.android.deviceSerial');
35
+ if (options.browser === 'chrome') {
36
+ set(preWarmOptions, 'chrome.android.package', 'com.android.chrome');
37
+ }
38
+ if (chromeDevice) {
39
+ set(preWarmOptions, 'chrome.android.deviceSerial', chromeDevice);
40
+ } else if (firefoxDevice) {
41
+ set(preWarmOptions, 'firefox.android.deviceSerial', firefoxDevice);
42
+ }
43
+ }
44
+
33
45
  const safariIos = get(options, 'safari.ios');
34
46
  const safariDeviceName = get(options, 'safari.deviceName');
35
47
  const safariDeviceUDID = get(options, 'safari.deviceUDID ');
36
48
 
37
- if (options.android && options.browser === 'chrome') {
38
- set(preWarmOptions, 'chrome.android.package', 'com.android.chrome');
39
- }
40
- if (chromeDevice) {
41
- set(preWarmOptions, 'chrome.android.deviceSerial', chromeDevice);
42
- } else if (firefoxDevice) {
43
- set(preWarmOptions, 'firefox.android.deviceSerial', firefoxDevice);
44
- }
45
-
46
49
  if (safariIos) {
47
50
  set(preWarmOptions, 'safari.ios', true);
48
51
  if (safariDeviceName) {
@@ -196,20 +199,13 @@ export async function analyzeUrl(
196
199
 
197
200
  try {
198
201
  await engine.start();
199
- if (scriptOrMultiple) {
200
- const res = await engine.runMultiple(url, scriptsByCategory, asyncScript);
201
- if (btOptions.enableProfileRun || btOptions.enableVideoRun) {
202
- await extraProfileRun(url, btOptions, scriptOrMultiple);
203
- }
204
- return res;
205
- } else {
206
- const res = await engine.run(url, scriptsByCategory, asyncScript);
207
- if (btOptions.enableProfileRun || btOptions.enableVideoRun) {
208
- await extraProfileRun(url, btOptions, scriptOrMultiple);
209
- }
210
- return res;
211
- }
202
+ return await (scriptOrMultiple
203
+ ? engine.runMultiple(url, scriptsByCategory, asyncScript)
204
+ : engine.run(url, scriptsByCategory, asyncScript));
212
205
  } finally {
213
206
  await engine.stop();
207
+ if (btOptions.enableProfileRun || btOptions.enableVideoRun) {
208
+ await extraProfileRun(url, btOptions, scriptOrMultiple);
209
+ }
214
210
  }
215
211
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "sitespeed.io",
3
- "version": "34.1.0",
3
+ "version": "34.1.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "sitespeed.io",
9
- "version": "34.1.0",
9
+ "version": "34.1.2",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-s3": "3.564.0",
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": "34.1.0",
8
+ "version": "34.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",