@browserless/goto 13.1.0 → 13.1.2
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 +7 -4
- package/src/index.js +6 -13
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.
|
|
5
|
+
"version": "13.1.2",
|
|
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.
|
|
34
|
+
"@duckduckgo/autoconsent": "~14.93.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.
|
|
45
|
+
"@browserless/test": "13.1.2",
|
|
46
46
|
"ava": "5",
|
|
47
47
|
"p-wait-for": "3"
|
|
48
48
|
},
|
|
@@ -66,5 +66,8 @@
|
|
|
66
66
|
"timeout": "2m",
|
|
67
67
|
"workerThreads": false
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"puppeteer": "25"
|
|
71
|
+
},
|
|
72
|
+
"gitHead": "2c3cd83570a3b89b774d4caaa989986368a5c20b"
|
|
70
73
|
}
|
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
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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 (
|
|
@@ -545,7 +538,7 @@ module.exports = ({ defaultDevice = 'Macbook Pro 13', timeout: globalTimeout, ..
|
|
|
545
538
|
}
|
|
546
539
|
|
|
547
540
|
if (isWaitUntilAuto) {
|
|
548
|
-
await waitUntilAuto(page, { response, timeout:
|
|
541
|
+
await waitUntilAuto(page, { response, timeout: gotoTimeout })
|
|
549
542
|
}
|
|
550
543
|
|
|
551
544
|
if (flattenShadowDOM) {
|