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

clean-scripts

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-scripts - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

21

dist/index.js

@@ -44,4 +44,16 @@ "use strict";

const context = {};
async function execAsync(script, processKey) {
async function spawnAsync(command, args, options, processKey) {
return new Promise((resolve, reject) => {
const subProcess = childProcess.spawn(command, args, options);
subProcess.stdout.pipe(process.stdout);
subProcess.stderr.pipe(process.stderr);
if (processKey) {
context[processKey] = subProcess;
serviceProcesses.push(subProcess);
}
resolve();
});
}
async function execAsync(script) {
return new Promise((resolve, reject) => {
const now = Date.now();

@@ -58,6 +70,2 @@ const subProcess = childProcess.exec(script, { encoding: "utf8" }, (error, stdout, stderr) => {

subProcess.stderr.pipe(process.stderr);
if (processKey) {
context[processKey] = subProcess;
serviceProcesses.push(subProcess);
}
});

@@ -98,4 +106,5 @@ }

printInConsole(script.script);
const scriptParts = script.script.split(" ");
const now = Date.now();
execAsync(script.script, script.processKey);
spawnAsync(scriptParts[0], scriptParts.slice(1), undefined, script.processKey);
return [{ time: Date.now() - now, script: script.script }];

@@ -102,0 +111,0 @@ }

{
"name": "clean-scripts",
"version": "1.4.0",
"version": "1.4.1",
"description": "A CLI tool to make scripts in package.json clean.",

@@ -5,0 +5,0 @@ "main": "dist/core.js",

@@ -151,3 +151,3 @@ [![Dependency Status](https://david-dm.org/plantain-00/clean-scripts.svg)](https://david-dm.org/plantain-00/clean-scripts)

All services will be killed after all scripts end, or any script errors.
All services will be killed(send `SIGINT` actually) after all scripts end, or any script errors.

@@ -154,0 +154,0 @@ ##### short-hand methods

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