hughsk / vinyl-map

Map vinyl files' contents as strings
MIT License
36 stars 7 forks source link

check uses callback provided to flush instead of sending 'end' signal #6

Closed martinraison closed 5 years ago

martinraison commented 10 years ago

I had an issue when using vinyl-map with gulp where the stream would end prematurely (i.e. only some of the files where being processed). I think I've found a fix: according to the node.js stream doc, the flush function should not be sending the end signal directly, instead it should call the provided callback after the flush operation is complete (I guess the callback function eventually triggers the end signal, but not necessarily right away).

Thanks for the nice work!

Antonimo commented 9 years ago

I think I have related problem, while working with about 7212 files only about 3000 files are found in dest folder.

jwoudenberg commented 9 years ago

I've had the same problem where not all processed files where streamed out of vinyl-map. This solution fixes the problem. Thanks @martinraison!

jwoudenberg commented 9 years ago

I just noticed the age of this PR> @hughsk, I think this is a useful tool for quickly writing certain types of gulp plugins but in its current state it's broken. What's the status of this package? Is there a chance you'll merge this, is it deprecated or are you looking for a maintainer?

nelsonpecora commented 8 years ago

I'm implementing this in my fork, but having a bit of trouble testing it. Should be merged in and published sometime later today, though!

qfox commented 8 years ago

@yoshokatana Would be great if you'll enable issues in your fork ;-)

nelsonpecora commented 8 years ago

Oh whoops! Lemme do that

EDIT: Done