@browserless/goto 13.1.0 → 13.1.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/index.js +5 -12
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@browserless/goto",
3
3
  "description": "Navigate to web pages with built-in ad blocking, device emulation, and optimized loading for faster automation.",
4
4
  "homepage": "https://browserless.js.org/#/?id=gotopage-options",
5
- "version": "13.1.0",
5
+ "version": "13.1.1",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@browserless/devices": "13.0.0",
34
- "@duckduckgo/autoconsent": "~14.90.0",
34
+ "@duckduckgo/autoconsent": "~14.92.0",
35
35
  "@ghostery/adblocker-puppeteer": "~2.18.0",
36
36
  "debug-logfmt": "~1.4.10",
37
37
  "got": "~11.8.6",
@@ -42,7 +42,7 @@
42
42
  "tough-cookie": "~6.0.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@browserless/test": "13.1.0",
45
+ "@browserless/test": "13.1.1",
46
46
  "ava": "5",
47
47
  "p-wait-for": "3"
48
48
  },
@@ -66,5 +66,5 @@
66
66
  "timeout": "2m",
67
67
  "workerThreads": false
68
68
  },
69
- "gitHead": "5f117c60ca3a4bea5d8905a41abccedd10a99fc7"
69
+ "gitHead": "d491c5204deef804c923539063d92658f4e9649d"
70
70
  }
package/src/index.js CHANGED
@@ -228,18 +228,11 @@ module.exports = ({ defaultDevice = 'Macbook Pro 13', timeout: globalTimeout, ..
228
228
 
229
229
  // related https://github.com/puppeteer/puppeteer/issues/1353
230
230
  const _waitUntilAuto = (page, { timeout }) => {
231
- return Promise.all(
232
- [
233
- {
234
- fn: () => page.waitForNavigation({ waitUntil: 'networkidle2' }),
235
- debug: 'waitUntilAuto:waitForNavigation'
236
- },
237
- {
238
- fn: () => page.evaluate(() => window.history.pushState(null, null, null)),
239
- debug: 'waitUntilAuto:pushState'
240
- }
241
- ].map(({ fn, debug }) => run({ fn: fn(), debug, timeout }))
242
- )
231
+ return run({
232
+ fn: page.waitForNetworkIdle({ idleTime: 500, concurrency: 2 }),
233
+ debug: 'waitUntilAuto:networkIdle',
234
+ timeout
235
+ })
243
236
  }
244
237
 
245
238
  const goto = async (