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

Run transform hooks again in watch mode on files that errored #3388

Merged
merged 1 commit into from Feb 14, 2020

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
Resolves #3386
Resolves rollup/plugins#186

Description

This is a very simple fix that will make sure that after changing an errored file back to its previous state in watch mode, transform hooks will run again on this file. The diagnostics of @rollup/plugin-typescript depends on this and it is really a sensible approach IMO. This fix is solely in rollup.watch and works by checking if a thrown error has an id property. This id is then removed from the cache before the next run.

@codecov
Copy link

codecov bot commented Feb 13, 2020

Codecov Report

Merging #3388 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3388      +/-   ##
==========================================
+ Coverage   93.27%   93.27%   +<.01%     
==========================================
  Files         172      172              
  Lines        6082     6084       +2     
  Branches     1812     1813       +1     
==========================================
+ Hits         5673     5675       +2     
  Misses        218      218              
  Partials      191      191
Impacted Files Coverage Δ
src/watch/index.ts 85.58% <100%> (+0.26%) ⬆️

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 f3d3cd8...6fe4cce. Read the comment docs.

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