browserless 10.1.16 → 10.1.18

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 +6 -6
  2. package/src/driver.js +6 -16
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "browserless",
3
3
  "description": "The headless Chrome/Chromium performance driver for Node.js",
4
4
  "homepage": "https://browserless.js.org",
5
- "version": "10.1.16",
5
+ "version": "10.1.18",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -32,9 +32,9 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@browserless/errors": "^10.1.11",
35
- "@browserless/goto": "^10.1.16",
36
- "@browserless/pdf": "^10.1.16",
37
- "@browserless/screenshot": "^10.1.16",
35
+ "@browserless/goto": "^10.1.18",
36
+ "@browserless/pdf": "^10.1.18",
37
+ "@browserless/screenshot": "^10.1.18",
38
38
  "debug-logfmt": "~1.0.4",
39
39
  "kill-process-group": "~1.0.6",
40
40
  "p-reflect": "~2.1.0",
@@ -44,7 +44,7 @@
44
44
  "superlock": "~1.0.4"
45
45
  },
46
46
  "devDependencies": {
47
- "@browserless/test": "^10.1.15",
47
+ "@browserless/test": "^10.1.17",
48
48
  "ava": "latest",
49
49
  "execa": "5",
50
50
  "ps-list": "7"
@@ -60,7 +60,7 @@
60
60
  "timeout": "2m",
61
61
  "workerThreads": false
62
62
  },
63
- "gitHead": "2a184f1c72ec5a967f34fbf148806fa8224ef156",
63
+ "gitHead": "f8e21e951876d99efcecf7415959aa13488e9c7e",
64
64
  "scripts": {
65
65
  "test": "ava"
66
66
  }
package/src/driver.js CHANGED
@@ -6,31 +6,21 @@ const requireOneOf = require('require-one-of')
6
6
  const pReflect = require('p-reflect')
7
7
 
8
8
  // flags explained: https://peter.sh/experiments/chromium-command-line-switches
9
- // default flags: https://github.com/puppeteer/puppeteer/blob/0d2c42a1c47c7cc5293d9664121180b35c4cdf65/packages/puppeteer-core/src/node/ChromeLauncher.ts#L166
9
+ // features explained: https://niek.github.io/chrome-features/
10
+ // popular flags: https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md
11
+ // default flags: https://github.com/puppeteer/puppeteer/blob/f2ce480285709a08c385d10df29230d5aac86f59/packages/puppeteer-core/src/node/ChromeLauncher.ts#L200
10
12
  // AWS Lambda flags: https://github.com/alixaxel/chrome-aws-lambda/blob/78fdbf1b9b9a439883dc2fe747171a765b835031/source/index.ts#L94
11
13
  const defaultArgs = [
12
14
  '--autoplay-policy=user-gesture-required', // https://source.chromium.org/search?q=lang:cpp+symbol:kAutoplayPolicy&ss=chromium
13
15
  '--disable-blink-features=PrettyPrintJSONDocument,AutomationControlled', // https://blog.m157q.tw/posts/2020/09/11/bypass-cloudflare-detection-while-using-selenium-with-chromedriver/
14
- '--disable-cloud-import',
15
16
  '--disable-domain-reliability', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisableDomainReliability&ss=chromium
16
- '--disable-features=AudioServiceOutOfProcess,IsolateOrigins,site-per-process', // https://source.chromium.org/search?q=file:content_features.cc&ss=chromium
17
- '--disable-gesture-typing',
18
- '--disable-infobars',
19
- '--disable-notifications',
20
- '--disable-offer-store-unmasked-wallet-cards',
21
- '--disable-offer-upload-credit-cards',
17
+ '--disable-features=CalculateNativeWinOcclusion,InterestFeedV2,site-per-process', // https://source.chromium.org/search?q=file:content_features.cc&ss=chromium
18
+ '--disable-notifications', // https://source.chromium.org/search?q=lang%3Acpp+symbol%3AkDisablePermissionsAPI&ss=chromium
22
19
  '--disable-print-preview', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisablePrintPreview&ss=chromium
23
20
  '--disable-setuid-sandbox', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisableSetuidSandbox&ss=chromium
24
21
  '--disable-site-isolation-trials', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisableSiteIsolation&ss=chromium
25
22
  '--disable-speech-api', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisableSpeechAPI&ss=chromium
26
- '--disable-tab-for-desktop-share',
27
- '--disable-translate',
28
- '--disable-voice-input',
29
- '--disable-wake-on-wifi',
30
- '--enable-async-dns',
31
- '--enable-simple-cache-backend',
32
- '--enable-tcp-fast-open',
33
- '--force-webrtc-ip-handling-policy=default_public_interface_only',
23
+ '--ash-no-nudges', // https://source.chromium.org/search?q=lang:cpp+symbol:kAshNoNudges&ss=chromium
34
24
  '--ignore-gpu-blocklist', // https://source.chromium.org/search?q=lang:cpp+symbol:kIgnoreGpuBlocklist&ss=chromium
35
25
  '--no-default-browser-check', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoDefaultBrowserCheck&ss=chromium
36
26
  '--no-pings', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoPings&ss=chromium