3.1.1
🐛 Bug fixes
Stream is not closed when the receiver is closed (#239)
Previously, we read directories in the stream, even after the receiver is closed. Now we stop reading after closing the receiver by .emit('end')
, .destroy()
or for await...of
.
const fg = require('fast-glob');
(async () => {
const stream = fg.stream('**');
for await (const entry of stream) {
console.log(entry);
return;
}
})();
Most likely, in future releases, we will improve integration with streams (#243).