Socket
Socket
Sign inDemoInstall

ava-init

Package Overview
Dependencies
45
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.1.4

25

index.js

@@ -9,3 +9,2 @@ 'use strict';

var Promise = require('pinkie-promise');
var pify = require('pify');
var arrExclude = require('arr-exclude');

@@ -49,6 +48,22 @@ var DEFAULT_TEST_SCRIPT = 'echo "Error: no test specified" && exit 1';

return opts.skipInstall ? Promise.resolve(post) :
pify(childProcess.exec, Promise)('npm install --save-dev ava', {
cwd: path.dirname(pkgPath)
}).then(post);
if (opts.skipInstall) {
post();
return Promise.resolve();
}
var child = childProcess.spawn('npm', ['install', '--save-dev', 'ava'], {
cwd: path.dirname(pkgPath),
stdio: 'inherit'
});
return new Promise(function (resolve, reject) {
child.on('error', reject);
child.on('exit', function (code) {
if (code) {
reject(new Error('npm command exited with non-zero exit code'));
}
post();
resolve();
});
});
};

3

package.json
{
"name": "ava-init",
"version": "0.1.3",
"version": "0.1.4",
"description": "Add AVA to your project",

@@ -36,3 +36,2 @@ "license": "MIT",

"arr-exclude": "^1.0.0",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0",

@@ -39,0 +38,0 @@ "read-pkg-up": "^1.0.1",

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