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

Add forceExit CLI flag #5195

Merged
merged 5 commits into from Nov 3, 2023
Merged

Conversation

raphael-theriault-swi
Copy link
Contributor

@raphael-theriault-swi raphael-theriault-swi commented Oct 12, 2023

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 adds a new forceExit CLI flag which implements the core behaviour of #4969 (exit the process once Rollup is done even if there are still open handles or pending operations). Currently it doesn't implement the behaviour for watch mode but that should be trivial to add if desired.

@vercel
Copy link

vercel bot commented Oct 12, 2023

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

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 5:37pm

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this is a good idea to move forward on the topic 👍 Changes look good to me.

@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

Merging #5195 (7765fe5) into master (fbf806a) will increase coverage by 0.00%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #5195   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files         231      231           
  Lines        8861     8863    +2     
  Branches     2316     2317    +1     
=======================================
+ Hits         8756     8758    +2     
  Misses         44       44           
  Partials       61       61           
Files Coverage Δ
cli/cli.ts 60.00% <100.00%> (+10.00%) ⬆️

@lukastaegert
Copy link
Member

Ah, but we would need a test. It should not be difficult to add one to test/cli. Maybe duplicate one like test/cli/samples/config and add a plugin to the config that prevents the process from finishing, and then use the flag to terminate it forcefully?

auto-merge was automatically disabled October 17, 2023 17:20

Head branch was pushed to by a user without write access

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I had overlooked this one. Looks good to me, thanks for your patience!

@lukastaegert lukastaegert added this pull request to the merge queue Nov 3, 2023
Merged via the queue into rollup:master with commit 20a64a1 Nov 3, 2023
27 checks passed
Copy link

github-actions bot commented Nov 3, 2023

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

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 -c not quit after created bundle
2 participants