chokidar
6.0.0 · 19 Oct 2026MIT292.3M / weekRepositorynpmAtom feed
Upgrading chokidar From 2.1.4 to 6.0.0
30 releases in betweenevery note read
- 3
- changes to make
- 0
- advisories fixed
- 7
- new
- 43
- fixes
Before you upgrade
Tick each one off as you go- Breaking6.0.0
- Breaking5.0.0
- Breaking4.0.0
Security
- 3.5.2
"Update" glob-parent dependency from ~5.1.0 to ~5.1.2 to silence "vulnerability" warnings
Release by release
- Breaking
Required Node.js 22.22 or later.
- New
Added native recursive watching through
fs.watch({ recursive: true }). The defaultautobackend uses it on macOS and Windows and per-directory watching elsewhere. - New
Added the
backendoption:'auto'(default),'native','native-recursive', or'polling'. - Fixed
Fixed a 100% CPU loop when the process working directory containing a relatively watched file was deleted (#1474).
- Breaking
- Fixed
Fix typescript type of emitted args
- Fixed
- New
Strongly type event emitter methods
- Fixed
Fix test "should detect safe-edit" on FreeBSD
- New
4.0.1nothing new or fixed in the note
- Breaking
Bump minimum node.js requirement to v14+
- Breaking
- Fixed
Fix readyCount logic
- Fixed
Handle MustScanSubDirs
- Fixed
- New
Enable dtslinting
- Fixed
Handle promise rejection when a symlink's target does not exist. Fixe…
- Fixed
Improve
addandunwatchTypeScript definitions
- New
37 other lines we could not sort, mostly version bumps
- 6.0.0
Rewrote the watcher around a single observation pipeline. Backend callbacks are treated as invalidations and confirmed with
lstat,stat, orreaddirbefore any event is emitted, so the final state after a burst of changes matches the filesystem. - 6.0.0
- 6.0.0
Replaced
fs.watchFilewith Chokidar-owned stat polling. Poll loops are shared across watchers at the fastest requested interval. - 6.0.0
Renamed
intervalandbinaryIntervaltopollingIntervalandpollingBinaryInterval. - 6.0.0
Changed the
atomicdefault tofalsewith polling. An explicit value is preserved. - 6.0.0
Made
close()terminal:add()now throws once closing has started. Construct a new watcher instead. - 6.0.0
Validated options in the constructor: invalid
backend,atomic,depth,awaitWriteFinish, and polling intervals throwTypeError. - 6.0.0
Emitted errors from
add()aserrorevents instead of unhandled rejections (#1378). - 6.0.0
Made
getWatched()return a null-prototype object, so a watched directory named__proto__is listed (#1493). UseObject.hasOwn()instead ofhasOwnProperty()on the result. - 6.0.0
Stopped applying
ignoredto directories above a path passed towatch()oradd(), so a missing path is still watched through its parent (#1374). Other entries in those directories are still filtered.
3 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.