Minimal and efficient cross-platform file watching library
12.2k
Stars
630
Forks
43
Open issues
30
Contributors
AI Analysis
Chokidar is a minimal, efficient cross-platform file watching library for Node.js that normalizes filesystem events across macOS, Linux, and Windows. It serves developers building build tools, dev servers, and file-watching applications who need reliable file change detection without the quirks of native fs.watch. It is not a general-purpose application but a foundational library used by millions of repositories.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Chokidar: The de facto Node.js file watcher powering ~30 million repositories
Chokidar is a cross-platform file watching library for Node.js that normalizes and enriches the raw, unreliable events emitted by Node's built-in fs.watch and fs.watchFile APIs. It handles edge cases like atomic writes, chunked writes, recursive watching, symbolic links, and filename reporting on macOS — things the native API gets wrong or omits. Built originally for the Brunch build tool in 2012, it became a transitive dependency for Webpack, Vite, Jest, Parcel, and dozens of other foundational JavaScript tooling projects. Its audience is effectively every JavaScript developer using a build tool or dev server.
Created in April 2012 by Paul Miller for the Brunch build tool, Chokidar filled a gap in Node.js's unreliable native fs.watch API. It grew primarily through transitive adoption by major build tools and bundlers rather than direct installation.
Growth was largely organic and transitive: as Webpack, Grunt, Gulp, Jest, and later Vite adopted Chokidar, it became embedded in the Node.js tooling supply chain. The v4 release (Sep 2024) dramatically reduced dependencies from 13 to 1, and v5 (Nov 2025) went ESM-only with Node 20 minimum, signaling a deliberate modernization push rather than coasting on legacy status. Star growth has plateaued (5 stars/week) because saturation is near-total in the Node.js tooling space.
README claims ~30 million dependent repositories on npm, which is verifiable via npm's dependency graph. Vite, Webpack, Jest, Parcel, and Brunch are known transitive dependents. npm weekly download badges are displayed prominently. At this scale, the project is a critical piece of Node.js infrastructure with production validation at massive scale.
Appears to use Node.js fs.watch as the default backend with polling (fs.watchFile) as fallback. Likely wraps OS-level inotify/FSEvents/ReadDirectoryChangesW through Node.js core rather than native bindings, which explains the single remaining dependency count after v4. Event normalization, debouncing, and recursive traversal are handled in userland TypeScript code based on README descriptions.
Not documented in README
Last push was May 12, 2026 — approximately 40 days before evaluation date, indicating active maintenance. Two major versions shipped within 14 months (v4 in Sep 2024, v5 in Nov 2025), showing deliberate stewardship. The dependency reduction from 13 to 1 is a concrete maintenance improvement. Repository activity appears healthy, not just passive.
ADOPT IF: you are building Node.js tooling, dev servers, build pipelines, or any application that needs reliable cross-platform file change detection — this is the established standard with massive production validation. AVOID IF: you need a language-agnostic CLI watcher (use fswatch/watchman) or you require extremely high performance at the OS level for millions of files (consider Watchman directly). MONITOR IF: you maintain a large Node.js project currently on v3 — the v4/v5 breaking changes (glob removal, ESM-only) may require migration planning.
Independent dimensions
Mainstream potential
6/10
Technical importance
8/10
Adoption evidence
10/10
- v5's ESM-only stance and Node 20 minimum creates a migration burden for projects on older toolchains or CommonJS-only environments, potentially driving some users to fork or pin v4.
- Removal of glob support in v4 is a breaking API change that may affect users who relied on glob patterns for path filtering, requiring them to rewrite watch configurations.
- Relies entirely on Node.js's own fs.watch/fs.watchFile which have known platform-specific quirks (especially on networked filesystems, Docker volumes, and WSL); Chokidar normalizes but cannot fully fix kernel-level limitations.
- Single maintainer stewardship (paulmillr) creates bus-factor risk for a project that is critical infrastructure for tens of millions of repositories.
- The polling fallback (usePolling) can cause significant CPU overhead in environments without native OS events (e.g., some CI containers, network mounts), which may surprise users unfamiliar with the underlying behavior.
Chokidar is likely to remain the default file watcher in the Node.js ecosystem for the foreseeable future due to deep transitive embedding. The ESM modernization path positions it well for the next several years of Node.js evolution.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Website
- https://paulmillr.com
- Language
- TypeScript
- License
- MIT
- Last updated
- 3d ago
- Created
- 173mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Watching a non-existent nested path silently stops its parent directory's subtree from being watched
Windows: false change events for watched files when many sibling files are written
v4: duplicate "add" events for unchanged files (same inode/birthtime/size) — intermittent under directory activity
Replacing watched directory with a file of the same name hangs process
Persistent watch stopped after watched directory is removed
Recent releases
Similar repos
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
12.2k | +9 | TypeScript | 9/10 | 3d ago |
|
|
5.6k | — | C++ | 8/10 | 2mo ago |
|
|
13.6k | — | C++ | 8/10 | 17h ago |
|
|
3.4k | — | Rust | 8/10 | 3d ago |
|
|
7.4k | — | Python | 8/10 | 2d ago |
|
|
10.7k | — | Go | 8/10 | 2mo ago |
Watchman is a standalone daemon written in C++ with a client-server architecture offering higher performance at scale. It's used by Meta's internal tooling and React Native CLI, but requires a separate installation and is overkill for most Node.js projects. Chokidar is zero-friction by comparison.
fswatch is a CLI/C++ library suited for shell scripting and non-Node environments. It has no npm integration, making it irrelevant for the Node.js tooling use case Chokidar dominates.
fsnotify is the Go ecosystem's equivalent — serves the same niche for Go tooling (used in Hugo, etc.) as Chokidar does for Node.js. They don't compete; they're language-ecosystem counterparts.
Python ecosystem equivalent. Similar positioning — cross-platform file watching for Python tooling. No overlap with Chokidar's JavaScript target.
The baseline that Chokidar improves upon. fs.watch is unreliable across platforms (no filenames on macOS, duplicate events, no recursive watching on Linux). Chokidar's entire value proposition is the normalization layer on top of it.