Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(builder): only listen for file changes for supported extensions #5812

Merged
merged 1 commit into from
May 27, 2019

Conversation

pimlie
Copy link

@pimlie pimlie commented May 26, 2019

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

  • the patterns used for listening to file changes contained some duplicates, removed those
  • the workaround for recreating the watcher on raw events on linux is not needed anymore due to fixed in chokidar (left the code in for now, it just isnt used by default anymore as the config is empty)
  • made all patterns less greedy by always only listening for supported file extensions

Eg listening on a directory without the supported file extensions could be prone to unnecessary reloads due to file changes which are not used by Nuxt. Eg *.swp, *~ or *.bak files used by editors

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@pimlie pimlie requested a review from a team May 26, 2019 15:54
@pi0 pi0 changed the title fix: only listen for file changes for supported extensions fix(builder): only listen for file changes for supported extensions May 26, 2019
@codecov-io
Copy link

Codecov Report

Merging #5812 into dev will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #5812      +/-   ##
==========================================
+ Coverage   95.68%   95.72%   +0.03%     
==========================================
  Files          82       82              
  Lines        2688     2687       -1     
  Branches      689      689              
==========================================
  Hits         2572     2572              
+ Misses         98       97       -1     
  Partials       18       18
Flag Coverage Δ
#e2e 100% <ø> (ø) ⬆️
#fixtures 50.42% <50%> (+0.05%) ⬆️
#unit 92.7% <100%> (+0.03%) ⬆️
Impacted Files Coverage Δ
packages/config/src/config/_common.js 100% <ø> (ø) ⬆️
packages/builder/src/builder.js 99.6% <100%> (-0.01%) ⬇️
packages/vue-renderer/src/renderer.js 94.3% <0%> (+0.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f74362...4cefc7b. Read the comment docs.

@pi0 pi0 requested review from Atinux and clarkdo May 26, 2019 16:26
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Locally tested. Works fine!

Copy link
Contributor

@kevinmarrec kevinmarrec left a comment

Choose a reason for hiding this comment

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

Nice !

Regarding Builder supportedExtensions and incoming TypeScript refactors, I planned to make the array editable/extendable from nuxt.config options. So that we can remove ts and tsx extensions from core and only extend with these 2 TS extensions through new refactored typescript module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants