-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
gulp.watch not works if watched glob contains Japanese characters folder name #2153
Comments
This is most likely a bug in one of the underlying libraries gulp uses for file watching. Interestingly, the |
Can you test it with https://github.com/paulmillr/chokidar directly and see if you can reproduce it? If so the issue goes there, if not we can look into it here. Thanks for the report. |
Reproduce it use chokidar. It's a issue with chokidar. const watchGlob = 'フォルダ/**/*';
gulp.task('test', () => {
const chokidar = require('chokidar');
chokidar.watch(watchGlob, (done) => { done() })
.on('change', (path) => {
console.log(`File ${path} changed.`);
});
}); |
This issue is due to |
I think it related to NFD filename on macOSX. |
We've just added a Bug Bounty of $50 on this issue if anyone wants to solve it. |
I think I have the issue narrowed down to a |
The regex was written to only match valid path characters, but this clearly was shortsighted and insensitive to non-English languages. I will get that fixed. |
I'd also happily accept a PR to fix it if someone wants to earn the bounty. Just let me know. |
This is actually going to have to wait until gulp 5.0 to be fixed because it relies on a rewrite of the micromatch parser (which only made sense to be released as a major), and that version will only be used in a version of chokidar that doesn't support all versions of nodejs we support in 4.x |
gulpfile.json
run test task and change
folder/foo
fileresult output is:
change watchGlob
run test task and change
フォルダ/foo
file.result output is:
The text was updated successfully, but these errors were encountered: