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

Move to listr2 when v6 is out of beta #684

Open
tommy-mitchell opened this issue Apr 3, 2023 · 6 comments
Open

Move to listr2 when v6 is out of beta #684

tommy-mitchell opened this issue Apr 3, 2023 · 6 comments

Comments

@tommy-mitchell
Copy link
Collaborator

tommy-mitchell commented Apr 3, 2023

Per #683 (comment), this is a reminder issue: https://github.com/listr2/listr2

@sindresorhus
Copy link
Owner

It's out of beta now.

@tommy-mitchell
Copy link
Collaborator Author

Tasks could also be consolidated / moved into their own subdirectory for better organization as part of this.

np/source/index.js

Lines 90 to 103 in ad7b09e

const tasks = new Listr([
{
title: 'Prerequisite check',
enabled: () => options.runPublish,
task: () => prerequisiteTasks(input, pkg, options),
},
{
title: 'Git',
task: () => gitTasks(options),
},
], {
showSubtasks: false,
renderer: options.renderer ?? 'default',
});

tommy-mitchell added a commit to tommy-mitchell/np that referenced this issue Jul 4, 2023
@tommy-mitchell
Copy link
Collaborator Author

tommy-mitchell commented Sep 3, 2023

Potential blocker: listr2/listr2#676

np's pretask UI uses inquirer, whereas listr2 only supports enquirer for now. np currently only prompts during the task list when getting an OTP.

Until listr2 also supports inquirer, we'd either need to change over to enquirer (which involves changing the test mocking), or use inquirer for the pretask UI and enquirer to prompt for an OTP.


I have a local branch where I've moved everything over to listr2 except the OTP prompting. I think we can remove rxjs as well once that's updated, as it seems like the other uses were to work around some old execa shortcomings.

@sindresorhus
Copy link
Owner

Ideally, we would switch to Ink, but that's a much bigger task.

@sindresorhus
Copy link
Owner

It looks like listr2 v7 supports Inquirer.

@fregante
Copy link
Collaborator

Ideally, we would switch to Ink

Why isn't listr2 just based on Ink? It feels like using Ink directly would be too big of a task and an unnecessary one at that. Maybe vadimdemedes could make such a package, if it doesn't already exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants