sitespeed.io 24.0.0 → 24.1.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.
@@ -9,7 +9,7 @@ jobs:
9
9
  steps:
10
10
  -
11
11
  name: Checkout
12
- uses: actions/checkout@v2
12
+ uses: actions/checkout@v3
13
13
  -
14
14
  name: Set up QEMU
15
15
  uses: docker/setup-qemu-action@v1
@@ -10,9 +10,9 @@ jobs:
10
10
  build:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Use Node.js
15
- uses: actions/setup-node@v1
15
+ uses: actions/setup-node@v3
16
16
  with:
17
17
  node-version: '16.x'
18
18
  - name: Install sitespeed.io
@@ -10,7 +10,7 @@ jobs:
10
10
  runs-on: ubuntu-18.04
11
11
  steps:
12
12
  - name: Checkout code
13
- uses: actions/checkout@v2
13
+ uses: actions/checkout@v3
14
14
 
15
15
  - name: Build an image from Dockerfile
16
16
  run: |
@@ -10,7 +10,7 @@ jobs:
10
10
  build:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Build Docker containers
15
15
  run: |
16
16
  docker buildx install
@@ -10,9 +10,9 @@ jobs:
10
10
  build:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Use Node.js
15
- uses: actions/setup-node@v1
15
+ uses: actions/setup-node@v3
16
16
  with:
17
17
  node-version: '16.x'
18
18
  - name: Install sitespeed.io
@@ -10,9 +10,9 @@ jobs:
10
10
  build:
11
11
  runs-on: macos-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Use Node.js
15
- uses: actions/setup-node@v1
15
+ uses: actions/setup-node@v3
16
16
  with:
17
17
  node-version: '16.x'
18
18
  - name: Install dependencies
@@ -9,7 +9,7 @@ jobs:
9
9
  name: running sitespeed.io
10
10
  steps:
11
11
  - name: code checkout
12
- uses: actions/checkout@v2
12
+ uses: actions/checkout@v3
13
13
  # Here we build our own container to make sure we test against our latest code
14
14
  # but YOU can just used the latest version by specifying
15
15
  # sitespeedio/sitespeed.io:VERSION
@@ -13,9 +13,9 @@ jobs:
13
13
  matrix:
14
14
  node-version: [14.x, 16.x]
15
15
  steps:
16
- - uses: actions/checkout@v2
16
+ - uses: actions/checkout@v3
17
17
  - name: Use Node.js ${{ matrix.node-version }}
18
- uses: actions/setup-node@v1
18
+ uses: actions/setup-node@v3
19
19
  with:
20
20
  node-version: ${{ matrix.node-version }}
21
21
  - name: Install dependencies and Chrome
@@ -10,9 +10,9 @@ jobs:
10
10
  build:
11
11
  runs-on: windows-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Use Node.js
15
- uses: actions/setup-node@v1
15
+ uses: actions/setup-node@v3
16
16
  with:
17
17
  node-version: '16.x'
18
18
  - name: Install sitespeed.io
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
2
2
 
