This tickets will list tasks that need to be completed to wrap-up Inquirer's core refactor.
I would love to have your help and make this refactor a success! Please comment below and let me know if you want to take ownership of a task. You can also jump into the gitter chat room and ping me over there if you get stuck.
Basic prompt core re-implementation PR is over at #688 and the initial refactoring scope was discussed on #685.
inquirer.prompt)Note: With standalone prompt, this mean we'll be able to release those as soon as they're ready.
input promptdefault option supporttransformer option supportnumber promptpassword promptconfirm promptlist promptcheckbox promptexpand prompteditor promptrawlist promptyes | command-using-inquirerinquirer package to use the new prompts APInpxDo leave comments to if you think some tasks should be added to the refactor backlog!
I will 100% help get Inquirer setup with TypeScript. That will be a good task to start off with for me.
Depending on the timeline of this refactor, we may want to consider targeting Node 8 as a minimum. Node 6 will reach end-of-life next April: https://github.com/nodejs/Release Node 8 will allow us to use async/await natively.
Yeah, we'll see how much people contribute and how fast this move forward. But I'd like the refactor to be completed in a few months.
But anyway, by adding typescript, it'd be easy to support Node 6 no?
It'd be easy, but there are two issues: 1) Missing newer Node APIs and 2) The output to Node 6 is ES2016, so when new syntax is used, TypeScript has to do some pretty ugly transforms, which result in ugly stack traces.
But... those issues probably aren't big enough reasons not to support Node 6.
We can always support a minimum of Node 8 later by "flipping the switch" and doing a major release. TypeScript will then output ES2017.
+1 for TypeScript!
Should a way to write unit tests for apps build with Inquirer be aded in the refactoring? See #379 for a proposed API.
Not being able to test your code is a blocker for me and prevent me to use Inquirer (I had to switch to prompts that offer the inject method but there is many Inquirer features that I miss). The issue #379 is also the most thumbed up in the issue tracker, so I imagine I'm not the only one in that situation.
Even if a complex API like the one described in #379 is out of this refactoring scope, that would be great if at a minimum:
onEachAnswer, onError and onComplete callbacks.+1 for TypeScript!
I've worked on a new API for the core prompt interface on this branch https://github.com/SBoudrias/Inquirer.js/tree/feature/replace-new-core-with-hooks-like-implementation
It works pretty much the same way as react hooks and so far has been quite extensible to fit the needs of the prompts I've reimplemented. I'd like to gather feedback on that API. See refactors of the input, password, confirm and select prompts.
@SBoudrias The link is broken.
Hey @frangio it's been merged to the master branch already.
Most helpful comment
+1 for TypeScript!