Socket
Socket
Sign inDemoInstall

@puppeteer/browsers

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@puppeteer/browsers - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4

15

lib/cjs/fileUtil.js

@@ -39,7 +39,5 @@ "use strict";

const path = __importStar(require("path"));
const util_1 = require("util");
const extract_zip_1 = __importDefault(require("extract-zip"));
const tar_fs_1 = __importDefault(require("tar-fs"));
const unbzip2_stream_1 = __importDefault(require("unbzip2-stream"));
const exec = (0, util_1.promisify)(child_process_1.exec);
/**

@@ -91,4 +89,9 @@ * @internal

async function installDMG(dmgPath, folderPath) {
const { stdout } = await exec(`hdiutil attach -nobrowse -noautoopen "${dmgPath}"`);
const volumes = stdout.match(/\/Volumes\/(.*)/m);
const { stdout } = (0, child_process_1.spawnSync)(`hdiutil`, [
'attach',
'-nobrowse',
'-noautoopen',
dmgPath,
]);
const volumes = stdout.toString('utf8').match(/\/Volumes\/(.*)/m);
if (!volumes) {

@@ -107,8 +110,8 @@ throw new Error(`Could not find volume path in ${stdout}`);

const mountedPath = path.join(mountPath, appName);
await exec(`cp -R "${mountedPath}" "${folderPath}"`);
(0, child_process_1.spawnSync)('cp', ['-R', mountedPath, folderPath]);
}
finally {
await exec(`hdiutil detach "${mountPath}" -quiet`);
(0, child_process_1.spawnSync)('hdiutil', ['detach', mountPath, '-quiet']);
}
}
//# sourceMappingURL=fileUtil.js.map

17

lib/esm/fileUtil.js

@@ -6,11 +6,9 @@ /**

*/
import { exec as execChildProcess, spawnSync } from 'child_process';
import { spawnSync } from 'child_process';
import { createReadStream } from 'fs';
import { mkdir, readdir } from 'fs/promises';
import * as path from 'path';
import { promisify } from 'util';
import extractZip from 'extract-zip';
import tar from 'tar-fs';
import bzip from 'unbzip2-stream';
const exec = promisify(execChildProcess);
/**

@@ -61,4 +59,9 @@ * @internal

async function installDMG(dmgPath, folderPath) {
const { stdout } = await exec(`hdiutil attach -nobrowse -noautoopen "${dmgPath}"`);
const volumes = stdout.match(/\/Volumes\/(.*)/m);
const { stdout } = spawnSync(`hdiutil`, [
'attach',
'-nobrowse',
'-noautoopen',
dmgPath,
]);
const volumes = stdout.toString('utf8').match(/\/Volumes\/(.*)/m);
if (!volumes) {

@@ -77,8 +80,8 @@ throw new Error(`Could not find volume path in ${stdout}`);

const mountedPath = path.join(mountPath, appName);
await exec(`cp -R "${mountedPath}" "${folderPath}"`);
spawnSync('cp', ['-R', mountedPath, folderPath]);
}
finally {
await exec(`hdiutil detach "${mountPath}" -quiet`);
spawnSync('hdiutil', ['detach', mountPath, '-quiet']);
}
}
//# sourceMappingURL=fileUtil.js.map
{
"name": "@puppeteer/browsers",
"version": "2.2.3",
"version": "2.2.4",
"description": "Download and launch browsers",

@@ -98,10 +98,10 @@ "scripts": {

"dependencies": {
"debug": "4.3.4",
"extract-zip": "2.0.1",
"progress": "2.0.3",
"proxy-agent": "6.4.0",
"tar-fs": "3.0.5",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.2",
"semver": "7.6.0"
"debug": "^4.3.5",
"extract-zip": "^2.0.1",
"progress": "^2.0.3",
"proxy-agent": "^6.4.0",
"tar-fs": "^3.0.6",
"unbzip2-stream": "^1.4.3",
"yargs": "^17.7.2",
"semver": "^7.6.2"
},

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

@@ -7,7 +7,6 @@ /**

import {exec as execChildProcess, spawnSync} from 'child_process';
import {spawnSync} from 'child_process';
import {createReadStream} from 'fs';
import {mkdir, readdir} from 'fs/promises';
import * as path from 'path';
import {promisify} from 'util';

@@ -18,4 +17,2 @@ import extractZip from 'extract-zip';

const exec = promisify(execChildProcess);
/**

@@ -69,7 +66,10 @@ * @internal

async function installDMG(dmgPath: string, folderPath: string): Promise<void> {
const {stdout} = await exec(
`hdiutil attach -nobrowse -noautoopen "${dmgPath}"`
);
const {stdout} = spawnSync(`hdiutil`, [
'attach',
'-nobrowse',
'-noautoopen',
dmgPath,
]);
const volumes = stdout.match(/\/Volumes\/(.*)/m);
const volumes = stdout.toString('utf8').match(/\/Volumes\/(.*)/m);
if (!volumes) {

@@ -90,6 +90,6 @@ throw new Error(`Could not find volume path in ${stdout}`);

await exec(`cp -R "${mountedPath}" "${folderPath}"`);
spawnSync('cp', ['-R', mountedPath, folderPath]);
} finally {
await exec(`hdiutil detach "${mountPath}" -quiet`);
spawnSync('hdiutil', ['detach', mountPath, '-quiet']);
}
}

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc