Releases
v2.0.0
sokra
released this
17 Sep 23:59
Features
Polling no longer uses fs.watchFile but polls the directory directly
add ignored
option
add followSymlinks
option
allow all Iterables instead of only Array passes as arguments
Changed API to take an options object
Old API is also accepted without warning (it may be deprecated in the next major)
emit remove
event when files
or directories
are not found during initial scan
It's assumed that they are removed between reading and watching start
add watching of missing
items
Support /RegExp/
for ignored
option
limit maximum number of os watchers on OSX to 2000 and on windows to 10000
limit can be changed with WATCHPACK_WATCHER_LIMIT environment variable
once limit is reached watchers are merged into recursive watchers
merge multiple os watchers from watchers with different options into one os watcher
add logging of recursive watchers when WATCHPACK_RECURSIVE_WATCHER_LOGGING
env var is set
Bugfixes
Normalize readdir result to NFC
Skip watching the root of the filesystem as file even when requested
use options identify instead of stringified options to merge watchers
removals
and changes
in the aggregated
event no longer both contain a file
aggregateTimeout: 0
now works correctly
don't fire change events when files are only read
fix handling of renames that only change the casing of files on a case-insensitive filesystem
Performance
avoid calling process.nextTick
when unneeded on watcher creation
cache time entry map in Watcher
close watchers faster
avoid an unneeded filter call
Dependencies
remove neo-async dependency to be smaller
Contributing
added prettier
node 14 in CI
test watcher limit of 1 on CI
Changes
increase minimum node.js version to 10
initial scan do not fire change events when no start time is provided
improve polling schedule to not try to poll faster than the scanning
You can’t perform that action at this time.