mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
test(compiler-test-utils): the real file watcher in the Vite dev-server harness
The dev-server harness no longer replays file events from a filesystem diff (FIX-PLAN A5, GEN-26). Vite's own chokidar watcher runs in every mode; write() writes files and settle() waits, by events only, for: - the watcher's report of each written file (a test writes like a user, after chokidar's per-file change throttle passed: it drops a second change within that moment), - the end of Vite's handling of each reported event (hotUpdateEnvironments, or the error Vite logs; AsyncLocalStorage ties both to the event), - files plugins wrote meanwhile: a barrier file change, then every app file as the watcher last saw it; until a round sees no new event (a plugin that keeps writing never settles: error after 10 rounds). Full-bundle dev (bundledDev) waits for the dev engine's watcher, the plugins' watchChange hooks of each environment and the dev engine output, instead of forcing a full rebuild. Removed with the replay: FileEventOptions (order, batch) and their tests. The same-contents write test (H.3 load flake) now waits for the watcher's own change event. start-plugin-core (W2-j's file, minimal): the bundledDev factory edit test passed only because the replay forced a full rebuild. Split into a passing #8062 control (bundles again without errors) and a .fails pin: the importer of an edited factory is not recompiled in full-bundle dev (start-compiler-plugin/plugin.ts:412-424). Verified red without .fails: "expected [ 'assets/a.js' ] to deeply equal []". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b41f212a15
commit
cdbf47fc0b
4 changed files with 757 additions and 403 deletions
Loading…
Add table
Add a link
Reference in a new issue