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

enh: make run() awaitable and bubble exceptions rather than process.exit(1) #429

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

benallfree
Copy link
Collaborator

@benallfree benallfree commented Apr 7, 2024

@crutchcorn Can you take a look at this please, I think it might be helpful for the community.

This PR does two things:

  1. Make run() awaitable. Previously, run() was fire-and-forget, but this doesn't work well when wrapping Plop. I needed a way to await run().
  2. Along the same lines, run() was not bubbling exceptions. It was calling process.exit, but that is insufficient if the user has setup/teardown that needs to happen after run().

@crutchcorn
Copy link
Member

I like this change, but it's technically a breaking change.

Let's merge your other PRs, then we can address this. Sorry for the delays on this all - it's been a busy/rough month

@benallfree
Copy link
Collaborator Author

benallfree commented Apr 21, 2024

Do we have a system for tagging open PRs for future releases?

How would you feel about making a next branch so users can do npm i plop@next?

@benallfree benallfree changed the title Make run() awaitable and bubble exceptions rather than process.exit(1) enhancement: Make run() awaitable and bubble exceptions rather than process.exit(1) Apr 21, 2024
@benallfree benallfree changed the title enhancement: Make run() awaitable and bubble exceptions rather than process.exit(1) enh: make run() awaitable and bubble exceptions rather than process.exit(1) Apr 21, 2024
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.

2 participants