-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Negation of patterns including parent directories (../) seems not to work. #306
Comments
Update: Apologies, in the ZIP above, build/gulpfile.js lines 14-15 should look like this: '!../src/File.spec.js',
'!../src/FileSpec.js', (The |
This has already been reported at gulpjs/gulp#2211 There's a workaround in that thread, as we likely won't have a chance to look into this any time soon. |
@phated Thanks! (And for your patience; I searched both here and there, but clearly not well enough. :P) |
@phated Unfortunately, that workaround would involve a major restructure for our project. If I were to try to look into it myself, do you have any tips for how/where I should get started? |
Using the cwd option would be a major refactor? It's likely an issue in node-glob because we rely on it for negation now (we used to do it ourselves but it was massively slower) |
Whoops! Missed that one for the comment before it! 😳 So sorry. |
Awesome. Hope it works. I'll keep this open so we have a reference to the issue in this repo. Thanks for opening it. |
We switched our implementation of to-absolute-glob to a fork that supports this. I'll add a regression test and close this out. |
Given:
File structure:
Glob array:
What were you expecting to happen?
The
!
negation pattern would exclude the spec files from the stream. Given the gulpfile below, I expect to see something like this when I rungulp
:What actually happened?
The negation pattern doesn't seem to apply correctly. Given the gulpfile below, I actually see something like this when I run
gulp
:Please post a sample of your gulpfile (preferably reduced to just the bit that's not working)
gulpfile.js
What version of gulp are you using?
Gulp 4. (Notably, Gulp 3 works as expected.)
What versions of npm and node are you using?
This is a .zip file of the reduced test case as described above. FWIW, the zip also includes a build-with-gulp-v3/ directory that allows comparing to gulp v3.9.1 behavior.
gulp-negation-issue.zip
The text was updated successfully, but these errors were encountered: