From 096779b4a96ca0d948285c7037d7cf1279f2b065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20L=C3=B3pez?= Date: Fri, 3 Nov 2017 08:32:28 +0100 Subject: [PATCH] Fix: `--aggregate-output` cannot handle large data (fixes #111)(#112) --- lib/run-tasks.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/run-tasks.js b/lib/run-tasks.js index b5484a0..64a4506 100644 --- a/lib/run-tasks.js +++ b/lib/run-tasks.js @@ -10,7 +10,7 @@ // Requirements //------------------------------------------------------------------------------ -const streams = require("memory-streams") +const MemoryStream = require("memorystream") const NpmRunAllError = require("./npm-run-all-error") const runTask = require("./run-task") @@ -110,7 +110,9 @@ module.exports = function runTasks(tasks, options) { const originalOutputStream = options.stdout const optionsClone = Object.assign({}, options) - const writer = new streams.WritableStream() + const writer = new MemoryStream(null, { + readable: false, + }) if (options.aggregateOutput) { optionsClone.stdout = writer diff --git a/package.json b/package.json index 350af12..4ecac80 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "ansi-styles": "^3.2.0", "chalk": "^2.1.0", "cross-spawn": "^5.1.0", - "memory-streams": "^0.1.2", + "memorystream": "^0.3.1", "minimatch": "^3.0.4", "ps-tree": "^1.1.0", "read-pkg": "^2.0.0",