chokidar icon indicating copy to clipboard operation
chokidar copied to clipboard

allow watch for recursive not existing folder

Open exx8 opened this issue 6 years ago • 7 comments
trafficstars

Solves #872

This pull request allows user to watch specific not existing folders. Was achieved via introducing a new function _mostSpecifiedExistingAncestor We should consider making the function public, as users might be interested in this functionality.

exx8 avatar Oct 09 '19 19:10 exx8

We need tests for that feature. Also, ensure you conform to chokidar code style e.g. { locations.

paulmillr avatar Oct 09 '19 21:10 paulmillr

I added tests.

exx8 avatar Oct 10 '19 12:10 exx8

I've made the changes that you asked.

exx8 avatar Oct 14 '19 16:10 exx8

Ping?

exx8 avatar Oct 20 '19 10:10 exx8

If i’m reading this correctly, we’ll have a huge performance degradation because of the new IO call for every file. Need to investigate this thoroughly and so some benchmarks.

paulmillr avatar Oct 23 '19 05:10 paulmillr

If i’m reading this correctly, we’ll have a huge performance degradation because of the new IO call for every file. Need to investigate this thoroughly and so some benchmarks.

maybe we should use a flag to enable or disable this functionality?

exx8 avatar Oct 24 '19 20:10 exx8

This needs a rebase. Also the curly brackets shouldn't be placed on new lines, there's an extra space in a test message and extra newlines.

XhmikosR avatar Oct 27 '19 08:10 XhmikosR