question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues with libraries using an outdated vinyl version

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

12reactions
carlosvillademorcommented, Jan 4, 2018

Thanks @erikkemperman, upgrading to vinyl-source-stream to 2.0.0 has fixed the issue.

2reactions
phatedcommented, Jan 4, 2018

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).

So it looks like the situation here is that we can now wrap most old vinyls but not all of them (or rather we refuse because we don’t get past the isVinyl() test in dest/prepare). Is it intentional to refuse vinyls < 0.5.3 in this way?

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found