-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: 🐛 normalize path before check is glob #337
Conversation
"p-limit": "^2.1.0" | ||
"normalize-path": "^3.0.0", | ||
"p-limit": "^2.1.0", | ||
"serialize-javascript": "^1.4.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.1.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't touch this file in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it okay that eslint warning import/no-extraneous-dependencies
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VdustR on what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import normalizePath from 'normalize-path'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, all good, my mistake, tired
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's add test
Codecov Report
@@ Coverage Diff @@
## master #337 +/- ##
========================================
Coverage ? 95.4%
========================================
Files ? 9
Lines ? 283
Branches ? 77
========================================
Hits ? 270
Misses ? 12
Partials ? 1
Continue to review full report at Codecov.
|
normalize the path for wildcard in windows Issues: fix #317
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Please accept CLA |
signed |
src/preProcessPattern.js
Outdated
...pattern.from, | ||
glob: normalizePath(pattern.from.glob), | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Find one interesting thing https://github.com/floatdrop/gulp-watch/blob/master/index.js#L54 , we need add test for '!'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe best place for this here https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/src/utils/escape.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't get it.
Do you mean test '[!]\\hello.txt'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this !(directory)/**/*.txt
(and !(directory)\**\*.txt
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add this logic to https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/src/utils/escape.js, because not only glob
(file
and dir
can also) type can contains /
and \
, we should normalize them too, anyway thanks for PR, i will do new PR and put normalize in right place and with you tests and code
normalize the path for wildcard in windows
Issues: fix #317
This PR contains a:
Motivation / Use-Case
fix #317
Breaking Changes
n/a
Additional Info
fixed in the same way with egoist/poi#533