concurrently
Advanced tools
Comparing version 3.6.0 to 3.6.1
{ | ||
"name": "concurrently", | ||
"version": "3.6.0", | ||
"version": "3.6.1", | ||
"description": "Run commands concurrently", | ||
@@ -5,0 +5,0 @@ "main": "src/main.js", |
@@ -475,3 +475,3 @@ #!/usr/bin/env node | ||
const prefixes = getPrefixes(childrenInfo, child); | ||
const prefixType = config.prefix || prefixes.name ? 'name' : 'index'; | ||
const prefixType = config.prefix || (prefixes.name ? 'name' : 'index'); | ||
if (_.includes(_.keys(prefixes), prefixType)) { | ||
@@ -478,0 +478,0 @@ return '[' + prefixes[prefixType] + '] '; |
@@ -120,2 +120,35 @@ 'use strict'; | ||
it('--prefix can contain PID', () => { | ||
const collectedLines = []; | ||
return run('node ./src/main.js --prefix pid "echo one" "echo two"', { | ||
onOutputLine(line) { | ||
collectedLines.push(line); | ||
} | ||
}).then(() => { | ||
assert.ok(collectedLines.every(line => /^\[\d+\] /.test(line))); | ||
}); | ||
}); | ||
it('--prefix can contain command itself', () => { | ||
const collectedLines = []; | ||
return run('node ./src/main.js --prefix "[{command}]" "echo one" "echo two"', { | ||
onOutputLine(line) { | ||
collectedLines.push(line); | ||
} | ||
}).then(() => { | ||
assert.ok(collectedLines.every(line => /^\[echo (one|two)\] /.test(line))); | ||
}); | ||
}); | ||
it('--prefix can contain time', () => { | ||
const collectedLines = []; | ||
return run('node ./src/main.js --prefix time "echo one" "echo two"', { | ||
onOutputLine(line) { | ||
collectedLines.push(line); | ||
} | ||
}).then(() => { | ||
assert.ok(collectedLines.every(line => /^\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}\] /.test(line))); | ||
}); | ||
}); | ||
it('--prefix should default to "index"', () => { | ||
@@ -122,0 +155,0 @@ const collectedLines = []; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
547881
1240