Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sparticuz/chromium

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sparticuz/chromium - npm Package Compare versions

Comparing version 121.0.0 to 122.0.0

16

build/index.d.ts

@@ -67,16 +67,16 @@ /** Viewport taken from https://github.com/puppeteer/puppeteer/blob/main/docs/api/puppeteer.viewport.md */

* Returns the headless mode.
* `true` means the 'old' (legacy, chromium < 112) headless mode.
* "new" means the 'new' headless mode.
* "chrome-headless-shell" means the 'old' (legacy, chromium < 112) headless mode.
* `true` means the 'new' headless mode.
* https://developer.chrome.com/articles/new-headless/#try-out-the-new-headless
* @returns true | "new"
* @returns true | "chrome-headless-shell"
*/
static get headless(): true | "new";
static get headless(): true | "chrome-headless-shell";
/**
* Sets the headless mode.
* `true` means the 'old' (legacy, chromium < 112) headless mode.
* "new" means the 'new' headless mode.
* "chrome-headless-shell" means the 'old' (legacy, chromium < 112) headless mode.
* `true` means the 'new' headless mode.
* https://developer.chrome.com/articles/new-headless/#try-out-the-new-headless
* @default "new"
* @default "chrome-headless-shell"
*/
static set setHeadlessMode(value: true | "new");
static set setHeadlessMode(value: true | "chrome-headless-shell");
/**

@@ -83,0 +83,0 @@ * Returns whether the graphics stack is enabled or disabled

@@ -154,2 +154,3 @@ "use strict";

"--single-process", // Needs to be single-process to avoid `prctl(PR_SET_NO_NEW_PRIVS) failed` error
"--font-render-hinting=none", // https://github.com/puppeteer/puppeteer/issues/2410#issuecomment-560573612
];

@@ -181,3 +182,3 @@ const chromiumDisableFeatures = [

const headlessFlags = [
this.headless === "new" ? "--headless='new'" : "--headless",
this.headless === "chrome-headless-shell" ? "--headless='chrome-headless-shell'" : "--headless",
];

@@ -268,6 +269,6 @@ return [

* Returns the headless mode.
* `true` means the 'old' (legacy, chromium < 112) headless mode.
* "new" means the 'new' headless mode.
* "chrome-headless-shell" means the 'old' (legacy, chromium < 112) headless mode.
* `true` means the 'new' headless mode.
* https://developer.chrome.com/articles/new-headless/#try-out-the-new-headless
* @returns true | "new"
* @returns true | "chrome-headless-shell"
*/

@@ -279,11 +280,11 @@ static get headless() {

* Sets the headless mode.
* `true` means the 'old' (legacy, chromium < 112) headless mode.
* "new" means the 'new' headless mode.
* "chrome-headless-shell" means the 'old' (legacy, chromium < 112) headless mode.
* `true` means the 'new' headless mode.
* https://developer.chrome.com/articles/new-headless/#try-out-the-new-headless
* @default "new"
* @default "chrome-headless-shell"
*/
static set setHeadlessMode(value) {
if ((typeof value === "string" && value !== "new") ||
if ((typeof value === "string" && value !== "chrome-headless-shell") ||
(typeof value === "boolean" && value !== true)) {
throw new Error(`Headless mode must be either \`true\` or 'new', you entered '${value}'`);
throw new Error(`Headless mode must be either \`true\` or 'chrome-headless-shell', you entered '${value}'`);
}

@@ -318,3 +319,3 @@ this.headlessMode = value;

*/
Chromium.headlessMode = "new";
Chromium.headlessMode = "chrome-headless-shell";
/**

@@ -321,0 +322,0 @@ * If true, the graphics stack and webgl is enabled,

{
"name": "@sparticuz/chromium",
"version": "121.0.0",
"version": "122.0.0",
"description": "Chromium Binary for Serverless Platforms",

@@ -40,9 +40,9 @@ "keywords": [

"follow-redirects": "^1.15.5",
"tar-fs": "^3.0.4"
"tar-fs": "^3.0.5"
},
"devDependencies": {
"@tsconfig/node16": "^16.1.1",
"@tsconfig/strictest": "^2.0.2",
"@tsconfig/strictest": "^2.0.3",
"@types/follow-redirects": "^1.14.4",
"@types/node": "^20.11.10",
"@types/node": "^20.11.19",
"@types/tar-fs": "^2.0.4",

@@ -49,0 +49,0 @@ "clean-modules": "^3.0.4",

@@ -53,3 +53,5 @@ # @sparticuz/chromium

// Optional: If you'd like to use the legacy headless mode. "new" is the default.
// Optional: If you'd like to use the new headless mode. "chrome-headless-shell" is the default.
// NOTE: Because we build the chrome-headless-shell binary, this option does not work.
// However, this option will stay so when we migrate to full chromium it will work.
chromium.setHeadlessMode = true;

@@ -167,3 +169,3 @@

This version of `chromium` is built using the `headless.gn` build variables, which does not appear to even include a GUI. [Also, at this point, AWS Lambda 2 does not support a modern version of `glibc`](https://github.com/aws/aws-lambda-base-images/issues/59), so this package does not include an ARM version yet, which means it will not work on any M Series Apple products. If you need to test your code using a headful or ARM version, please use your locally installed version of `chromium/chrome`, or you may use the `puppeteer` provided version.
This version of `chromium` is built using the `headless.gn` build variables, which does not appear to even include a GUI. [Also, at this point, AWS Lambda 2 does not support a modern version of `glibc`](https://github.com/aws/aws-lambda-base-images/issues/59), so this package does not include an ARM version yet, which means it will not work on any M Series Apple products. If you need to test your code using a headful or ARM version, please use your locally installed version of `chromium/chrome`, or you may use the `puppeteer` provided version. Users have reported installing `rosetta` on MacOS will also work.

@@ -263,4 +265,4 @@ ```shell

| `executablePath(location?: string)` | `Promise<string>` | Returns the path the Chromium binary was extracted to. |
| `setHeadlessMode` | `void` | Sets the headless mode to either `true` or `"new"` |
| `headless` | `true \| "new"` | Returns `true` or `"new"` depending on what version of chrome's headless you are running |
| `setHeadlessMode` | `void` | Sets the headless mode to either `true` or `"chrome-headless-shell"` |
| `headless` | `true \| "chrome-headless-shell"` | Returns `true` or `"chrome-headless-shell"` depending on what version of chrome's headless you are running |
| `setGraphicsMode` | `void` | Sets the graphics mode to either `true` or `false` |

@@ -267,0 +269,0 @@ | `graphics` | `boolean` | Returns a boolean depending on whether webgl is enabled or disabled |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc