-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: bundle closing #3883
feat: bundle closing #3883
Conversation
I've thought about making |
Codecov Report
@@ Coverage Diff @@
## master #3883 +/- ##
=======================================
Coverage 97.07% 97.08%
=======================================
Files 187 187
Lines 6538 6548 +10
Branches 1901 1904 +3
=======================================
+ Hits 6347 6357 +10
Misses 101 101
Partials 90 90
Continue to review full report at Codecov.
|
Another consideration I made is that |
It's more or less ready, there's still a few more tests to be added, that covers stuff like |
Thanks a lot, this was quick! Give me a few days to fully review this and answer all questions.
This means that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really nice! So what we would need to release this from my side would be:
- Refine watch mode handling, see my thoughts in the comment, what do you think? Do we need to extend documentation somewhere?
- Add missing test(s), but there is not a lot missing.
If you want, I can certainly help with tests. |
I guess it does not matter much for now, from my side we can leave it writable. We could designate it as |
Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
If you don't mind 😅 |
50deed3
to
0d25a8c
Compare
I added a test so coverage can pass. One question as we are currently having issues with our Windows tests not running on CI: Could you check if you can enable Github Actions for your forked repository? https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#managing-github-actions-permissions-for-your-repository |
Seems to be already enabled on my forked repository. |
What's the best way on handling bundle close in |
|
So we shouldn't close it at all for
Which test does it belong to? Hooks or sanity checks? |
Of course we should close it. And we should also await it in case a plugin throws an error in that hook so that we can display that error.
Feels more like a hooks test to me this time. |
hmm, not exactly sure how to cover the tests for watch-cli closing the bundle |
I will have a look |
By the way, if you are in watch mode and want to write a plugin that retains resources across builds, then there is the
|
Added the remaining test |
248756e
to
4ccb224
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from my side now. If CI runs through and coverage looks fine, this can be released from my side.
🎉 |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
#3881
Description
close
method toRollupBuild
which runscloseBundle
hook and prevents any further use ofgenerate
andwrite
closeBundle
hook in case of build failurecloseBundle
hook from being run when build fails in watch modeclose
method on CLI build completion.