0.4.6 clone() docs don't match the implementation
strugee opened this issue · 4 comments
https://github.com/gulpjs/vinyl/tree/v0.4.6#clone says that custom attributes are deep-cloned, but this isn't the case - they're only deep-cloned if true
is passed to clone()
.
Probably the docs should read something like:
Returns a new File object with all attributes cloned. Custom attributes are shallow-cloned unless you pass
true
, in which case they're deep-cloned.
I'm happy to provide a PR for this, but I'd need a branch created as you can't send PRs against tags (obviously).
It looks so. Not sure I really want to muck with the history again to fix this when we are very past that version.
Yeah, normally I'd agree with you but I think it makes sense in this case since Gulp 3 has such a wide user base.
To be clear I'm not advocating for rewriting history, just branching from the relevant commit
And re-tagging or bumping which I'm not going to do. If this issue is present in gulp docs, I'll take a change there but not on this library.
gulp 3.9.1 use vinyl 0.4.6 (through vinyl-fs)
gulp-util 3.0.8 use vinyl 0.5.3
and vinyl's lastest version is 2.0.1
the API and the vinyl object diff from different versions, very easy to get confused.