3
+ ## 24.1.0 - 2022-04-22
4
+ ### Added
5
+ * Update Grafana auth settings to allow api token or basic auth, thank you [Vladimir Stepanov](https://github.com/vs-odessa) for PR [#3627](https://github.com/sitespeedio/sitespeed.io/pull/3627).
6
+ * Add TTFB to the metrics page [#3630](https://github.com/sitespeedio/sitespeed.io/pull/3630).
7
+ * Use latest Coach core with updated PageXray and Third party web [#3629](https://github.com/sitespeedio/sitespeed.io/pull/3629).
8
+ * Make it possible to disable annotations for Graphite. Set `--graphite.sendAnnotation false` to disable sending annotations [#3625](https://github.com/sitespeedio/sitespeed.io/pull/3625).
9
+ * Show which run that is used in the metrics tab [#3631](https://github.com/sitespeedio/sitespeed.io/pull/3631).
10
+ * Updated to [Browsertime 16.1.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#1610---2022-04-20).
11
+ ### Updated
12
+ * Update dependencies: google-cloud/storage, aws-sdk, dayjs, yargs [#3635](https://github.com/sitespeedio/sitespeed.io/pull/3635).
3
13
 
4
14
  ## 24.0.0 - 2022-04-06
5
15
 
@@ -10,7 +10,7 @@ module.exports = {
10
10
  },
11
11
  auth: {
12
12
  describe:
13
- 'The Grafana auth/bearer value used when sending annotations to Grafana. See http://docs.grafana.org/http_api/auth/#authentication-api',
13
+ 'The Grafana auth/bearer value used when sending annotations to Grafana. If you do not set Bearer/Auth, Bearer is automatically set. See http://docs.grafana.org/http_api/auth/#authentication-api',
14
14
  group: 'Grafana'
15
15
  },
16
16
  annotationTitle: {
@@ -98,7 +98,14 @@ module.exports = {
98
98
  // If Grafana is behind auth, use it!
99
99
  if (options.grafana.auth) {
100
100
  log.debug('Using auth for Grafana');
101
- postOptions.headers.Authorization = 'Bearer ' + options.grafana.auth;
101
+ if (
102
+ options.grafana.auth.startsWith('Bearer') ||
103
+ options.grafana.auth.startsWith('Basic')
104
+ ) {
105
+ postOptions.headers.Authorization = options.grafana.auth;
106
+ } else {
107
+ postOptions.headers.Authorization = 'Bearer ' + options.grafana.auth;
108
+ }
102
109
  }
103
110
  log.verbose('Send annotation to Grafana: %j', postData);
104
111
  return new Promise((resolve, reject) => {
@@ -59,6 +59,13 @@ module.exports = {
59
59
  'Include screenshot (from Browsertime/WebPageTest) in the annotation. You need to specify a --resultBaseURL for this to work.',
60
60
  group: 'Graphite'
61
61
  },
62
+ sendAnnotation: {
63
+ default: true,
64
+ type: 'boolean',
65
+ describe:
66
+ 'Send annotations when a run is finished. You need to specify a --resultBaseURL for this to work. However if you for example use a Prometheus exporter, you may want to make sure annotations are not sent, then set it to false.',
67
+ group: 'Graphite'
68
+ },
62
69
  annotationRetentionMinutes: {
63
70
  type: 'number',
64
71
  describe:
@@ -60,7 +60,7 @@ module.exports = {
60
60
  this.messageTypesToFireAnnotations = [];
61
61
  this.receivedTypesThatFireAnnotations = {};
62
62
  this.make = context.messageMaker('graphite').make;
63
- this.sendAnnotation = true;
63
+ this.sendAnnotation = opts.sendAnnotation || true;
64
64
  this.alias = {};
65
65
  this.wptExtras = {};
66
66
  this.usingBrowsertime = false;
@@ -38,6 +38,9 @@ if browsertime
38
38
  a(href='#server-timings') Server timings
39
39
  |  | 
40
40
 
41
+ p
42
+ small #{ medianRun ? 'Data from run ' + medianRun.runIndex : ''}
43
+
41
44
  - baseHelpURL = rootPath + 'help.html#';
42
45
 
43
46
  - const defaultVisualMetrics = ['SpeedIndex','FirstVisualChange','LastVisualChange','VisualProgress', 'PerceptualSpeedIndexProgress', 'ContentfulSpeedIndexProgress', 'videoRecordingStart', 'PerceptualSpeedIndex', 'ContentfulSpeedIndex', 'LastMeaningfulPaint', 'LargestImage', 'Heading' ,'VisualReadiness','VisualComplete85', 'VisualComplete95','VisualComplete99'];
@@ -156,6 +159,10 @@ if browsertime
156
159
  table
157
160
  tr
158
161
  th(colspan='2') Extra timings
162
+ tr
163
+ td
164
+ a(href=baseHelpURL + 'ttfb') TTFB
165
+ td.number #{h.time.ms(timings.ttfb.toFixed(0))}
159
166
  if (timings.paintTiming && Object.keys(timings.paintTiming).length > 0)
160
167
  - const paintTimingHelper = { "first-contentful-paint": {"name": 'First Contentful Paint (FCP)', "friendly": "first-contentful-paint"}, "first-paint": {"name": 'First Paint', "friendly": "firstPaint" }};
161
168
  each value, name in timings.paintTiming
@@ -289,7 +296,10 @@ if browsertime
289
296
  td #{element.name}
290
297
  if (element.filename)
291
298
  | (#{element.filename})
292
- td #{visualMetrics[element.name] ? h.time.ms(visualMetrics[element.name].toFixed(0)): ''}
299
+ if element && visualMetrics && visualMetrics[element.name]
300
+ td #{visualMetrics[element.name] ? h.time.ms(visualMetrics[element.name].toFixed(0)): ''}
301
+ else
302
+ td
293
303
  td #{element.x}
294
304
  td #{element.y}
295
305
  td #{element.width}