New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

playwright-chromium

Package Overview
Dependencies
Maintainers
1
Versions
4823
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playwright-chromium - npm Package Compare versions

Comparing version

to
0.11.1-next.1584644386005

13

index.js

@@ -16,10 +16,15 @@ /**

*/
const path = require('path');
const {Playwright} = require('playwright-core/lib/server/playwright.js');
module.exports = new Playwright({
downloadPath: __dirname,
const playwright = new Playwright({
browsers: ['chromium'],
respectEnvironmentVariables: true,
});
module.exports = playwright;
try {
const downloadedBrowsers = require('./.downloaded-browsers.json');
playwright.chromium._executablePath = downloadedBrowsers.crExecutablePath;
} catch (e) {
throw new Error('playwright-chromium has not downloaded Chromium.');
}

@@ -16,4 +16,8 @@ /**

*/
const {downloadBrowser} = require('playwright-core/download-browser');
const playwright = require('.');
downloadBrowser(playwright.chromium);
const path = require('path');
const fs = require('fs');
const {downloadBrowserWithProgressBar} = require('playwright-core/download-browser');
(async function() {
const crExecutablePath = await downloadBrowserWithProgressBar(path.join(__dirname, '.local-browsers', 'chromium'), 'chromium');
await fs.promises.writeFile(path.join(__dirname, '.downloaded-browsers.json'), JSON.stringify({crExecutablePath}));
})();
{
"name": "playwright-chromium",
"version": "0.11.1-next.1584577781703",
"version": "0.11.1-next.1584644386005",
"description": "A high-level API to automate Chromium",

@@ -15,4 +15,4 @@ "repository": "github:Microsoft/playwright",

"dependencies": {
"playwright-core": "=0.11.1-next.1584577781703"
"playwright-core": "=0.11.1-next.1584644386005"
}
}