Upgrading chokidar from 5.x to 6.x
Comparison of the public API of chokidar 5.0.0 and 6.0.0, computed automatically from their TypeScript types. A changed signature is a candidate for a breaking change, not a certainty.
Summary
| Removed import paths | 0 |
|---|---|
| Removed exports | 1 |
| Changed signatures | 7 |
| Removed class or interface members | 33 |
| Changed class or interface members | 4 |
| Newly deprecated | 0 |
| Requirement changes (engines, peer dependencies) | 1 |
| New exports | 4 |
Removed exports
| import | export | kind | Before |
|---|---|---|---|
chokidar | WatchHelper | class | class |
Changed signatures
| export | Before | After |
|---|---|---|
chokidar · watch | (paths: string | string[], options?: Partial<BasicOpts & { ignored: Matcher | Matcher[]; awaitWriteFinish: boolean | Partial<AWF>; }> | undefined): FSWatcher | (paths: string | string[], options?: Partial<BasicOptions & { ignored: Matcher | Matcher[]; awaitWriteFinish: boolean | Partial<AWF>; }> | undefined): FSWatcher |
chokidar · default | { watch: (paths: string | string[], options?: Partial<BasicOpts & { ignored: Matcher | Matcher[]; awaitWriteFinish: boolean | Partial<AWF>; }> | undefined) => FSWatcher; FSWatcher: typeof FSWatcher; } | { watch: (paths: string | string[], options?: Partial<BasicOptions & { ignored: Matcher | Matcher[]; awaitWriteFinish: boolean | Partial<AWF>; }> | undefined) => FSWatcher; FSWatcher: typeof FSWatcher; } |
chokidar · Throttler | { timeoutObject: NodeJS.Timeout; clear: () => void; count: number; } | { timeoutObject: SchedulerTimer; clear: (invokeRelease?: boolean | undefined) => number; count: number; } |
chokidar · ThrottleType | "readdir" | "watch" | "add" | "remove" | "change" | "add" | "change" | "readdir" | "watch" | "remove" |
chokidar · MatcherObject | interface | { path: string; recursive?: boolean | undefined; } |
chokidar · ChokidarOptions | { persistent?: boolean | undefined; ignoreInitial?: boolean | undefined; followSymlinks?: boolean | undefined; cwd?: string | undefined; usePolling?: boolean | undefined; interval?: number | undefined; binaryInterval?: number | undefined; alwaysStat?: boolean | undefined; depth?: number | undefined; ignorePermissionErrors?: boolean | undefined; atomic?: number | boolean | undefined; ignored?: Matcher | Matcher[] | undefined; awaitWriteFinish?: boolean | Partial<AWF> | undefined; } | { persistent?: boolean | undefined; ignoreInitial?: boolean | undefined; followSymlinks?: boolean | undefined; cwd?: string | undefined; backend?: WatchBackend | undefined; usePolling?: boolean | undefined; pollingInterval?: number | undefined; pollingBinaryInterval?: number | undefined; interval?: number | undefined; binaryInterval?: number | undefined; alwaysStat?: boolean | undefined; depth?: number | undefined; ignorePermissionErrors?: boolean | undefined; atomic?: number | boolean | undefined; ignored?: Matcher | Matcher[] | undefined; awaitWriteFinish?: boolean | Partial<AWF> | undefined… |
chokidar · FSWInstanceOptions | BasicOpts & { ignored: Matcher[]; awaitWriteFinish: false | AWF; } | BasicOptions & { ignored: readonly Matcher[]; awaitWriteFinish: false | AWF; backendStrategy: BackendStrategy; backendCapabilities: Readonly<{ kind: BackendStrategy; polling: boolean; recursive: boolean; perDirectory: boolean; }>; } |
Removed class or interface members
| member | import | Before |
|---|---|---|
FSWatcher._emit | chokidar | (event: EventName, path: string, stats?: any): Promise<FSWatcher | undefined> |
FSWatcher._remove | chokidar | (directory: string, item: string, isDirectory?: boolean | undefined): void |
FSWatcher._closers | chokidar | Map<string, any[]> |
FSWatcher._emitRaw | chokidar | (ev: WatchEventType, path: string, opts: unknown): void |
FSWatcher._streams | chokidar | Set<ReaddirpStream> |
FSWatcher._watched | chokidar | Map<string, DirEntry> |
FSWatcher._readdirp | chokidar | (root: string, opts?: any): any |
FSWatcher._throttle | chokidar | (actionType: ThrottleType, path: string, timeout: number): false | Throttler |
FSWatcher._closeFile | chokidar | (path: string): void |
FSWatcher._closePath | chokidar | (path: string): void |
FSWatcher._emitReady | chokidar | (): void |
FSWatcher._isIgnored | chokidar | (path: string, stats?: any): boolean |
FSWatcher._throttled | chokidar | Map<ThrottleType, Map<any, any>> |
FSWatcher._readyCount | chokidar | number |
FSWatcher._boundRemove | chokidar | (dir: string, item: string): void |
FSWatcher._handleError | chokidar | (error: Error): boolean | Error |
FSWatcher._isntIgnored | chokidar | (path: string, stat?: any): boolean |
FSWatcher._userIgnored | chokidar | MatchFunction | undefined |
FSWatcher._closePromise | chokidar | Promise<void> | undefined |
FSWatcher._ignoredPaths | chokidar | Set<Matcher> |
FSWatcher._readyEmitted | chokidar | boolean |
FSWatcher._symlinkPaths | chokidar | Map<string, string | boolean> |
FSWatcher._addPathCloser | chokidar | (path: string, closer: () => void): void |
FSWatcher._getWatchedDir | chokidar | (directory: string): DirEntry |
FSWatcher._nodeFsHandler | chokidar | NodeFsHandler |
FSWatcher._pendingWrites | chokidar | Map<string, any> |
FSWatcher._addIgnoredPath | chokidar | (matcher: Matcher): void |
FSWatcher._incrReadyCount | chokidar | (): number |
FSWatcher._pendingUnlinks | chokidar | Map<string, [event: EventName, path: string, stats?: any]> |
FSWatcher._getWatchHelpers | chokidar | (path: string): WatchHelper |
FSWatcher._awaitWriteFinish | chokidar | (path: string, threshold: number, event: EventName, awfEmit: (err?: Error | undefined, stat?: any) => void): void |
FSWatcher._removeIgnoredPath | chokidar | (matcher: Matcher): void |
FSWatcher._hasReadPermissions | chokidar | (stats: Stats): boolean |
Changed class or interface members
| member | Before | After |
|---|---|---|
FSWatcher.add | (paths_: string | string[], _origAdd?: string | undefined, _internal?: boolean | undefined): FSWatcher | (paths_: string | string[]): FSWatcher |
FSWatcher.constructor | (_opts?: Partial<BasicOpts & { ignored: Matcher | Matcher[]; awaitWriteFinish: boolean | Partial<AWF>; }> | undefined): FSWatcher | (_opts?: Partial<BasicOptions & { ignored: Matcher | Matcher[]; awaitWriteFinish: boolean | Partial<AWF>; }> | undefined, scheduler?: Scheduler | undefined): FSWatcher |
FSWatcher.emitWithAll | (event: EventName, args: EmitArgs): void | any |
FSWatcherEventMap.raw | [ev: WatchEventType, path: string, opts: unknown] | [ev: WatchEventType, path: string | null, opts: unknown] |
Newly deprecated
None detected.
Requirement changes (engines, peer dependencies)
| Before | After | |
|---|---|---|
engines.node | >= 20.19.0 | — |
New exports (4)
| import | export | kind |
|---|---|---|
chokidar | Scheduler | interface |
chokidar | WatchBackend | type |
chokidar | SchedulerTimer | interface |
chokidar | BackendStrategy | type |
Give your AI agent these facts
Vigia is a free MCP server: your coding agent checks versions, breaking changes and vulnerabilities before it writes code. No signup, no API key.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Add to CursorAdd to VS Code★ Star on GitHub
Any other MCP client
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Agent skill (SKILL.md): tells the agent when to use Vigia · GitHub Action for pull requests
Frequently asked questions
What are the breaking changes when upgrading chokidar from 5 to 6?
Between chokidar 5.0.0 and 6.0.0, Vigia found 1 removed exports, 7 changed signatures and 37 removed or changed class or interface members.
What became deprecated in chokidar 6?
0 exports or members are newly marked as deprecated in chokidar 6.0.0.
For agents
GET https://vigia.coredls.cloud/v1/packages/npm/chokidar/upgrade?from=5.0.0&to=6.0.0