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

Prevent exit before stdout is drained #4983

Merged
merged 2 commits into from May 9, 2023
Merged

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:

Description

This will ensure that stdout is closed and drained before manually exiting Rollup. Unfortunately, I am not sure if it is possible to test this properly.

@vercel
Copy link

vercel bot commented May 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview May 6, 2023 0:49am

@github-actions
Copy link

github-actions bot commented May 6, 2023

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#fix-process-exit

or load it into the REPL:
https://rollup-oa1nn141m-rollup-js.vercel.app/repl/?pr=4983

@codecov
Copy link

codecov bot commented May 6, 2023

Codecov Report

Merging #4983 (62c5609) into master (7423175) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4983   +/-   ##
=======================================
  Coverage   98.99%   98.99%           
=======================================
  Files         222      222           
  Lines        8131     8133    +2     
  Branches     2239     2239           
=======================================
+ Hits         8049     8051    +2     
  Misses         28       28           
  Partials       54       54           
Impacted Files Coverage Δ
cli/cli.ts 60.00% <100.00%> (+10.00%) ⬆️

@lukastaegert lukastaegert merged commit f77409a into master May 9, 2023
12 checks passed
@lukastaegert lukastaegert deleted the fix-process-exit branch May 9, 2023 20:02
@rollup-bot
Copy link
Collaborator

This PR has been released as part of rollup@3.21.6. You can test it via npm install rollup.

@lukastaegert
Copy link
Member Author

I will revert this change as it caused too many issues elsewhere, see #5004.

lukastaegert added a commit that referenced this pull request May 20, 2023
lukastaegert added a commit that referenced this pull request May 21, 2023
lukastaegert added a commit that referenced this pull request May 21, 2023
lukastaegert added a commit that referenced this pull request May 21, 2023
* Do not force quit Rollup or close stdout

reverts #4969, #4983

* Avoid memory leaks via beforeExit listeners
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rollup@3.21.3+ doesn't write all output when piping stdout
2 participants