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

exec-buffer

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exec-buffer - npm Package Compare versions

Comparing version

to
3.1.0

11

index.js
'use strict';
const fs = require('fs');
const execa = require('execa');
const pFinally = require('p-finally');
const pify = require('pify');
const rimraf = require('rimraf');
const tempfile = require('tempfile');
const fsP = pify(fs);
const rmP = pify(rimraf);
const input = Symbol('inputPath');

@@ -30,5 +34,10 @@ const output = Symbol('outputPath');

return fsP.writeFile(inputPath, opts.input)
const promise = fsP.writeFile(inputPath, opts.input)
.then(() => execa(opts.bin, opts.args))
.then(() => fsP.readFile(outputPath));
return pFinally(promise, () => Promise.all([
rmP(inputPath),
rmP(outputPath)
]));
};

@@ -35,0 +44,0 @@

7

package.json
{
"name": "exec-buffer",
"version": "3.0.0",
"version": "3.1.0",
"description": "Run a buffer through a child process",

@@ -26,4 +26,6 @@ "license": "MIT",

"dependencies": {
"execa": "^0.3.0",
"execa": "^0.5.0",
"p-finally": "^1.0.0",
"pify": "^2.3.0",
"rimraf": "^2.5.4",
"tempfile": "^1.0.0"

@@ -35,2 +37,3 @@ },

"is-gif": "^1.0.0",
"path-exists": "^3.0.0",
"xo": "*"

@@ -37,0 +40,0 @@ },