Gulp 4 - alpha2/alpha3 duplicate path bug
See original GitHub issueBug Origin
gulp.src
is not removing duplicate paths with gulp4 alpha3, but in gulp4 alpha2 it does. We concat ordered paths, then a glob path and it works as expected in alpha2.
What actually happened?
Multiple paths are included when using gulp.src
Please post a sample of your gulpfile (preferably reduced to just the bit that’s not working)
gulp.src(["./lib/angular.js", "./lib/**/*.js"]);
Mulitiple /lib/angular.js
items are listed instead of it filtering duplicate paths. Verified the casing in the filesystem matches the casing in the src
.
What version of gulp are you using? gulp4 alpha3
What versions of npm and node are you using? npm 5.6 (also tried 5.2)
Workaround
Removing the local node_modules
path under node_modules\gulp\node_modules
temporarily fixes this issue, but when you run npm i
again it re-builds this folder and creates the problem again.
In alpha2, there was no node_modules
subdirectory.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top GitHub Comments
From deeper digging, this is a non-trivial problem inside
node-glob
so I’m going to close this as such: The behavior of invalid globs is undefined, especially cross-platform. Please fix your globs by removing non-standard patterns like/./
or/../
.@alohaninja You might also be interested in the
uniqueBy
option as supplied by glob-stream: https://github.com/gulpjs/glob-stream#optionsuniqueby@alohaninja to clarify your assumption: there should be no assumption made that upgrading to a new alpha or the published 4.0.0 should work - there have been breaking changes between each alpha and the published versions. That being said, I want this behavior to be consistent between Windows and Posix, which it currently is not.