Issues with libraries using an outdated vinyl version
See original GitHub issueI don’t really know if it belongs here, but I’m getting errors when upgrading to vinyl-fs version 3.x.
Several libraries (the ones are found are gulp-watch and vinyl-source-stream) are using an outdated vinyl version, which causes errors using vfs.dest.
See
https://github.com/floatdrop/gulp-watch/issues/295 https://github.com/hughsk/vinyl-source-stream/issues/23
For now I’ve solved it internally by wrapping the outdated vinyl object in a new one:
import through = require('through2');
import File = require('vinyl');
/**
* gulp-watch/vinyl-source-stream uses an outdated vinyl, which doesn't have some functions which vinyl-fs expects.
* Can be removed when gulp-watch updates it to vinyl 2.x.
* @returns {NodeJS.ReadWriteStream}
*/
export function upgrade(): NodeJS.ReadWriteStream {
return through.obj(function(file: any, encoding: string, cb: through.TransformCallback): void {
const upgradedFile = new File(file);
cb(null, upgradedFile);
});
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
Are We On the Right Track? Issues With LP Record ...
Issues With LP Record Collections in U.S. Academic Libraries." (Mar ... Turntables are not yet obsolete but they are becoming less.
Read more >Vinyl never left the library, but it returns in style
Don't worry, all LPs can be placed on hold and sent to any of our library branches. Also in exciting news: LPs are...
Read more >THEY GOT VINYL AT MY LOCAL LIBRARY - Reddit
I work at the central library in Los Angeles, we don't have video games (yet) but we do have blue rays. We also...
Read more >Program National Recording Preservation Plan
For recorded sound discs—either vinyl recordings or compact discs—handle them ... Does the Library of Congress have a copy of every recording ever...
Read more >Digitizing old vinyl records! - Copyright Advisory Network
If that owner prefers his or her music to be issued in a remastered digital version rather than one that sounds like a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @erikkemperman, upgrading to vinyl-source-stream to 2.0.0 has fixed the issue.
I want to note that you must have vinyl-buffer version 1.0.1 when upgrading to vinyl-source-stream 2.0.0 because it required a patch to make everything work. (It looks like @carlosvillademor already had that version).
@erikkemperman yes, it was intentional because those versions are missing critical parts to the ecosystem. Vinyl 0.5.3 came with gulp-util, so that’s what most people would be using. I might have been able to slip a 0.4.6 -> 0.5.3 change into vinyl-source-stream but I want people to upgrade to 2.0.0 so I don’t really care to do that now.