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

spawndamnit

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spawndamnit - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

8

index.js

@@ -7,3 +7,2 @@ // @flow

const ChildProcessPromise = require('./promise');
const ChildProcessError = require('./error');

@@ -51,7 +50,3 @@ const activeProcesses = new Set();

activeProcesses.delete(child);
if (code === 0) {
resolve({ code, stdout, stderr });
} else {
reject(new ChildProcessError({ code, stdout, stderr }));
}
resolve({ code, stdout, stderr });
});

@@ -63,2 +58,1 @@ });

module.exports.ChildProcessPromise = ChildProcessPromise;
module.exports.ChildProcessError = ChildProcessError;

2

package.json
{
"name": "spawndamnit",
"version": "1.0.0",
"version": "2.0.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "description": "Take care of your `spawn()`",

@@ -26,12 +26,2 @@ # spawndamnit

async function main() {
await spawn('npm', ['star', 'spawndamnit']);
}
```
**With events and resolved values:**
```js
const spawn = require('spawndamnit');
async function main() {
let child = spawn('npm', ['star', 'spawndamnit']);

@@ -43,21 +33,5 @@

let { code, stdout, stderr } = await child;
// ...
}
```
**With errors:**
```js
const spawn = require('spawndamnit');
async function main() {
try {
await spawn('npm', ['star', 'spawndamnit']);
} catch (err) {
if (err instanceof spawn.ChildProcessError) {
let { code, stdout, stderr } = err;
// ...
}
}
console.log(code === 0 ? 'success' : 'error');
}
```
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