@browserless.io/browserless 2.24.2 → 2.24.3

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/CHANGELOG.md CHANGED
@@ -1,8 +1,15 @@
1
- # [Latest](https://github.com/browserless/chrome/compare/v2.24.2...main)
1
+ # [Latest](https://github.com/browserless/chrome/compare/v2.24.3...main)
2
2
 
3
3
  - Dependency updates.
4
4
 
5
- # [Latest](https://github.com/browserless/chrome/compare/v2.24.1...v2.24.2)
5
+ # [v2.24.3](https://github.com/browserless/chrome/compare/v2.24.2...v2.24.3)
6
+
7
+ - Dependency updates.
8
+ - Pins Ubuntu@22.04 in Github Actions.
9
+ - Fixes `headless` types to use `--headless=new` when prior libraries attempt to do `--headless=old` (older playwright).
10
+ - Typing fixes.
11
+
12
+ # [v2.24.2](https://github.com/browserless/chrome/compare/v2.24.1...v2.24.2)
6
13
 
7
14
  - Dependency updates.
8
15
  - Fix issues with Firefox when using a proxy.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  ![Multi CI](https://github.com/browserless/chrome/actions/workflows/docker-multi.yml/badge.svg)
11
11
 
12
12
  > [!NOTE]
13
- > [Looking for v1.x.x of browserless? You can find it here](https://github.com/browserless/chrome/tree/v1), although we recommend [migrating](/MIGRATION-2.0.md) to v2.
13
+ > Looking to bypass bot detectors and solve captchas? [We would recommend using BrowserQL as our stealthiest option](https://www.browserless.io/feature/browserql).
14
14
 
15
15
  Browserless allows remote clients to connect and execute headless work, all inside of docker. It supports the standard, unforked Puppeteer and Playwright libraries, as well offering REST-based APIs for common actions like data collection, PDF generation and more.
16
16
 
@@ -57,12 +57,11 @@ If you've been struggling to deploy headless browsers without running into issue
57
57
 
58
58
  Our [cloud accounts](https://www.browserless.io/pricing/) include all the general features plus extras, such as:
59
59
 
60
- - Inbuilt [residential proxy](https://www.browserless.io/blog/residential-proxying/)
61
- - [/unblock API](https://www.browserless.io/blog/unblock-api) for avoiding detectors
62
- - [Automated captcha solving](https://www.browserless.io/blog/captcha-solving) for getting past mandatory checks
60
+ - [BrowserQL](https://www.browserless.io/feature/browserql) for avoiding detectors and solving captchas
63
61
  - [Hybrid automations](https://www.browserless.io/blog/hybrid-automations-for-puppeteer/) for streaming login windows during scripts
64
62
  - [/reconnect API](https://www.browserless.io/blog/reconnect-api) for keeping browsers alive for reuse
65
63
  - [REST APIs](https://www.browserless.io/feature/rest-apis) for tasks such as retrieving HTML, PDFs or Lighthouse metrics
64
+ - Inbuilt [residential proxy](https://www.browserless.io/blog/residential-proxying/)
66
65
  - SSO, tokens and user roles
67
66
 
68
67
  ## How it works
@@ -31,10 +31,15 @@ class BasePlaywright extends EventEmitter {
31
31
  this.removeAllListeners();
32
32
  }
33
33
  makeLaunchOptions(opts) {
34
+ // Strip headless=old as it'll cause issues with newer Chromium
35
+ const args = (opts.args ?? []).filter((a) => !a.includes('--headless=old'));
36
+ if (!args.some((a) => a.startsWith('--headless'))) {
37
+ args.push('--headless=new');
38
+ }
34
39
  return {
35
40
  ...opts,
36
41
  args: [
37
- ...(opts.args || []),
42
+ ...args,
38
43
  this.userDataDir ? `--user-data-dir=${this.userDataDir}` : '',
39
44
  ],
40
45
  executablePath: this.executablePath(),
@@ -463,14 +463,14 @@
463
463
  "length": {
464
464
  "type": "number"
465
465
  },
466
- "__@toStringTag@29073": {
466
+ "__@toStringTag@25009": {
467
467
  "type": "string",
468
468
  "const": "Uint8Array"
469
469
  }
470
470
  },
471
471
  "required": [
472
472
  "BYTES_PER_ELEMENT",
473
- "__@toStringTag@29073",
473
+ "__@toStringTag@25009",
474
474
  "buffer",
475
475
  "byteLength",
476
476
  "byteOffset",
@@ -505,13 +505,13 @@
505
505
  "byteLength": {
506
506
  "type": "number"
507
507
  },
508
- "__@toStringTag@29073": {
508
+ "__@toStringTag@25009": {
509
509
  "type": "string"
510
510
  }
511
511
  },
512
512
  "additionalProperties": false,
513
513
  "required": [
514
- "__@toStringTag@29073",
514
+ "__@toStringTag@25009",
515
515
  "byteLength"
516
516
  ]
517
517
  },
@@ -521,18 +521,18 @@
521
521
  "byteLength": {
522
522
  "type": "number"
523
523
  },
524
- "__@species@29111": {
524
+ "__@species@25047": {
525
525
  "$ref": "#/definitions/SharedArrayBuffer"
526
526
  },
527
- "__@toStringTag@29073": {
527
+ "__@toStringTag@25009": {
528
528
  "type": "string",
529
529
  "const": "SharedArrayBuffer"
530
530
  }
531
531
  },
532
532
  "additionalProperties": false,
533
533
  "required": [
534
- "__@species@29111",
535
- "__@toStringTag@29073",
534
+ "__@species@25047",
535
+ "__@toStringTag@25009",
536
536
  "byteLength"
537
537
  ]
538
538
  },
@@ -608,14 +608,14 @@
608
608
  "length": {
609
609
  "type": "number"
610
610
  },
611
- "__@toStringTag@378065": {
611
+ "__@toStringTag@112328": {
612
612
  "type": "string",
613
613
  "const": "Uint8Array"
614
614
  }
615
615
  },
616
616
  "required": [
617
617
  "BYTES_PER_ELEMENT",
618
- "__@toStringTag@378065",
618
+ "__@toStringTag@112328",
619
619
  "buffer",
620
620
  "byteLength",
621
621
  "byteOffset",
@@ -650,13 +650,13 @@
650
650
  "byteLength": {
651
651
  "type": "number"
652
652
  },
653
- "__@toStringTag@378065": {
653
+ "__@toStringTag@112328": {
654
654
  "type": "string"
655
655
  }
656
656
  },
657
657
  "additionalProperties": false,
658
658
  "required": [
659
- "__@toStringTag@378065",
659
+ "__@toStringTag@112328",
660
660
  "byteLength"
661
661
  ]
662
662
  },
@@ -666,18 +666,18 @@
666
666
  "byteLength": {
667
667
  "type": "number"
668
668
  },
669
- "__@species@378103": {
669
+ "__@species@112366": {
670
670
  "$ref": "#/definitions/SharedArrayBuffer"
671
671
  },
672
- "__@toStringTag@378065": {
672
+ "__@toStringTag@112328": {
673
673
  "type": "string",
674
674
  "const": "SharedArrayBuffer"
675
675
  }
676
676
  },
677
677
  "additionalProperties": false,
678
678
  "required": [
679
- "__@species@378103",
680
- "__@toStringTag@378065",
679
+ "__@species@112366",
680
+ "__@toStringTag@112328",
681
681
  "byteLength"
682
682
  ]
683
683
  },
@@ -510,14 +510,14 @@
510
510
  "length": {
511
511
  "type": "number"
512
512
  },
513
- "__@toStringTag@116122": {
513
+ "__@toStringTag@124979": {
514
514
  "type": "string",
515
515
  "const": "Uint8Array"
516
516
  }
517
517
  },
518
518
  "required": [
519
519
  "BYTES_PER_ELEMENT",
520
- "__@toStringTag@116122",
520
+ "__@toStringTag@124979",
521
521
  "buffer",
522
522
  "byteLength",
523
523
  "byteOffset",
@@ -552,13 +552,13 @@
552
552
  "byteLength": {
553
553
  "type": "number"
554
554
  },
555
- "__@toStringTag@116122": {
555
+ "__@toStringTag@124979": {
556
556
  "type": "string"
557
557
  }
558
558
  },
559
559
  "additionalProperties": false,
560
560
  "required": [
561
- "__@toStringTag@116122",
561
+ "__@toStringTag@124979",
562
562
  "byteLength"
563
563
  ]
564
564
  },
@@ -568,18 +568,18 @@
568
568
  "byteLength": {
569
569
  "type": "number"
570
570
  },
571
- "__@species@116160": {
571
+ "__@species@125017": {
572
572
  "$ref": "#/definitions/SharedArrayBuffer"
573
573
  },
574
- "__@toStringTag@116122": {
574
+ "__@toStringTag@124979": {
575
575
  "type": "string",
576
576
  "const": "SharedArrayBuffer"
577
577
  }
578
578
  },
579
579
  "additionalProperties": false,
580
580
  "required": [
581
- "__@species@116160",
582
- "__@toStringTag@116122",
581
+ "__@species@125017",
582
+ "__@toStringTag@124979",
583
583
  "byteLength"
584
584
  ]
585
585
  },
@@ -553,14 +553,14 @@
553
553
  "length": {
554
554
  "type": "number"
555
555
  },
556
- "__@toStringTag@145363": {
556
+ "__@toStringTag@150362": {
557
557
  "type": "string",
558
558
  "const": "Uint8Array"
559
559
  }
560
560
  },
561
561
  "required": [
562
562
  "BYTES_PER_ELEMENT",
563
- "__@toStringTag@145363",
563
+ "__@toStringTag@150362",
564
564
  "buffer",
565
565
  "byteLength",
566
566
  "byteOffset",
@@ -595,13 +595,13 @@
595
595
  "byteLength": {
596
596
  "type": "number"
597
597
  },
598
- "__@toStringTag@145363": {
598
+ "__@toStringTag@150362": {
599
599
  "type": "string"
600
600
  }
601
601
  },
602
602
  "additionalProperties": false,
603
603
  "required": [
604
- "__@toStringTag@145363",
604
+ "__@toStringTag@150362",
605
605
  "byteLength"
606
606
  ]
607
607
  },
@@ -611,18 +611,18 @@
611
611
  "byteLength": {
612
612
  "type": "number"
613
613
  },
614
- "__@species@145401": {
614
+ "__@species@150400": {
615
615
  "$ref": "#/definitions/SharedArrayBuffer"
616
616
  },
617
- "__@toStringTag@145363": {
617
+ "__@toStringTag@150362": {
618
618
  "type": "string",
619
619
  "const": "SharedArrayBuffer"
620
620
  }
621
621
  },
622
622
  "additionalProperties": false,
623
623
  "required": [
624
- "__@species@145401",
625
- "__@toStringTag@145363",
624
+ "__@species@150400",
625
+ "__@toStringTag@150362",
626
626
  "byteLength"
627
627
  ]
628
628
  },
@@ -463,14 +463,14 @@
463
463
  "length": {
464
464
  "type": "number"
465
465
  },
466
- "__@toStringTag@160033": {
466
+ "__@toStringTag@137683": {
467
467
  "type": "string",
468
468
  "const": "Uint8Array"
469
469
  }
470
470
  },
471
471
  "required": [
472
472
  "BYTES_PER_ELEMENT",
473
- "__@toStringTag@160033",
473
+ "__@toStringTag@137683",
474
474
  "buffer",
475
475
  "byteLength",
476
476
  "byteOffset",
@@ -505,13 +505,13 @@
505
505
  "byteLength": {
506
506
  "type": "number"
507
507
  },
508
- "__@toStringTag@160033": {
508
+ "__@toStringTag@137683": {
509
509
  "type": "string"
510
510
  }
511
511
  },
512
512
  "additionalProperties": false,
513
513
  "required": [
514
- "__@toStringTag@160033",
514
+ "__@toStringTag@137683",
515
515
  "byteLength"
516
516
  ]
517
517
  },
@@ -521,18 +521,18 @@
521
521
  "byteLength": {
522
522
  "type": "number"
523
523
  },
524
- "__@species@160071": {
524
+ "__@species@137721": {
525
525
  "$ref": "#/definitions/SharedArrayBuffer"
526
526
  },
527
- "__@toStringTag@160033": {
527
+ "__@toStringTag@137683": {
528
528
  "type": "string",
529
529
  "const": "SharedArrayBuffer"
530
530
  }
531
531
  },
532
532
  "additionalProperties": false,
533
533
  "required": [
534
- "__@species@160071",
535
- "__@toStringTag@160033",
534
+ "__@species@137721",
535
+ "__@toStringTag@137683",
536
536
  "byteLength"
537
537
  ]
538
538
  },
@@ -608,14 +608,14 @@
608
608
  "length": {
609
609
  "type": "number"
610
610
  },
611
- "__@toStringTag@305471": {
611
+ "__@toStringTag@212748": {
612
612
  "type": "string",
613
613
  "const": "Uint8Array"
614
614
  }
615
615
  },
616
616
  "required": [
617
617
  "BYTES_PER_ELEMENT",
618
- "__@toStringTag@305471",
618
+ "__@toStringTag@212748",
619
619
  "buffer",
620
620
  "byteLength",
621
621
  "byteOffset",
@@ -650,13 +650,13 @@
650
650
  "byteLength": {
651
651
  "type": "number"
652
652
  },
653
- "__@toStringTag@305471": {
653
+ "__@toStringTag@212748": {
654
654
  "type": "string"
655
655
  }
656
656
  },
657
657
  "additionalProperties": false,
658
658
  "required": [
659
- "__@toStringTag@305471",
659
+ "__@toStringTag@212748",
660
660
  "byteLength"
661
661
  ]
662
662
  },
@@ -666,18 +666,18 @@
666
666
  "byteLength": {
667
667
  "type": "number"
668
668
  },
669
- "__@species@305509": {
669
+ "__@species@212786": {
670
670
  "$ref": "#/definitions/SharedArrayBuffer"
671
671
  },
672
- "__@toStringTag@305471": {
672
+ "__@toStringTag@212748": {
673
673
  "type": "string",
674
674
  "const": "SharedArrayBuffer"
675
675
  }
676
676
  },
677
677
  "additionalProperties": false,
678
678
  "required": [
679
- "__@species@305509",
680
- "__@toStringTag@305471",
679
+ "__@species@212786",
680
+ "__@toStringTag@212748",
681
681
  "byteLength"
682
682
  ]
683
683
  },
@@ -510,14 +510,14 @@
510
510
  "length": {
511
511
  "type": "number"
512
512
  },
513
- "__@toStringTag@261543": {
513
+ "__@toStringTag@262923": {
514
514
  "type": "string",
515
515
  "const": "Uint8Array"
516
516
  }
517
517
  },
518
518
  "required": [
519
519
  "BYTES_PER_ELEMENT",
520
- "__@toStringTag@261543",
520
+ "__@toStringTag@262923",
521
521
  "buffer",
522
522
  "byteLength",
523
523
  "byteOffset",
@@ -552,13 +552,13 @@
552
552
  "byteLength": {
553
553
  "type": "number"
554
554
  },
555
- "__@toStringTag@261543": {
555
+ "__@toStringTag@262923": {
556
556
  "type": "string"
557
557
  }
558
558
  },
559
559
  "additionalProperties": false,
560
560
  "required": [
561
- "__@toStringTag@261543",
561
+ "__@toStringTag@262923",
562
562
  "byteLength"
563
563
  ]
564
564
  },
@@ -568,18 +568,18 @@
568
568
  "byteLength": {
569
569
  "type": "number"
570
570
  },
571
- "__@species@261581": {
571
+ "__@species@262961": {
572
572
  "$ref": "#/definitions/SharedArrayBuffer"
573
573
  },
574
- "__@toStringTag@261543": {
574
+ "__@toStringTag@262923": {
575
575
  "type": "string",
576
576
  "const": "SharedArrayBuffer"
577
577
  }
578
578
  },
579
579
  "additionalProperties": false,
580
580
  "required": [
581
- "__@species@261581",
582
- "__@toStringTag@261543",
581
+ "__@species@262961",
582
+ "__@toStringTag@262923",
583
583
  "byteLength"
584
584
  ]
585
585
  },
@@ -553,14 +553,14 @@
553
553
  "length": {
554
554
  "type": "number"
555
555
  },
556
- "__@toStringTag@290778": {
556
+ "__@toStringTag@237829": {
557
557
  "type": "string",
558
558
  "const": "Uint8Array"
559
559
  }
560
560
  },
561
561
  "required": [
562
562
  "BYTES_PER_ELEMENT",
563
- "__@toStringTag@290778",
563
+ "__@toStringTag@237829",
564
564
  "buffer",
565
565
  "byteLength",
566
566
  "byteOffset",
@@ -595,13 +595,13 @@
595
595
  "byteLength": {
596
596
  "type": "number"
597
597
  },
598
- "__@toStringTag@290778": {
598
+ "__@toStringTag@237829": {
599
599
  "type": "string"
600
600
  }
601
601
  },
602
602
  "additionalProperties": false,
603
603
  "required": [
604
- "__@toStringTag@290778",
604
+ "__@toStringTag@237829",
605
605
  "byteLength"
606
606
  ]
607
607
  },
@@ -611,18 +611,18 @@
611
611
  "byteLength": {
612
612
  "type": "number"
613
613
  },
614
- "__@species@290816": {
614
+ "__@species@237867": {
615
615
  "$ref": "#/definitions/SharedArrayBuffer"
616
616
  },
617
- "__@toStringTag@290778": {
617
+ "__@toStringTag@237829": {
618
618
  "type": "string",
619
619
  "const": "SharedArrayBuffer"
620
620
  }
621
621
  },
622
622
  "additionalProperties": false,
623
623
  "required": [
624
- "__@species@290816",
625
- "__@toStringTag@290778",
624
+ "__@species@237867",
625
+ "__@toStringTag@237829",
626
626
  "byteLength"
627
627
  ]
628
628
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserless.io/browserless",
3
- "version": "2.24.2",
3
+ "version": "2.24.3",
4
4
  "license": "SSPL",
5
5
  "description": "The browserless platform",
6
6
  "author": "browserless.io",
@@ -51,7 +51,7 @@
51
51
  "debug": "^4.4.0",
52
52
  "del": "^8.0.0",
53
53
  "enjoi": "^9.0.1",
54
- "file-type": "^19.6.0",
54
+ "file-type": "^20.0.0",
55
55
  "get-port": "^7.1.0",
56
56
  "gradient-string": "^3.0.0",
57
57
  "http-proxy": "^1.18.1",
@@ -62,12 +62,12 @@
62
62
  "playwright-1.47": "npm:playwright-core@1.47.2",
63
63
  "playwright-1.48": "npm:playwright-core@1.48.2",
64
64
  "playwright-core": "^1.49.1",
65
- "puppeteer-core": "^23.11.1",
65
+ "puppeteer-core": "^24.1.1",
66
66
  "puppeteer-extra": "^3.3.6",
67
67
  "puppeteer-extra-plugin-stealth": "^2.11.2",
68
68
  "queue": "^7.0.0",
69
- "systeminformation": "^5.25.5",
70
- "tar-fs": "^3.0.6"
69
+ "systeminformation": "^5.25.11",
70
+ "tar-fs": "^3.0.8"
71
71
  },
72
72
  "optionalDependencies": {
73
73
  "@types/chai": "^5.0.1",
@@ -76,26 +76,26 @@
76
76
  "@types/http-proxy": "^1.17.15",
77
77
  "@types/micromatch": "^4.0.9",
78
78
  "@types/mocha": "^10.0.10",
79
- "@types/node": "^22.10.5",
79
+ "@types/node": "^22.10.10",
80
80
  "@types/sinon": "^17.0.3",
81
- "@typescript-eslint/eslint-plugin": "^8.19.1",
82
- "@typescript-eslint/parser": "^8.19.1",
81
+ "@typescript-eslint/eslint-plugin": "^8.21.0",
82
+ "@typescript-eslint/parser": "^8.21.0",
83
83
  "assert": "^2.0.0",
84
84
  "chai": "^5.1.2",
85
85
  "cross-env": "^7.0.3",
86
86
  "env-cmd": "^10.1.0",
87
87
  "esbuild": "^0.24.2",
88
88
  "esbuild-plugin-polyfill-node": "^0.3.0",
89
- "eslint": "^9.17.0",
89
+ "eslint": "^9.19.0",
90
90
  "extract-zip": "^2.0.1",
91
91
  "gunzip-maybe": "^1.4.2",
92
92
  "marked": "^15.0.6",
93
- "mocha": "^11.0.1",
93
+ "mocha": "^11.1.0",
94
94
  "move-file": "^3.1.0",
95
95
  "prettier": "^3.4.2",
96
96
  "sinon": "^19.0.2",
97
97
  "ts-node": "^10.9.2",
98
- "typescript": "^5.7.2",
98
+ "typescript": "^5.7.3",
99
99
  "typescript-json-schema": "^0.65.1"
100
100
  },
101
101
  "playwrightVersions": {
@@ -56,10 +56,17 @@ class BasePlaywright extends EventEmitter {
56
56
  }
57
57
 
58
58
  protected makeLaunchOptions(opts: BrowserServerOptions) {
59
+ // Strip headless=old as it'll cause issues with newer Chromium
60
+ const args = (opts.args ?? []).filter((a) => !a.includes('--headless=old'));
61
+
62
+ if (!args.some((a) => a.startsWith('--headless'))) {
63
+ args.push('--headless=new');
64
+ }
65
+
59
66
  return {
60
67
  ...opts,
61
68
  args: [
62
- ...(opts.args || []),
69
+ ...args,
63
70
  this.userDataDir ? `--user-data-dir=${this.userDataDir}` : '',
64
71
  ],
65
72
  executablePath: this.executablePath(),
@@ -28,7 +28,7 @@ const streamFile = (
28
28
  res: ServerResponse,
29
29
  file: string,
30
30
  contentType?: string,
31
- ) =>
31
+ ): Promise<void> =>
32
32
  new Promise((resolve, reject) => {
33
33
  if (contentType) {
34
34
  logger.debug(`Setting content-type ${contentType}`);