Giter Club home page Giter Club logo

Comments (6)

cenk1cenk2 avatar cenk1cenk2 commented on June 2, 2024 1

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.

cenk1cenk2 avatar cenk1cenk2 commented on June 2, 2024

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.

tommy-mitchell avatar tommy-mitchell commented on June 2, 2024

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.

tommy-mitchell avatar tommy-mitchell commented on June 2, 2024

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.

cenk1cenk2 avatar cenk1cenk2 commented on June 2, 2024

🎉 This issue has been resolved in version 7.0.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

from listr2.

cenk1cenk2 avatar cenk1cenk2 commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.