Socket
Socket
Sign inDemoInstall

puppeteer

Package Overview
Dependencies
118
Maintainers
2
Versions
878
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 21.11.0 to 22.0.0

5

lib/cjs/puppeteer/getConfiguration.js

@@ -101,7 +101,2 @@ "use strict";

downloadHost;
configuration.downloadPath =
process.env['PUPPETEER_DOWNLOAD_PATH'] ??
process.env['npm_config_puppeteer_download_path'] ??
process.env['npm_package_config_puppeteer_download_path'] ??
configuration.downloadPath;
}

@@ -108,0 +103,0 @@ configuration.cacheDirectory =

4

lib/cjs/puppeteer/node/cli.js

@@ -15,5 +15,3 @@ #!/usr/bin/env node

const puppeteer_js_1 = __importDefault(require("../puppeteer.js"));
// TODO: deprecate downloadPath in favour of cacheDirectory.
const cacheDir = puppeteer_js_1.default.configuration.downloadPath ??
puppeteer_js_1.default.configuration.cacheDirectory;
const cacheDir = puppeteer_js_1.default.configuration.cacheDirectory;
void new browsers_1.CLI({

@@ -20,0 +18,0 @@ cachePath: cacheDir,

@@ -40,4 +40,3 @@ "use strict";

'latest';
// TODO: deprecate downloadPath in favour of cacheDirectory.
const cacheDir = configuration.downloadPath ?? configuration.cacheDirectory;
const cacheDir = configuration.cacheDirectory;
try {

@@ -44,0 +43,0 @@ const installationJobs = [];

@@ -98,7 +98,2 @@ /**

downloadHost;
configuration.downloadPath =
process.env['PUPPETEER_DOWNLOAD_PATH'] ??
process.env['npm_config_puppeteer_download_path'] ??
process.env['npm_package_config_puppeteer_download_path'] ??
configuration.downloadPath;
}

@@ -105,0 +100,0 @@ configuration.cacheDirectory =

@@ -10,5 +10,3 @@ #!/usr/bin/env node

import puppeteer from '../puppeteer.js';
// TODO: deprecate downloadPath in favour of cacheDirectory.
const cacheDir = puppeteer.configuration.downloadPath ??
puppeteer.configuration.cacheDirectory;
const cacheDir = puppeteer.configuration.cacheDirectory;
void new CLI({

@@ -15,0 +13,0 @@ cachePath: cacheDir,

@@ -37,4 +37,3 @@ /**

'latest';
// TODO: deprecate downloadPath in favour of cacheDirectory.
const cacheDir = configuration.downloadPath ?? configuration.cacheDirectory;
const cacheDir = configuration.cacheDirectory;
try {

@@ -41,0 +40,0 @@ const installationJobs = [];

{
"name": "puppeteer",
"version": "21.11.0",
"version": "22.0.0",
"description": "A high-level API to control headless Chrome over the DevTools Protocol",

@@ -35,3 +35,3 @@ "keywords": [

"engines": {
"node": ">=16.13.2"
"node": ">=18"
},

@@ -128,4 +128,4 @@ "scripts": {

"cosmiconfig": "9.0.0",
"puppeteer-core": "21.11.0",
"@puppeteer/browsers": "1.9.1"
"puppeteer-core": "22.0.0",
"@puppeteer/browsers": "2.0.0"
},

@@ -132,0 +132,0 @@ "devDependencies": {

@@ -184,3 +184,3 @@ # Puppeteer

By default Puppeteer launches Chrome in
[old Headless mode](https://developer.chrome.com/articles/new-headless/).
[the Headless mode](https://developer.chrome.com/articles/new-headless/).

@@ -193,8 +193,12 @@ ```ts

[Chrome 112 launched a new Headless mode](https://developer.chrome.com/articles/new-headless/) that might cause some differences in behavior compared to the old Headless implementation.
In the future Puppeteer will start defaulting to new implementation.
We recommend you try it out before the switch:
Before v22, Puppeteer launched the [old Headless mode](https://developer.chrome.com/articles/new-headless/) by default.
The old headless mode is now known as
[`chrome-headless-shell`](https://developer.chrome.com/blog/chrome-headless-shell)
and ships as a separate binary. `chrome-headless-shell` does not match the
behavior of the regular Chrome completely but it is currently more performant
for automation tasks where the complete Chrome feature set is not needed. If the performance
is more important for your use case, switch to `chrome-headless-shell` as following:
```ts
const browser = await puppeteer.launch({headless: 'new'});
const browser = await puppeteer.launch({headless: 'shell'});
```

@@ -201,0 +205,0 @@

@@ -128,8 +128,2 @@ /**

downloadHost;
configuration.downloadPath =
process.env['PUPPETEER_DOWNLOAD_PATH'] ??
process.env['npm_config_puppeteer_download_path'] ??
process.env['npm_package_config_puppeteer_download_path'] ??
configuration.downloadPath;
}

@@ -136,0 +130,0 @@

@@ -14,6 +14,3 @@ #!/usr/bin/env node

// TODO: deprecate downloadPath in favour of cacheDirectory.
const cacheDir =
puppeteer.configuration.downloadPath ??
puppeteer.configuration.cacheDirectory!;
const cacheDir = puppeteer.configuration.cacheDirectory!;

@@ -20,0 +17,0 @@ void new CLI({

@@ -56,4 +56,3 @@ /**

// TODO: deprecate downloadPath in favour of cacheDirectory.
const cacheDir = configuration.downloadPath ?? configuration.cacheDirectory!;
const cacheDir = configuration.cacheDirectory!;

@@ -60,0 +59,0 @@ try {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc