A clear and concise description of what the bug is.
Versions (please complete the following information):
Chokidar version 3.5.3
Node version 16.18.1
OS version: MacOS 13.0.1
To Reproduce:
1.
const chokidar = require('chokidar');
// Initialize watcher.
const watcher = chokidar.watch(process.cwd().toLowerCase(), {
ignored: /(^|[\/\\])\../, // ignore dotfiles
persistent: true
});
// Something to use when events are received.
const log = console.log.bind(console);
// Add event listeners.
watcher
.on('add', path => log(`File ${path} has been added`))
.on('change', path => log(`File ${path} has been changed`))
.on('unlink', path => log(`File ${path} has been removed`))
.on('ready', () => log('Initial scan complete. Ready for changes '))
.on('raw', (event, path, details) => { // internal
log('Raw event info:', event, path, details);
});
run the script above
modify the content of a file in the directory
Observe only the Raw event is fired.
terminate the node process running the script
Remove toLowerCase from the script
run the script again
modify the the file
observe both change and raw events are fired.
Most valuable could be one or more test cases for test.js to demonstrate the problem.
Expected behavior
when the watched dir on MacOS has incorrect case only the Raw event is fired. When the watched dir has the correct case both Raw and Changed are fired. Looks like change event has stricter case sensitive implementation. I would expect Raw and Changed to be consistent either both fire or both don't.
Additional context
Add any other context about the problem here.
Optionally nice to know what project you are working on.
Describe the bug
A clear and concise description of what the bug is.
Versions (please complete the following information):
1.
Most valuable could be one or more test cases for test.js to demonstrate the problem.
Expected behavior when the watched dir on MacOS has incorrect case only the Raw event is fired. When the watched dir has the correct case both Raw and Changed are fired. Looks like change event has stricter case sensitive implementation. I would expect Raw and Changed to be consistent either both fire or both don't.
Additional context Add any other context about the problem here. Optionally nice to know what project you are working on.