sitespeed.io 27.9.0 → 27.9.1

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.
@@ -65,6 +65,6 @@ jobs:
65
65
  - name: Run test without a CLI
66
66
  run: xvfb-run node test/runWithoutCli.js
67
67
  - name: Run test with Influx 1.8
68
- run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --xvfb
68
+ run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --xvfb --logToFile
69
69
  - name: Run test with Influx 2.6.1
70
70
  run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --influxdb.port 8087 --influxdb.version 2 --influxdb.organisation sitespeed --influxdb.token sitespeed --xvfb
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
2
2
 
3
+ ## 27.9.1 - 2023-06-12
4
+ ### Fixed
5
+ * Upgraded Browsertime that logs if LCP is not present (instead of logging null)
6
+ * Fix when configure to log to file (that was broken when we moved to ESM) [#3879](https://github.com/sitespeedio/sitespeed.io/pull/3879).
7
+
3
8
  ## 27.9.0 - 2023-06-12
4
9
  ### Added
5
10
  * Firefox and Edge 114 in the Docker container.
@@ -1,5 +1,6 @@
1
1
  import intel from 'intel';
2
-
2
+ import { createWriteStream } from 'node:fs';
3
+ import { inherits } from 'node:util';
3
4
  const {
4
5
  INFO,
5
6
  DEBUG,
@@ -7,11 +8,44 @@ const {
7
8
  TRACE,
8
9
  NONE,
9
10
  basicConfig,
10
- addHandler,
11
- handlers,
11
+ Logger,
12
+ Handler,
12
13
  Formatter
13
14
  } = intel;
14
15
 
16
+ // FileHandler isn't exposed in Intel when we moved to ESM.
17
+ // To fix that for now we just use the same code as Intel.
18
+
19
+ function StreamHandler(options) {
20
+ options = options || {};
21
+ if (!options.stream) {
22
+ options = { stream: options };
23
+ }
24
+ Handler.call(this, options);
25
+ this._stream = options.stream;
26
+ }
27
+
28
+ inherits(StreamHandler, Handler);
29
+
30
+ StreamHandler.prototype.emit = function streamEmit(record) {
31
+ this._stream.write(this.format(record) + '\n');
32
+ };
33
+
34
+ function FileHandler(options) {
35
+ if (typeof options === 'string') {
36
+ options = { file: options };
37
+ }
38
+ this._file = options.file;
39
+
40
+ options.stream = this._open();
41
+ StreamHandler.call(this, options);
42
+ }
43
+ inherits(FileHandler, StreamHandler);
44
+
45
+ FileHandler.prototype._open = function open() {
46
+ return createWriteStream(this._file, { flags: 'a' });
47
+ };
48
+
15
49
  export function configure(options, logDir) {
16
50
  options = options || {};
17
51
 
@@ -52,8 +86,9 @@ export function configure(options, logDir) {
52
86
  }
53
87
 
54
88
  if (options.logToFile) {
55
- addHandler(
56
- new handlers.File({
89
+ let logger = new Logger();
90
+ logger.addHandler(
91
+ new FileHandler({
57
92
  file: logDir + '/sitespeed.io.log',
58
93
  formatter: new Formatter({
59
94
  format: '[%(date)s] %(levelname)s: [%(name)s] %(message)s',
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "sitespeed.io",
3
- "version": "27.9.0",
3
+ "version": "27.9.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "sitespeed.io",
9
- "version": "27.9.0",
9
+ "version": "27.9.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@google-cloud/storage": "6.9.5",
@@ -15,7 +15,7 @@
15
15
  "@tgwf/co2": "0.13.4",
16
16
  "aws-sdk": "2.1327.0",
17
17
  "axe-core": "4.7.2",
18
- "browsertime": "17.11.0",
18
+ "browsertime": "17.11.1",
19
19
  "cli-color": "2.0.3",
20
20
  "coach-core": "7.2.0",
21
21
  "concurrent-queue": "7.0.2",
@@ -1872,9 +1872,9 @@
1872
1872
  }
1873
1873
  },
1874
1874
  "node_modules/browsertime": {
1875
- "version": "17.11.0",
1876
- "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-17.11.0.tgz",
1877
- "integrity": "sha512-IfLXxrNXEbpiPYlTeyIwjrhaSRkneqK91GLk1d47KSueE/e1yqRq+EQ8X9unl89QpUpP53IFzjhIIeTd1gBREQ==",
1875
+ "version": "17.11.1",
1876
+ "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-17.11.1.tgz",
1877
+ "integrity": "sha512-KcGnDH1pVEmfwh5x3A6ix1ZK5mWeSlZk5dG82ygW6JQ79mfVjteRKYXJcEV+SDY0k6sXg1qhZpEPobaciPAOwA==",
1878
1878
  "dependencies": {
1879
1879
  "@cypress/xvfb": "1.2.4",
1880
1880
  "@devicefarmer/adbkit": "2.11.3",
@@ -1900,7 +1900,7 @@
1900
1900
  "lodash.merge": "4.6.2",
1901
1901
  "lodash.pick": "4.4.0",
1902
1902
  "lodash.set": "4.3.2",
1903
- "selenium-webdriver": "4.9.2",
1903
+ "selenium-webdriver": "4.10.0",
1904
1904
  "yargs": "17.7.2"
1905
1905
  },
1906
1906
  "bin": {
@@ -7999,9 +7999,9 @@
7999
7999
  "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
8000
8000
  },
8001
8001
  "node_modules/selenium-webdriver": {
8002
- "version": "4.9.2",
8003
- "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.9.2.tgz",
8004
- "integrity": "sha512-0gDswAgVn6qbCYckZetQQvQK9tWW1r7LaumhiqY1/Wl/7JEWG0JANsTbZKnmGc3+cUU76zAi5/p0P8LUweXlig==",
8002
+ "version": "4.10.0",
8003
+ "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.10.0.tgz",
8004
+ "integrity": "sha512-hSQPw6jgc+ej/UEcdQPG/iBwwMeCEgZr9HByY/J8ToyXztEqXzU9aLsIyrlj1BywBcStO4JQK/zMUWWrV8+riA==",
8005
8005
  "dependencies": {
8006
8006
  "jszip": "^3.10.1",
8007
8007
  "tmp": "^0.2.1",
@@ -10844,9 +10844,9 @@
10844
10844
  }
10845
10845
  },
10846
10846
  "browsertime": {
10847
- "version": "17.11.0",
10848
- "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-17.11.0.tgz",
10849
- "integrity": "sha512-IfLXxrNXEbpiPYlTeyIwjrhaSRkneqK91GLk1d47KSueE/e1yqRq+EQ8X9unl89QpUpP53IFzjhIIeTd1gBREQ==",
10847
+ "version": "17.11.1",
10848
+ "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-17.11.1.tgz",
10849
+ "integrity": "sha512-KcGnDH1pVEmfwh5x3A6ix1ZK5mWeSlZk5dG82ygW6JQ79mfVjteRKYXJcEV+SDY0k6sXg1qhZpEPobaciPAOwA==",
10850
10850
  "requires": {
10851
10851
  "@cypress/xvfb": "1.2.4",
10852
10852
  "@devicefarmer/adbkit": "2.11.3",
@@ -10873,7 +10873,7 @@
10873
10873
  "lodash.merge": "4.6.2",
10874
10874
  "lodash.pick": "4.4.0",
10875
10875
  "lodash.set": "4.3.2",
10876
- "selenium-webdriver": "4.9.2",
10876
+ "selenium-webdriver": "4.10.0",
10877
10877
  "yargs": "17.7.2"
10878
10878
  }
10879
10879
  },
@@ -15496,9 +15496,9 @@
15496
15496
  "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
15497
15497
  },
15498
15498
  "selenium-webdriver": {
15499
- "version": "4.9.2",
15500
- "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.9.2.tgz",
15501
- "integrity": "sha512-0gDswAgVn6qbCYckZetQQvQK9tWW1r7LaumhiqY1/Wl/7JEWG0JANsTbZKnmGc3+cUU76zAi5/p0P8LUweXlig==",
15499
+ "version": "4.10.0",
15500
+ "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.10.0.tgz",
15501
+ "integrity": "sha512-hSQPw6jgc+ej/UEcdQPG/iBwwMeCEgZr9HByY/J8ToyXztEqXzU9aLsIyrlj1BywBcStO4JQK/zMUWWrV8+riA==",
15502
15502
  "requires": {
15503
15503
  "jszip": "^3.10.1",
15504
15504
  "tmp": "^0.2.1",
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": "27.9.0",
8
+ "version": "27.9.1",
9
9
  "description": "Analyze the web performance of your site",
10
10
  "keywords": [
11
11
  "performance",
@@ -83,7 +83,7 @@
83
83
  "@tgwf/co2": "0.13.4",
84
84
  "aws-sdk": "2.1327.0",
85
85
  "axe-core": "4.7.2",
86
- "browsertime": "17.11.0",
86
+ "browsertime": "17.11.1",
87
87
  "coach-core": "7.2.0",
88
88
  "cli-color": "2.0.3",
89
89
  "concurrent-queue": "7.0.2",