File watching errors no longer blow up as unhandled crashes when nothing is listening for them.
What's wrong with this entry?
The watcher checks the error listener count before emitting, so a watch error or an error during a pending write can no longer surface as an unhandled 'error' event.
- Check sits alongside the existing ENOENT/ENOTDIR filtering and the
ignorePermissionErrorsoption. - In the pending-write path, when no error listeners are registered the pending write is discarded rather than emitting an ERROR event.
_pendingWrites, ignorePermissionErrors
Strings lifted out of the shipped bundle, so the claim above can be checked against them.