Closed WVmf closed 7 years ago
Hi @Zhouzi,
These changes are indeed limited to the test files and don't change anything in the index.js
I encountered the problems with the test files while trying to create a fix for issue #220. For which I'll create another pull request after I get some feedback on that issue regarding the possible valid values for a vinyl
file's cwd
, base
and path
properties.
@Zhouzi LGTY now?
@sindresorhus just merged, might need a new release.
Is it a breaking change?
Nope 👌
Actually, it is a major release because of https://github.com/sindresorhus/gulp-rev/commit/8686e62b380a22976f314687bd3f79ca69cae24f.
Hi, Thank you for merging the changes. Regarding the new release, maybe postpone it a little more because I was planning another pull request for #220.
Ok just saw the new release was already made, so disregard the postponing part of my previous comment :)
Resolves #219
Most of the path module's method will replace forward and backward slashes with the platform specific path separator. And gulp-rev enforces the use of forward slashes for the manifest. The tests didn't take these two behaviors into account, which resulted in mismatches for some test on platforms that use backward slashes as the path separator (i.e. the Windows platform).
These mismatches are resolved by this patch by using
path.normalize()
and.replace(/\\/g, '/')
at the proper places in the tests.