@browserless/goto 10.1.15 → 10.1.17

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@browserless/goto",
3
3
  "description": "Go to a page aborting unnecessary requests",
4
4
  "homepage": "https://browserless.js.org/#/?id=gotopage-options",
5
- "version": "10.1.15",
5
+ "version": "10.1.17",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -31,6 +31,7 @@
31
31
  "dependencies": {
32
32
  "@browserless/devices": "^10.1.11",
33
33
  "@cliqz/adblocker-puppeteer": "~1.26.7",
34
+ "@kikobeats/time-span": "~1.0.2",
34
35
  "debug-logfmt": "~1.0.4",
35
36
  "got": "~11.8.6",
36
37
  "is-url-http": "~2.3.6",
@@ -38,11 +39,10 @@
38
39
  "p-timeout": "~4.1.0",
39
40
  "pretty-ms": "~7.0.1",
40
41
  "shallow-equal": "~3.1.0",
41
- "time-span": "~4.0.0",
42
42
  "tough-cookie": "~4.1.3"
43
43
  },
44
44
  "devDependencies": {
45
- "@browserless/test": "^10.1.15",
45
+ "@browserless/test": "^10.1.17",
46
46
  "ava": "latest",
47
47
  "p-wait-for": "3"
48
48
  },
@@ -61,7 +61,7 @@
61
61
  "timeout": "2m",
62
62
  "workerThreads": false
63
63
  },
64
- "gitHead": "314f90097a623f50a807d403d99313c6f7eb3f54",
64
+ "gitHead": "aa8728d7f85dae5670da2f2d06004f339c387234",
65
65
  "scripts": {
66
66
  "postinstall": "node scripts/postinstall",
67
67
  "test": "ava"
package/src/engine.bin CHANGED
Binary file
package/src/index.js CHANGED
@@ -1,12 +1,11 @@
1
1
  'use strict'
2
2
 
3
+ const timeSpan = require('@kikobeats/time-span')({ format: require('pretty-ms') })
3
4
  const { PuppeteerBlocker } = require('@cliqz/adblocker-puppeteer')
4
5
  const { shallowEqualObjects } = require('shallow-equal')
5
6
  const createDevices = require('@browserless/devices')
6
7
  const toughCookie = require('tough-cookie')
7
- const prettyMs = require('pretty-ms')
8
8
  const pReflect = require('p-reflect')
9
- const timeSpan = require('time-span')
10
9
  const pTimeout = require('p-timeout')
11
10
  const isUrl = require('is-url-http')
12
11
  const path = require('path')
@@ -33,7 +32,7 @@ const castArray = value => [].concat(value).filter(Boolean)
33
32
  const run = async ({ fn, timeout, debug: props }) => {
34
33
  const debugProps = { duration: timeSpan() }
35
34
  const result = await pReflect(timeout ? pTimeout(fn, timeout) : fn)
36
- debugProps.duration = prettyMs(debugProps.duration())
35
+ debugProps.duration = debugProps.duration()
37
36
  if (result.isRejected) debugProps.error = result.reason.message || result.reason
38
37
  debug(props, debugProps)
39
38
  return result