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

feat: Rollup@1.0 support #532

Merged
merged 6 commits into from Jan 1, 2019

Conversation

Projects
None yet
2 participants
@tivac
Copy link
Owner

commented Jan 1, 2019

Had to change how the plugin reported dependencies, as well as invent a new way of marking files as being replaceable in processor.invalidate(). Used to just .remove() them but the transform hook isn't getting called for unchanged files again, presumably due to the caching layer.

This has the downside of never removing files when they've been deleted/renamed, but I think that's probably ok? We'll see! At the very least it won't be a breaking change to add functionality to check for the file on disk when the watchChange event fires and then removing files that are gone after we've invalidated them.

tivac added some commits Dec 31, 2018

feat: add new invalidate() API
Since removing can be lossy, flagging files is a safer approach.
feat: rollup using .invalidate()
Also moved output line to be more consistent with expecations.

@tivac tivac self-assigned this Jan 1, 2019

@codecov

This comment has been minimized.

Copy link

commented Jan 1, 2019

Codecov Report

Merging #532 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #532      +/-   ##
==========================================
+ Coverage   99.11%   99.13%   +0.01%     
==========================================
  Files          39       40       +1     
  Lines         907      922      +15     
  Branches      135      138       +3     
==========================================
+ Hits          899      914      +15     
  Misses          8        8
Impacted Files Coverage Δ
packages/processor/processor.js 100% <100%> (ø) ⬆️
packages/rollup/rollup.js 100% <100%> (ø) ⬆️
packages/test-utils/rollup-code-snapshot.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 ee1da9a...e78d1df. Read the comment docs.

@tivac tivac merged commit 1fab777 into master Jan 1, 2019

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@tivac tivac deleted the rollup-1 branch Jan 1, 2019

Repository owner deleted a comment from TravisBuddy Jan 1, 2019

@tivac tivac referenced this pull request Jan 4, 2019

Merged

Document and fix this.addWatchFile plugin context function #2633

4 of 9 tasks complete
@lukastaegert

This comment has been minimized.

Copy link

commented Jan 4, 2019

BTW not deleting files is quite in line with what rollup does i.e. just use hashes in watch mode, make some changes and watch your target directory fill up...

I guess we need a dedicated cleanup plugin that uses the "manifest" you get in the generateBundle hook to clean up the diffing files. That is if you use the asset emission API.

tivac added a commit that referenced this pull request Mar 28, 2019

fix: fix walking invalidated dependencies
When invalidation was added in #532 I apparently forgot to account for it withiin the dependency walking code, so invalidated files wouldn't ever be rewalked. This has likely been causing a variety of nasty-to-debug errors in the wild 😞

tivac added a commit that referenced this pull request Mar 28, 2019

fix: fix walking invalidated dependencies
When invalidation was added in #532 I apparently forgot to account for it withiin the dependency walking code, so invalidated files wouldn't ever be rewalked. This has likely been causing a variety of nasty-to-debug errors in the wild 😞

tivac added a commit that referenced this pull request Mar 28, 2019

fix: fix walking invalidated dependencies
When invalidation was added in #532 I apparently forgot to account for it withiin the dependency walking code, so invalidated files wouldn't ever be rewalked. This has likely been causing a variety of nasty-to-debug errors in the wild 😞

@tivac tivac referenced this pull request Mar 28, 2019

Merged

fix: walk invalidated dependencies #573

5 of 9 tasks complete

tivac added a commit that referenced this pull request Mar 28, 2019

fix: walk invalidated dependencies (#573)
When invalidation was added in #532 I apparently forgot to account for it withiin the dependency walking code, so invalidated files wouldn't ever be rewalked. This has likely been causing a variety of nasty-to-debug errors in the wild 😞
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.