Before 7.0.0, when the stream errored, the currently buffered data would be available as error.bufferedData. Since 7.0.0, this is not the case anymore, except when maxBuffer is hit.
Re-adding this feature should be fairly simple and non-breaking, since the data is already being buffered in the code, i.e. we'd only need to add a try/catch handler that sets error.bufferedData = getBufferedValue(). I'm happy to submit a PR if that sounds good.
This issue is preventing Execa from upgrading get-stream from v6 to v7. This is because Execa sets error.stdout, error.stderr and error.all using the logic described above.
Before
7.0.0
, when the stream errored, the currently buffered data would be available aserror.bufferedData
. Since7.0.0
, this is not the case anymore, except whenmaxBuffer
is hit.Re-adding this feature should be fairly simple and non-breaking, since the data is already being buffered in the code, i.e. we'd only need to add a
try
/catch
handler that setserror.bufferedData = getBufferedValue()
. I'm happy to submit a PR if that sounds good.This issue is preventing Execa from upgrading
get-stream
from v6 to v7. This is because Execa setserror.stdout
,error.stderr
anderror.all
using the logic described above.https://github.com/sindresorhus/execa/blob/65992b418816b965d2e3f89b44d3c259ecd0c99a/lib/stream.js#L75-L89