Repository for reproduction of a bug of paulmillr/chokidar
This repository is to reproduce #1165 of paulmillr/chokidar.
If cwd option (or, names of ancestor directories) includes special characters of regular expression (e.g. parentheses),
chokidar can’t detect changes on files that it watches.
Start to watch files
cd no-paren-dir && node index.js
Edit and save files
You will see "Edited: <path>" messages in Terminal
Start to watch files
cd "(paren-dir)" && node index.js
Edit and save files
You will NOT see "Edited: <path>" messages in Terminal
While paths of watched files are escaped (i.e. (watched-paren-dir)), cwd option isn’t so and is just treated as a string literal.
chokidar depends on micromatch/anymatch. anymatch can handle escaped string literals as shown in anymatch/index.js of this repository.
More accurately, anymatch internally depends on micromatch/picomatch so picomatch actually handles the escaped strings.
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.