fix(dev): prime mtimes cache when starting dev server#1137
Merged
fix(dev): prime mtimes cache when starting dev server#1137
Conversation
When watching for file/directory changes, prime the FileChangeTracker with initial mtimes of the tracked files, such that if the first notification received for a file is spurious (does not represent an actual change), shouldEmitChange will return 'false'. Without this, the 'priming' happened via several reloads/restarts, but with the introduction of the ForkPool, the FileChangeTracker cache no longer perists across restarts, never allowing it to become populated. Result: unpredictable restarts.
Contributor
📦 Bundle Size Comparison📈 nuxi
📈 nuxt-cli
➡️ create-nuxt
|
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1137 +/- ##
=======================================
Coverage ? 24.12%
=======================================
Files ? 89
Lines ? 4767
Branches ? 252
=======================================
Hits ? 1150
Misses ? 3585
Partials ? 32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #1137 will not alter performanceComparing Summary
|
Pass all paths through `resolve` to ensure consistent path separators on Windows.
Contributor
Author
|
Fixed Windows-specific issues (yeah, the fix is for Windows in the first place, but I developed in on a Mac for silly reasons). I don't think the remaining test failure is related to this change. |
danielroe
approved these changes
Dec 4, 2025
Member
danielroe
left a comment
There was a problem hiding this comment.
believe it or not you fixed the reason the bun server wasn't working on windows!
❤️ 🎉
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
Resolves #1135
❓ Type of change
📚 Description
When watching for file/directory changes, prime the FileChangeTracker with initial mtimes of the tracked files, such that if the first notification received for a file is spurious (does not represent an actual change), shouldEmitChange will return 'false'.
Without this, the 'priming' happened via several reloads/restarts, but with the introduction of the ForkPool, the FileChangeTracker cache no longer perists across restarts, never allowing it to become populated. Result: unpredictable restarts.