@browserless/lighthouse 10.1.13 → 10.1.15

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.js +15 -13
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@browserless/lighthouse",
3
3
  "description": "Browserless Lighthouse integration using puppeteer.",
4
4
  "homepage": "https://browserless.js.org",
5
- "version": "10.1.13",
5
+ "version": "10.1.15",
6
6
  "main": "src",
7
7
  "repository": {
8
8
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "lighthouse": "~11.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@browserless/test": "^10.1.13",
30
+ "@browserless/test": "^10.1.15",
31
31
  "ava": "latest"
32
32
  },
33
33
  "engines": {
@@ -41,7 +41,7 @@
41
41
  "timeout": "2m",
42
42
  "workerThreads": false
43
43
  },
44
- "gitHead": "fa7452351dd0afb48bccd6ca2a2712fd733a5d49",
44
+ "gitHead": "314f90097a623f50a807d403d99313c6f7eb3f54",
45
45
  "scripts": {
46
46
  "test": "ava"
47
47
  }
package/src/index.js CHANGED
@@ -3,18 +3,20 @@
3
3
  const lighthouse = require('./lighthouse')
4
4
  const getConfig = require('./get-config')
5
5
 
6
- module.exports = getBrowserless => async (url, { output = 'json', timeout, ...opts } = {}) => {
7
- let teardown
8
- const browserless = await getBrowserless(fn => (teardown = fn))
6
+ module.exports =
7
+ getBrowserless =>
8
+ async (url, { output = 'json', timeout, ...opts } = {}) => {
9
+ let teardown
10
+ const browserless = await getBrowserless(fn => (teardown = fn))
9
11
 
10
- const fn = page => async () =>
11
- lighthouse({
12
- config: await getConfig({ ...opts, output }),
13
- page,
14
- url
15
- })
12
+ const fn = page => async () =>
13
+ lighthouse({
14
+ config: await getConfig({ ...opts, output }),
15
+ page,
16
+ url
17
+ })
16
18
 
17
- const result = await browserless.withPage(fn, { timeout })()
18
- if (teardown) await teardown()
19
- return result
20
- }
19
+ const result = await browserless.withPage(fn, { timeout })()
20
+ if (teardown) await teardown()
21
+ return result
22
+ }