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
setup parcel watcher according to docs, simply watching a folder [1]
create a sub-folder in that watched folder
create a file in that sub-folder
from the finder (macOS) or explorer (Windows) delete the sub-folder
=> you get a delete event for that folder
undo the operation from the finder / explorer
=> you get a create event but only for the folder, not for the files within
[1]
constwatcher=require('@parcel/watcher');constpath=require('path');asyncfunctionmain(){// Subscribe to eventsletsubscription=awaitwatcher.subscribe(process.cwd(),(err,events)=>{console.log(events);});}main();
The text was updated successfully, but these errors were encountered:
I think that's because when you delete a file, it only moves it to the trash. Then when you undo, it moves it back. So actually macOS delivers a rename event in that case. Not sure there's anything we could do about that short of traversing the entire directory ourselves. But you could also do that in user land - whenever a directory is created assume it might contain children. Do any other watcher libraries handle this?
Steps:
[1]
The text was updated successfully, but these errors were encountered: