fix: build crash when renaming files
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 prior to add rather than the other way around.
Could also have set atomic to false but that could potentially break when using other editors like VSCode or similar that uses atomic writes.
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.
The threshold is intentionally set to a lower value of 250ms, so that we get a decent threshold while retaining snappiness between a save and a rebuild, although could be lowered / raised if needed.
Fixes #2232
built with Refined Cloudflare Pages Action
âš¡ Cloudflare Pages Deployment
| Name | Status | Preview | Last Commit |
|---|---|---|---|
| quartz | ✅ Ready (View Log) | Visit Preview | 1b71f26965461511a887d6cb91082b0c343ffeaa |
@husjon got ahead of me! Found the same, but trying to workaround by retimeouting rebuildlate() with 250ms, keep youre fix. Cause it just config. And it work fine! Thx
// on win11 it bug happened too (Quartz Version: v4.5.2)