Closed iiroj closed 5 years ago
It's not technically necessary to update this as downstream users can simply delete the locked subdep, but given that the previous behavior causes some pretty weird problems (and few people actually know if they have atomic writes on - for example, ST3 supports it but does not use it by default) - I'm fine with merging this.
Thanks!
For what it's worth, our initial fix was re-watching modified files in the handleChange
function:
function handleChange(file) {
watcher.unwatch(file);
watcher.add(file);
const absoluteFile = file.startsWith('/') ? file : path.join(cwd, file);
delete cache[absoluteFile];
delete errors[absoluteFile];
// file is in use by the app, let's restart!
debouncedRestartApp();
}
See link for more info: https://github.com/paulmillr/chokidar/issues/237#issuecomment-461729184
Chokidar had some issues with only detecting changes once per file. This seems to have been in fixed in version
2.1.3
, and I tested that2.1.5
works fine.