cli
cli copied to clipboard
fix(dev): Prime mtimes cache
🔗 Linked issue
Resolves #1135
❓ Type of change
- [ ] 📖 Documentation (updates to the documentation or readme)
- [x] 🐞 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.
📦 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%) |
-
npm i https://pkg.pr.new/create-nuxt@1137npm i https://pkg.pr.new/nuxi@1137npm i https://pkg.pr.new/@nuxt/cli@1137
commit: 7c3db44
Codecov Report
:x: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
:warning: 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 :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1137 +/- ##
=======================================
Coverage ? 24.12%
=======================================
Files ? 89
Lines ? 4767
Branches ? 252
=======================================
Hits ? 1150
Misses ? 3585
Partials ? 32
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
CodSpeed Performance Report
Merging #1137 will not alter performance
Comparing aroneous:fix/1135-mtimes (7c3db44) with main (b04de4f)
Summary
✅ 2 untouched
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.