Closed lexi-lambda closed 8 years ago
I'll take a look. Thanks.
Not sure why upgrading vinyl-fs breaks the tests.
The codebase here has been updated with the latest version of vinyl-fs. Can you clone this repo and link it to your project to see if it works? If not, it should be available on npm soon.
Fixed in 2.0.0.
79c2a0e
I've managed to track down the source of a fairly subtle bug to this dependency. The bug does not appear to be in gulp-useref itself, but in the vinyl-fs dependency. However, vinyl-fs has fixed this bug in version 2.0.0, so it is gulp-useref that now needs to be updated to use the new version. (In fact, the bug is in a dependency of vinyl-fs as well, which has been updated in the new version, but that is irrelevant.)
The bug rarely comes up, but when it does, it's hard to figure out what's causing it. It's easy to demonstrate, though:
The result of
fs.stat
will not be an instance offs.Stats
, which is a guarantee that should be maintained. As far as I can tell, this bug originates in https://github.com/isaacs/node-graceful-fs/issues/31, but it percolates up through the dependencies.Unfortunately, I tried updating vinyl-fs myself, but that causes the tests to fail, so it'll take some tweaking beyond just updating the dependency.