Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aroneous
Copy link
Contributor

πŸ”— Linked issue

Resolves #1135

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to 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.

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.
@aroneous aroneous requested a review from danielroe as a code owner November 21, 2025 19:44
@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

πŸ“¦ Bundle Size Comparison

πŸ“ˆ nuxi

Metric Base Head Diff
Rendered 4454.09 KB 4454.51 KB +0.42 KB (+0.01%)

πŸ“ˆ nuxt-cli

Metric Base Head Diff
Rendered 135.16 KB 135.79 KB +0.63 KB (+0.46%)

➑️ create-nuxt

Metric Base Head Diff
Rendered 2376.50 KB 2376.50 KB 0.00 KB (0.00%)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 21, 2025

  • nuxt-cli-playground

    npm i https://pkg.pr.new/create-nuxt@1137
    
    npm i https://pkg.pr.new/nuxi@1137
    
    npm i https://pkg.pr.new/@nuxt/cli@1137
    

commit: 7c3db44

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@b04de4f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/nuxi/src/dev/utils.ts 90.00% 3 Missing ⚠️
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.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 21, 2025

CodSpeed Performance Report

Merging #1137 will not alter performance

Comparing aroneous:fix/1135-mtimes (7c3db44) with main (b04de4f)

Summary

βœ… 2 untouched

@aroneous aroneous marked this pull request as draft November 21, 2025 20:27
Pass all paths through `resolve` to ensure consistent path separators on
Windows.
@aroneous aroneous marked this pull request as ready for review November 21, 2025 20:53
@aroneous
Copy link
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 danielroe changed the title fix(dev): Prime mtimes cache fix(dev): prime mtimes cache when starting dev server Dec 4, 2025
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

believe it or not you fixed the reason the bun server wasn't working on windows!

❀️ πŸŽ‰

@danielroe danielroe merged commit 8079cc1 into nuxt:main Dec 4, 2025
12 checks passed
@github-actions github-actions bot mentioned this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev server constantly restarting on Windows in v3.30.0

3 participants