You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gulp.watch not works if watched glob contains Japanese characters folder name #2153
This is most likely a bug in one of the underlying libraries gulp uses for file watching. Interestingly, the フォルダ/** and フォルダ/* glob patterns do react as expected, as does changing a file like フォルダ/foo/bar.
I think I have the issue narrowed down to a RegExp in the nanomatch package. This issue is not restricted to Japanese, but to any directory that doesn't end in 0-9, a-z, A-Z, or _. I opened micromatch/nanomatch#18.
but to any directory that doesn't end in 0-9, a-z, A-Z, or _.
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.
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
Activity
rgroothuijsen commentedon Apr 30, 2018
This is most likely a bug in one of the underlying libraries gulp uses for file watching. Interestingly, the
フォルダ/**andフォルダ/*glob patterns do react as expected, as does changing a file likeフォルダ/foo/bar.yocontra commentedon Apr 30, 2018
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.
aruku7230 commentedon May 12, 2018
Reproduce it use chokidar. It's a issue with chokidar.
sttk commentedon May 12, 2018
This issue is due to
micromatchwhich is used inchokidar.MasatoMakino commentedon Aug 23, 2018
I think it related to NFD filename on macOSX.
NFD's "ダ" is "タ" + " " ".
NFD's "ダ" chrcode deffer from NFC's "ダ" chrcode.
phated commentedon Nov 14, 2018
We've just added a Bug Bounty of $50 on this issue if anyone wants to solve it.
pe8ter commentedon Nov 18, 2018
I think I have the issue narrowed down to a
RegExpin thenanomatchpackage. This issue is not restricted to Japanese, but to any directory that doesn't end in0-9,a-z,A-Z, or_. I opened micromatch/nanomatch#18.jonschlinkert commentedon Nov 18, 2018
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.
jonschlinkert commentedon Nov 18, 2018
I'd also happily accept a PR to fix it if someone wants to earn the bounty. Just let me know.
phated commentedon Apr 20, 2019
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