@ridi/parser-core
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -93,6 +93,4 @@ 'use strict'; | ||
writeStream.on('error', onError); | ||
writeStream.on('close', function () { | ||
return resolve(); | ||
}); | ||
entry.stream() // is DuplexStream. | ||
writeStream.on('close', resolve); | ||
var stream = entry.stream() // is DuplexStream. | ||
.on('error', onError).on('data', function (chunk) { | ||
@@ -106,3 +104,9 @@ /* istanbul ignore if */ | ||
}).on('finish', function () { | ||
return writeStream.end(); | ||
setTimeout(function () { | ||
// Retain a reference to buffer so that it can't be GC'ed too soon. | ||
// Otherwise, EBADF occurs. | ||
// https://github.com/nodejs/node/blob/v10.15.0/lib/fs.js#L462 | ||
stream; // eslint-disable-line no-unused-expressions | ||
}, 200); | ||
writeStream.end(); | ||
}); | ||
@@ -109,0 +113,0 @@ }); |
{ | ||
"name": "@ridi/parser-core", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Utilities for parsers", | ||
@@ -5,0 +5,0 @@ "author": { |
72364
1802