This is a WIP PR because I am unfamiliar with the testing suite, so it only fixes my problem presently.
The issue is that if you treat cabal.moderation.list as a read stream instead of utilizing its callback, you get this:
Uncaught TypeError: The "chunk" argument must be one of type string, Buffer, or Uint8Array. Received type object
at chunkInvalid (node_modules/readable-stream/lib/_stream_readable.js:313:10)
at readableAddChunk (node_modules/readable-stream/lib/_stream_readable.js:258:31)
at Duplexify.Readable.push (node_modules/readable-stream/lib/_stream_readable.js:241:10)
at Duplexify._forward (node_modules/duplexify/index.js:172:26)
at Readable.onreadable (node_modules/duplexify/index.js:136:10)
at emitReadable_ (node_modules/read-only-stream/node_modules/readable-stream/lib/_stream_readable.js:504:10)
at emitReadable (node_modules/read-only-stream/node_modules/readable-stream/lib/_stream_readable.js:498:62)
at addChunk (node_modules/read-only-stream/node_modules/readable-stream/lib/_stream_readable.js:298:29)
at readableAddChunk (node_modules/read-only-stream/node_modules/readable-stream/lib/_stream_readable.js:278:11)
at Readable.push (node_modules/read-only-stream/node_modules/readable-stream/lib/_stream_readable.js:245:10)
at Readable.ro._read (node_modules/read-only-stream/index.js:22:16)
at DestroyableTransform.<anonymous> (node_modules/read-only-stream/index.js:15:16)
at emitReadable_ (node_modules/readable-stream/lib/_stream_readable.js:538:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
Here's an excerpt from the source that triggers the issue:
The problem is, apparently, that duplexify must be in object mode to handle the objects produced by the stream. This is accomplished by changing duplexify() into duplexify.obj()
This is a WIP PR because I am unfamiliar with the testing suite, so it only fixes my problem presently.
The issue is that if you treat
cabal.moderation.list
as a read stream instead of utilizing its callback, you get this:Here's an excerpt from the source that triggers the issue:
The problem is, apparently, that duplexify must be in object mode to handle the objects produced by the stream. This is accomplished by changing
duplexify()
intoduplexify.obj()