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(editor): add flag waitUserInput #1150

Merged
merged 1 commit into from Aug 4, 2022
Merged

Conversation

dellamina
Copy link
Contributor

As requested in #1149, editor prompt always requires the user to press enter before launching the system editor, this pr adds a flag waitUserInput (default: true) that if set to false skips the user confirmation.

@SBoudrias
Copy link
Owner

Thanks!!

If you have some extra time, would you mind adding the flag to the new version of the editor prompt too? This would help me make sure we don't loose the feature once we ship the rewrite officially! The new code is over here: https://github.com/SBoudrias/Inquirer.js/blob/master/packages/editor/src/index.ts

@SBoudrias SBoudrias merged commit 8328d65 into SBoudrias:master Aug 4, 2022
@dellamina
Copy link
Contributor Author

Sure, I actually have already done that but I wasnt able to find the test suite for the new version so I pushed the changes only for the js version. Can you give me a hint on how to test the new version?

@SBoudrias
Copy link
Owner

Ah yes, I didn't setup great testing infra for the new prompts; I only tested the core library so far. You can skip UTs for now; but if you're interested, you could take some time looking into how we could set that up... There might be some inspiration in this test here https://github.com/SBoudrias/Inquirer.js/blob/master/packages/core/test.ts - Passing a test stream and retrieving rendered info from there. I was planning to extract a simple reusable test interface in a package too to make it easier.

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.

None yet

2 participants