Jon Erling Hustadnes
2026-01-05 5208a96a3768e92d203e3d2c6fd3a79e21be64be
refs
author Jon Erling Hustadnes <jonerling.hustadnes@proton.me>
Monday, January 5, 2026 11:34 +0000
committer GitHub <noreply@github.com>
Monday, January 5, 2026 11:34 +0000
commit5208a96a3768e92d203e3d2c6fd3a79e21be64be
tree 56c58492389175673fc0e3ccca98e9ae052dadaf tree | zip | gz
parent 31ea7852fd0665a38de6d41595314019aa8d9109 view | diff
fix(build.ts/startWatching): add option `awaitWriteFinish` with 250ms threshold (#2235)

This makes it so that the events are not fired until the file have stabilized.
This also changes the order of the fired events.
A move / rename now results in `delete` then `add` rather than the other way around.

From `chokidar` README - https://github.com/paulmillr/chokidar?tab=readme-ov-file#performance:
```
awaitWriteFinish.stabilityThreshold (default: 2000). Amount of time in milliseconds for a file size to remain constant before emitting its event.
```

Fixes #2232
1 files modified
1 ■■■■ changed files
quartz/build.ts 1 ●●●● diff | view | raw | blame | history