Vigia

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 paths0
Removed exports1
Changed signatures7
Removed class or interface members33
Changed class or interface members4
Newly deprecated0
Requirement changes (engines, peer dependencies)1
New exports4

Removed exports

importexportkindBefore
chokidarWatchHelperclassclass

Changed signatures

exportBeforeAfter
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 · MatcherObjectinterface{ 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 · FSWInstanceOptionsBasicOpts & { 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

memberimportBefore
FSWatcher._emitchokidar(event: EventName, path: string, stats?: any): Promise<FSWatcher | undefined>
FSWatcher._removechokidar(directory: string, item: string, isDirectory?: boolean | undefined): void
FSWatcher._closerschokidarMap<string, any[]>
FSWatcher._emitRawchokidar(ev: WatchEventType, path: string, opts: unknown): void
FSWatcher._streamschokidarSet<ReaddirpStream>
FSWatcher._watchedchokidarMap<string, DirEntry>
FSWatcher._readdirpchokidar(root: string, opts?: any): any
FSWatcher._throttlechokidar(actionType: ThrottleType, path: string, timeout: number): false | Throttler
FSWatcher._closeFilechokidar(path: string): void
FSWatcher._closePathchokidar(path: string): void
FSWatcher._emitReadychokidar(): void
FSWatcher._isIgnoredchokidar(path: string, stats?: any): boolean
FSWatcher._throttledchokidarMap<ThrottleType, Map<any, any>>
FSWatcher._readyCountchokidarnumber
FSWatcher._boundRemovechokidar(dir: string, item: string): void
FSWatcher._handleErrorchokidar(error: Error): boolean | Error
FSWatcher._isntIgnoredchokidar(path: string, stat?: any): boolean
FSWatcher._userIgnoredchokidarMatchFunction | undefined
FSWatcher._closePromisechokidarPromise<void> | undefined
FSWatcher._ignoredPathschokidarSet<Matcher>
FSWatcher._readyEmittedchokidarboolean
FSWatcher._symlinkPathschokidarMap<string, string | boolean>
FSWatcher._addPathCloserchokidar(path: string, closer: () => void): void
FSWatcher._getWatchedDirchokidar(directory: string): DirEntry
FSWatcher._nodeFsHandlerchokidarNodeFsHandler
FSWatcher._pendingWriteschokidarMap<string, any>
FSWatcher._addIgnoredPathchokidar(matcher: Matcher): void
FSWatcher._incrReadyCountchokidar(): number
FSWatcher._pendingUnlinkschokidarMap<string, [event: EventName, path: string, stats?: any]>
FSWatcher._getWatchHelperschokidar(path: string): WatchHelper
FSWatcher._awaitWriteFinishchokidar(path: string, threshold: number, event: EventName, awfEmit: (err?: Error | undefined, stat?: any) => void): void
FSWatcher._removeIgnoredPathchokidar(matcher: Matcher): void
FSWatcher._hasReadPermissionschokidar(stats: Stats): boolean

Changed class or interface members

memberBeforeAfter
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): voidany
FSWatcherEventMap.raw[ev: WatchEventType, path: string, opts: unknown][ev: WatchEventType, path: string | null, opts: unknown]

Newly deprecated

None detected.

Requirement changes (engines, peer dependencies)

BeforeAfter
engines.node>= 20.19.0—
New exports (4)
importexportkind
chokidarSchedulerinterface
chokidarWatchBackendtype
chokidarSchedulerTimerinterface
chokidarBackendStrategytype

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