Skip to content

Commit 4e0abb5

Browse files
committed
chore: Set a lower stabilityThreshold for chokidar
The default is 2000ms. Since we are usually working with relatively small files in an NPM package, a lower value should be still OK.
1 parent 906c6c6 commit 4e0abb5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/project.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ async function watch_dependencies(packed_dependencies, { cwd, modules_path }) {
226226
const ignored_paths = (await Promise.all(globed_dependencies.map(({ local_package_path }) => get_ignore_rules(local_package_path)))).flat();
227227

228228
const watcher = chokidar.watch(files_to_watch, {
229-
awaitWriteFinish: true,
229+
awaitWriteFinish: {
230+
stabilityThreshold: 200,
231+
},
230232
// We compare the paths manually, because glob-patterns were not working on MacOS with folder-specific ignore rules (eg. `/tests`),
231233
// only if we explicitly set the rule to `/tests/**/*`. We could check each rule, whether it is a folder, and add `/**/*` respectively,
232234
// but that seems to be even more expensive. (Probably related to: https://github.com/paulmillr/chokidar/issues/773)

0 commit comments

Comments
 (0)