Socket
Socket
Sign inDemoInstall

wsrun

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wsrun - npm Package Compare versions

Comparing version 2.1.1 to 3.0.0

8

build/index.js

@@ -37,5 +37,3 @@ #!/usr/bin/env node

const packageJsonWorkspacesNohoistFormat = packageJsonWorkspaces && packageJsonWorkspaces.packages;
const workspaceGlobs = packageJsonWorkspacesNohoistFormat || packageJsonWorkspaces || [
'packages/*'
];
const workspaceGlobs = packageJsonWorkspacesNohoistFormat || packageJsonWorkspaces || ['packages/*'];
const pkgs = workspace_1.listPkgs('./', workspaceGlobs);

@@ -65,5 +63,3 @@ const pkgPaths = _.mapValues(_.keyBy(pkgs, p => p.json.name), v => v.path);

if (hadError && fastExit) {
console.error(chalk_1.default.red(`\nAborting execution and cancelling running scripts because an error occurred executing \`${cmd}\` for one of the packages.`));
console.error(' Run wsrun without option --fast-exit to keep going despite errors or with option --report to see which package caused the error.\n');
console.error();
console.error(chalk_1.default.red(`Aborted execution due to previous error`));
}

@@ -70,0 +66,0 @@ process.exit(hadError ? 1 : 0);

@@ -26,2 +26,3 @@ /// <reference types="node" />

readonly exitCode: Promise<number>;
readonly exitError: Promise<void>;
doneCriteria?: RegExp;

@@ -28,0 +29,0 @@ constructor(cmd: string, pkgName: string, opts: CmdOptions);

@@ -63,2 +63,8 @@ "use strict";

}
get exitError() {
return this.exitCode.then(c => {
if (c != 0)
throw new Error('`' + this.cmd + '` failed with exit code ' + c);
});
}
start() {

@@ -244,2 +250,4 @@ this._start(this.cmd);

});
if (this.opts.mode === 'parallel')
finished = Promise.resolve();
return finished;

@@ -296,2 +304,3 @@ });

return Promise.all(pkgs.map(pkg => this.lookupOrRun(cmd, pkg)))
.then(() => Promise.all(this.children.map(c => c.exitError)))
.catch(err => this.opts.fastExit && this.closeAll())

@@ -298,0 +307,0 @@ .then(() => this.checkResultsAndReport(cmd, pkgs));

{
"name": "wsrun",
"version": "2.1.1",
"version": "3.0.0",
"description": "executes commands on packages in parallel, but is aware of the dependencies between them",

@@ -44,3 +44,4 @@ "main": "./build/index.js",

"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"prepublish": "tsc"
},

@@ -47,0 +48,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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