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.1 to 1.4.2

26

dist/index.js

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

const context = {};
async function spawnAsync(command, args, options, processKey) {
async function execAsync(script, isService, 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();

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

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

@@ -76,3 +70,3 @@ }

printInConsole(script);
const time = await execAsync(script);
const time = await execAsync(script, false);
return [{ time, script }];

@@ -107,5 +101,4 @@ }

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

@@ -143,2 +136,3 @@ }

printInConsole("script success.");
process.exit();
}, error => {

@@ -145,0 +139,0 @@ printInConsole(error);

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

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

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