npm / chokidar
chokidar
What changed in chokidar 3 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
13 breaking3 deprecations3 new APIs and options3 performance1 behavior and defaults1 tooling26 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initchokidar 639 changes
Breaking changes 7
Errors from
add()are emitted aserrorevents instead of unhandled rejections.Defaults to
falsewith polling; an explicitly provided value is preserved.Closing is terminal:
add()now throws once closing has started, so construct a new watcher instead.Returns a null-prototype object, allowing a watched directory named
__proto__to be listed; useObject.hasOwn()rather thanhasOwnProperty()on the result.Is no longer applied to directories above a path passed to
watch()oradd(), allowing missing paths to be watched through their parent; other entries remain filtered.Requires Node.js 22.22 or later.
The constructor throws
TypeErrorfor invalid backend, atomic, depth, awaitWriteFinish, or polling interval options.
Deprecations 3
Remains available as a deprecated alias for
pollingBinaryInterval; the new name wins when both are given.Remains available as a deprecated alias for
pollingInterval; the new name wins when both are given.Remains available as a deprecated alias for
backend: 'polling'.
New APIs and options 3
Adds backend selection with
autoas the default, plusnative,native-recursive, andpollingchoices.Replaces
binaryIntervalas the binary-file polling interval option; when both names are given, the new name wins.Replaces
intervalas the polling interval option; when both names are given, the new name wins.
Performance 1
Replaces
fs.watchFilewith Chokidar-owned polling loops shared across watchers at the fastest requested interval.
Fixes and other changes 25
Fixes watching an array of absolute file paths.
Unchanged files under directory activity no longer produce duplicate
addevents.Fixes changes not being detected after the second save.
A change to one file under Deno no longer reports
changefor every file.The newest differing change is replayed when the throttling window closes instead of being discarded.
Backend callbacks are treated as invalidations and confirmed against the filesystem before events are emitted, so the final state after a burst of changes matches the filesystem.
Fixes spurious
unlinkandunlinkDirevents for every entry when watching a filesystem root.Ignored files and directories are no longer watched in WSL.
Re-watching a path now honors
ignoreInitial.Fixes
UNKNOWNerrors fromfs.watchon macOS sockets that prevented watching/var/run.Watching a missing nested path no longer stops its parent directory's subtree from being watched.
Fixes
EISDIRerrors during the initial scan of network drives.Files created between scanning a newly added directory and registering its watch are no longer missed.
Persistent watching no longer stops after a watched directory is removed.
Fixes a 100% CPU loop when the working directory containing a relatively watched file is deleted.
Relative
ignoredstrings now resolve againstcwdor the process working directory.A symlink target passing through a regular file no longer disables watching its directory or prevents
ready.Removed files are reported as
unlinkinstead ofunlinkDir.Fixes unwatching a deleted watched directory on Windows.
Native handles are shared across watchers and opened per directory rather than per file, fixing
EBADFerrors when watching many files on macOS.Replacing a watched directory with a file of the same name no longer hangs the process.
Any path passed to
watch()oradd()is awaited from its nearest existing parent, so deletion followed by recreation is reported.Files are detected even when their directory did not exist before watching.
Fixes false
changeevents on Windows when many sibling files are written.Fixes renaming a watched directory containing subdirectories on Windows.
chokidar 53 changes
Breaking changes 2
The package is ESM-only, so developers can no longer consume it as CommonJS.
The minimum supported Node.js version is v20.19.
Fixes and other changes 1
Types are more precise, improving the type information available to developers.
chokidar 45 changes
Breaking changes 3
Bundled fsevents was removed.
Glob support was removed, so developers can no longer use glob patterns with chokidar.
The minimum Node.js requirement is now v14+.
Behavior and default changes 1
The package became hybrid CommonJS and ESM.
Tooling 1
Emitted types are more precise, improving the type information available to developers.
chokidar 33 changes
Breaking changes 1
Node.js 8 or newer is required.
Performance 2
CPU and RAM consumption improved.
Package and dependencies size was reduced 17-fold.