sindresorhus / gulp-filter

Filter files in a `vinyl` stream
MIT License
315 stars 37 forks source link

Add support for relative parent paths #78

Closed cb1kenobi closed 7 years ago

cb1kenobi commented 7 years ago

With this fix, paths can now reference files outside the current working directory. So now, the pattern **/*.js will match ../../some/file.js

The only caveat is your pattern has to start with ** to match the resolved absolute paths of relative parent paths. In other words, you must do**/test/**/*.js in order to match ../../test/file.js and not match ../../src/code.js. This is a limitation of minimatch, not gulp-filter, gulp, or this PR.

Fixes #74.

nfroidure commented 7 years ago

Node 0.12 and lower are broken but i think we should drop its support (2 LTS versions behind us). Also, i think we should add a major version since it may break some existing code. Otherwise i think we should merge this since it looks like a lot of people could benefit from it.

We still have the choice to make this behavior optional and only bump a minor version.

sindresorhus commented 7 years ago

I'll drop Node.js 0.12 support after this PR is merged. Just ignore the failure for now.