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): call watch:restart after watch:fileChanged hook #5620

Merged
merged 3 commits into from
Apr 29, 2019

Conversation

clarkdo
Copy link
Member

@clarkdo clarkdo commented Apr 29, 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

@pi0 Should this be deprecacted ? I don't see any doc is refering it.

If there is anyone using it, this may be a slightly breaking change since there is no builder as param anymore.

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.

pi0
pi0 previously approved these changes Apr 29, 2019
@pi0 pi0 changed the title refactor(builder): move watch:fileChanged to deprecated hook refactor(builder): deprecate watch:fileChanged hook Apr 29, 2019
@pi0
Copy link
Member

pi0 commented Apr 29, 2019

@clarkdo Yes. Although almost all hooks should be deprecated in flavor on new namespaces with nuxt 3. This may just be annoying for some module users that are using this hook. Not something emergency.

Still if you feel is good to deprecate sooner feel free to merge. But i vote for deprecating all once with a single PR in flavor of better namespaces.

@clarkdo
Copy link
Member Author

clarkdo commented Apr 29, 2019

@pi0 Yes, a separated pr make sense.

@clarkdo clarkdo changed the title refactor(builder): deprecate watch:fileChanged hook refactor(builder): execute watch:fileChanged after watch:fileChanged Apr 29, 2019
@clarkdo
Copy link
Member Author

clarkdo commented Apr 29, 2019

@pi0 I reverted the deprecation change and make hooks run in-order

@manniL manniL changed the title refactor(builder): execute watch:fileChanged after watch:fileChanged refactor(builder): execute watch:restart after watch:fileChanged Apr 29, 2019
@manniL
Copy link
Member

manniL commented Apr 29, 2019

@clarkdo I tried to fix the PR titled ☺️

@codecov-io
Copy link

codecov-io commented Apr 29, 2019

Codecov Report

Merging #5620 into dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##             dev   #5620   +/-   ##
=====================================
  Coverage   95.7%   95.7%           
=====================================
  Files         81      81           
  Lines       2633    2633           
  Branches     670     670           
=====================================
  Hits        2520    2520           
  Misses        95      95           
  Partials      18      18
Impacted Files Coverage Δ
packages/builder/src/builder.js 100% <100%> (ø) ⬆️

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 56d5c0c...243968c. Read the comment docs.

@pi0
Copy link
Member

pi0 commented Apr 29, 2019

If we allow async watch handlers, promise rejection should be somehow handled. Probably via a console.fatal or error.

@clarkdo
Copy link
Member Author

clarkdo commented Apr 29, 2019

The handler is async now since callHook returns promise, the changing in this pr is just keeping order of the execution.

About the rejection, will restart hook process it by calling console.fatal now ?

@pi0
Copy link
Member

pi0 commented Apr 29, 2019

@clarkdo Both previously and now errors was unhandled. It was an enhancenment idea to catch and pipe errors to core/nuxt

@clarkdo
Copy link
Member Author

clarkdo commented Apr 29, 2019

@clarkdo Both previously and now errors was unhandled. It was an enhancenment idea to catch and pipe errors to core/nuxt

Cool, let me add it

@pi0 Can this line cover the case ?

@pi0
Copy link
Member

pi0 commented Apr 29, 2019

@Clark right. I didn't remembered that.

@pi0 pi0 changed the title refactor(builder): execute watch:restart after watch:fileChanged fix(builder): call watch:restart after watch:fileChanged hook Apr 29, 2019
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.

5 participants