Comments (6)
Thank you for pointing that out. I will try to integrate that one, for the upcoming days I will have some free time and try to integrate this in as well.
from listr2.
Hello @xaviermonin,
Yeah that would be possible but I am not sure when I will get to it. Just have to check of it feasible with the current structure since the clear line ANSI chars are hacked out from the prompts to not make the default renderer break.
The main reason I did not select it as the prompt engine in the initial implementation was it was pretty slow and had huge set of dependencies. But as an optional peer dependency it should be okay since it is not bundled with the application.
I completely agree that eventhough mostly enquirer works it is not maintainted it could use at least some dependency updates. I would still prefer it to keep it as default until it breaks completely.
from listr2.
The main reason I did not select it as the prompt engine in the initial implementation was it was pretty slow and had huge set of dependencies.
FWIW, the new @inquirer/prompts
is much smaller (new vs old): SBoudrias/Inquirer.js#1214
from listr2.
Great :) btw, the new Inquirer is written in TypeScript, so you can map the types instead of re-writing them like with Enquirer:
import type * as Inquirer from '@inquirer/prompts'
type Prompts =
| typeof Inquirer.input
| typeof Inquirer.select
| typeof Inquirer.checkbox
| typeof Inquirer.confirm
| typeof Inquirer.password
| typeof Inquirer.expand
| typeof Inquirer.editor
| typeof Inquirer.rawlist
type PromptOptions<PromptType extends Prompts> = Parameters<PromptType>[0]
type InputPromptOptions = PromptOptions<typeof Inquirer.input>
type SelectPromptOptions = PromptOptions<typeof Inquirer.select>
type CheckboxPromptOptions = PromptOptions<typeof Inquirer.checkbox>
type ConfirmPromptOptions = PromptOptions<typeof Inquirer.confirm>
type PasswordPromptOptions = PromptOptions<typeof Inquirer.password>
type ExpandPromptOptions = PromptOptions<typeof Inquirer.expand>
type EditorPromptOptions = PromptOptions<typeof Inquirer.editor>
type RawListPromptOptions = PromptOptions<typeof Inquirer.rawlist>
from listr2.
🎉 This issue has been resolved in version 7.0.0-beta.3 🎉
The release is available on:
Your semantic-release bot 📦🚀
from listr2.
Dear @tommy-mitchell,
I have implemented an adapter-based approach to support both enquirer
and inquirer
which breaks the current behavior but since I was also doing some breaking changes for other issues.
Please check out the latest v7.0.0-beta.3
release to see if this will work in your case.
The new documentation for prompts can be found here and mentioned in the brief migration guide for v7
on the documentation website.
Keep in mind that since this is beta
, it is not final and if you have any input, I would be glad to discuss further.
from listr2.
Related Issues (20)
- [Bug]: Task run finished should return task return value HOT 1
- [Bug]: `persistentOutput` with output streaming HOT 1
- [Feature]: consider supporting the node14 version? HOT 4
- [Feature]: Multiline output for DefaultRenderer HOT 1
- [Bug]: disableColor option is ignored HOT 4
- [Bug]: Documentation site broken HOT 3
- [Bug]: SyntaxError: Unexpected token '??=' HOT 1
- [Bug]: TypeError: Cannot read properties of undefined (reading 'collapseSubtasks') HOT 5
- [Support]: How to use node-schedule? HOT 4
- [Support]: How to handle nested listr2 HOT 3
- [Support]: How to pin an output? HOT 4
- [Bug]: SimpleRenderer should not invoke process.release HOT 5
- [Support]: Is there a way to clear output per task? HOT 3
- [Bug]: Doc site broken HOT 5
- [Bug]: `rxjs` is imported in the exported typescript definition but is declared as a dev dependency HOT 10
- [Bug]: Using inquirer prompting, messages seem to wrap too soon HOT 1
- [Bug]: SIGINT listener added, but not removed, causing unwanted behavior HOT 16
- [Bug]: [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received undefined HOT 5
- [Bug]: Task returning object never completes; returning boolean it does HOT 1
- [Bug]: Animation freezes when running external command (`execa`) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from listr2.