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

concurrently

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

concurrently - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

20

bin/concurrently.spec.js

@@ -63,3 +63,3 @@ const readline = require('readline');

describe('exitting conditions', () => {
describe('exiting conditions', () => {
it('is of success by default when running successful commands', done => {

@@ -83,4 +83,4 @@ run('"echo foo" "echo bar"')

it('is of success when --success=first and first command succeeds', done => {
run('--success=first "echo foo" "exit 1"')
it('is of success when --success=first and first command to exit succeeds', done => {
run('--success=first "echo foo" "sleep 0.5 && exit 1"')
.close

@@ -93,4 +93,4 @@ .subscribe(exit => {

it('is of failure when --success=first and first command fails', done => {
run('--success=first "exit 1" "echo foo"')
it('is of failure when --success=first and first command to exit fails', done => {
run('--success=first "exit 1" "sleep 0.5 && echo foo"')
.close

@@ -103,4 +103,4 @@ .subscribe(exit => {

it('is of success when --success=last and last command succeeds', done => {
run('--success=last "exit 1" "echo foo"')
it('is of success when --success=last and last command to exit succeeds', done => {
run('--success=last "exit 1" "sleep 0.5 && echo foo"')
.close

@@ -113,4 +113,4 @@ .subscribe(exit => {

it('is of failure when --success=last and last command fails', done => {
run('--success=last "echo foo" "exit 1"')
it('is of failure when --success=last and last command to exit fails', done => {
run('--success=last "echo foo" "sleep 0.5 && exit 1"')
.close

@@ -135,3 +135,3 @@ .subscribe(exit => {

it('is aliased to -s', done => {
run('-s last "exit 1" "echo foo"')
run('-s last "exit 1" "sleep 0.5 && echo foo"')
.close

@@ -138,0 +138,0 @@ .subscribe(exit => {

{
"name": "concurrently",
"version": "4.0.0",
"version": "4.0.1",
"description": "Run commands concurrently",

@@ -5,0 +5,0 @@ "main": "index.js",

const Rx = require('rxjs');
const { map, switchMap, take } = require('rxjs/operators');
const { bufferCount, map, switchMap, take } = require('rxjs/operators');

@@ -12,3 +12,5 @@ module.exports = class CompletionListener {

const closeStreams = commands.map(command => command.close);
return Rx.zip(...closeStreams).pipe(
const allClosed = Rx.zip(...closeStreams);
return Rx.merge(...closeStreams).pipe(
bufferCount(closeStreams.length),
map(exitCodes => {

@@ -15,0 +17,0 @@ switch (this.successCondition) {

@@ -43,7 +43,7 @@ const { TestScheduler } = require('rxjs/testing');

describe('with success condition set to first', () => {
it('succeeds if first process exited with code 0', () => {
it('succeeds if first process to exit has code 0', () => {
const result = createController('first').listen(commands);
commands[0].close.next(0);
commands[1].close.next(1);
commands[1].close.next(0);
commands[0].close.next(1);

@@ -55,7 +55,7 @@ scheduler.flush();

it('fails if first process exited with non-0 code', () => {
it('fails if first process to exit has non-0 code', () => {
const result = createController('first').listen(commands);
commands[0].close.next(1);
commands[1].close.next(0);
commands[1].close.next(1);
commands[0].close.next(0);

@@ -69,7 +69,7 @@ scheduler.flush();

describe('with success condition set to last', () => {
it('succeeds if last process exited with code 0', () => {
it('succeeds if last process to exit has code 0', () => {
const result = createController('last').listen(commands);
commands[0].close.next(1);
commands[1].close.next(0);
commands[1].close.next(1);
commands[0].close.next(0);

@@ -81,7 +81,7 @@ scheduler.flush();

it('fails if first process exited with non-0 code', () => {
it('fails if last process to exit has non-0 code', () => {
const result = createController('last').listen(commands);
commands[0].close.next(0);
commands[1].close.next(1);
commands[1].close.next(0);
commands[0].close.next(1);

@@ -88,0 +88,0 @@ scheduler.flush();

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