sitespeed.io 20.3.1 → 20.4.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.
@@ -19,6 +19,8 @@ jobs:
19
19
  run: docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b chrome
20
20
  - name: Run test on default container for Firefox
21
21
  run: docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b firefox
22
+ - name: Run test on default container for Edge
23
+ run: docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b edge
22
24
  - name: Run test on slim container
23
25
  run: docker run --rm sitespeedio/sitespeed.io:slim https://www.sitespeed.io -n 1
24
26
  - name: Test WebPageReplay in the default container
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
2
2
 
3
+
4
+ ## 20.4.0 - 2021-10-29
5
+
6
+ ### Added
7
+ * Updated to [Browsertime 14.8.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md) with Edgeriver 95.
8
+ * Updated to Edge 95 in the Docker container.
9
+ * Update to use NodeJS 16 in the Docker container [#3495](https://github.com/sitespeedio/sitespeed.io/pull/3495).
10
+ * On Mac OS: Use `--open` or `-o` to open the result in your default browser. Thank you [Johanna Lindh](https://github.com/zhouhana) for the idea! PR [#3493](https://github.com/sitespeedio/sitespeed.io/pull/3493).
11
+ * The +1 container now had Lighthouse 8.6.0.
12
+
13
+ ### Fixed
14
+ * Removed npm from the Docker container when everything has been installed to fix npm security issues + decrease the size of the container.
3
15
  ## 20.3.1 - 2021-10-21
4
16
  ### Fixed
5
17
  * Fix to handle integer value Android device serial, thank you [Saurav Kumar](https://github.com/svkrclg) for PR [#3490](https://github.com/sitespeedio/sitespeed.io/pull/3490).
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM sitespeedio/webbrowsers:chrome-95.0-firefox-93.0-edge-93.0-dev
1
+ FROM sitespeedio/webbrowsers:chrome-95.0-firefox-93.0-edge-95.0-dev-2
2
2
 
3
3
  ENV SITESPEED_IO_BROWSERTIME__XVFB true
4
4
  ENV SITESPEED_IO_BROWSERTIME__DOCKER true
@@ -25,7 +25,7 @@ RUN mkdir -p /usr/src/app
25
25
  WORKDIR /usr/src/app
26
26
 
27
27
  COPY package.* /usr/src/app/
28
- RUN npm install --production
28
+ RUN npm install --production && npm cache clean --force && npm uninstall npm -g
29
29
  COPY . /usr/src/app
30
30
 
31
31
  COPY docker/scripts/start.sh /start.sh
@@ -35,6 +35,7 @@ RUN mkdir -m 0750 /root/.android
35
35
  ADD docker/adb/insecure_shared_adbkey /root/.android/adbkey
36
36
  ADD docker/adb/insecure_shared_adbkey.pub /root/.android/adbkey.pub
37
37
 
38
+
38
39
  # Allow all users to run commands needed by sitespeedio/throttle via sudo
39
40
  # See https://github.com/sitespeedio/throttle/blob/main/lib/tc.js
40
41
  RUN echo 'ALL ALL=NOPASSWD: /usr/sbin/tc, /usr/sbin/route, /usr/sbin/ip' > /etc/sudoers.d/tc
package/Dockerfile-slim CHANGED
@@ -30,7 +30,7 @@ RUN buildDeps='wget bzip2' && apt-get update && apt -y install $buildDeps && \
30
30
  RUN mkdir -p /usr/src/app
31
31
  WORKDIR /usr/src/app
32
32
  COPY . /usr/src/app
33
- RUN CHROMEDRIVER_SKIP_DOWNLOAD=true EGDEDRIVER_SKIP_DOWNLOAD=true npm install --production
33
+ RUN CHROMEDRIVER_SKIP_DOWNLOAD=true EGDEDRIVER_SKIP_DOWNLOAD=true npm install --production && npm cache clean --force && npm uninstall npm -g
34
34
  WORKDIR /usr/src/app
35
35
  COPY docker/scripts/start-slim.sh /start.sh
36
36
 
package/bin/sitespeed.js CHANGED
@@ -7,6 +7,8 @@
7
7
  const fs = require('fs');
8
8
  const cli = require('../lib/cli/cli');
9
9
  const sitespeed = require('../lib/sitespeed');
10
+ const { execSync } = require('child_process');
11
+ const os = require('os');
10
12
 
11
13
  async function run(options) {
12
14
  process.exitCode = 1;
@@ -20,6 +22,10 @@ async function run(options) {
20
22
  fs.writeFileSync('result.json', JSON.stringify(result));
21
23
  }
22
24
 
25
+ if ((options.open || options.o) && os.platform() === 'darwin') {
26
+ execSync('open ' + result.localPath + '/index.html');
27
+ }
28
+
23
29
  if (
24
30
  parsed.options.budget &&
25
31
  Object.keys(result.budgetResult.failing).length > 0
package/lib/cli/cli.js CHANGED
@@ -1455,6 +1455,10 @@ module.exports.parseCommandLine = function parseCommandLine() {
1455
1455
  .option('name', {
1456
1456
  describe: 'Give your test a name.'
1457
1457
  })
1458
+ .option('open', {
1459
+ alias: 'o',
1460
+ describe: 'Open your test result in your default browser (Mac OS only).'
1461
+ })
1458
1462
  .option('slug', {
1459
1463
  describe:
1460
1464
  'Give your test a slug. The slug is used when you send the metrics to your data storage to identify the test and the folder of the tests. The max length of the slug is 200 characters and it can only contain a-z A-Z 0-9 and -_ characters.'
package/lib/sitespeed.js CHANGED
@@ -156,12 +156,14 @@ module.exports = {
156
156
  if (options.summary && options.summary.out) {
157
157
  console.log(options.summary.out); // eslint-disable-line no-console
158
158
  }
159
+
159
160
  return {
160
161
  errors,
161
162
  budgetResult,
162
163
  resultUrl: resultUrls.hasBaseUrl()
163
164
  ? resultUrls.reportSummaryUrl() + '/index.html'
164
- : ''
165
+ : '',
166
+ localPath: storageManager.getBaseDir()
165
167
  };
166
168
  } catch (err) {
167
169
  log.error(err);