Say Allo' to the new Inquirer (release of the rewrite) #1214
SBoudrias
announced in
Announcements
Replies: 3 comments 1 reply
-
What a great work! |
Beta Was this translation helpful? Give feedback.
1 reply
-
Nice work on |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've migrated a little package to the new version, it's amazing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
First of all, I want to say thanks for your support those last 10 years! It's amazing to see Inquirer still getting so much usage (7.6M users!) and so many downloads (~30M per week!)
5 years ago in 2018, I started to work on this complete rewrite of the Inquirer codebase. Many reasons made this rewrite take so long. First of all, I reoriented my career towards engineering leadership after moving to China in 2017. I did find myself with less energy for open source after work. Secondly, a rewrite of such a large library is plainly scary! The thought of breaking backward compatibility and pushing users through a migration hell just wasn't appealing. I think finally today I've reached a good position where I'm confident to advertise this work as the new official Inquirer.
Allo' allo' to
@inquirer/prompts
!The new Inquirer
The rewrite had 3 major goals:
@inquirer/prompts
(~12kb) is a ease-of-use package combining all core prompts:@inquirer/input
(~3kb)@inquirer/select
(~6kb)@inquirer/checkbox
(~6kb)@inquirer/confirm
(~3kb)@inquirer/password
(~3kb)@inquirer/expand
(~3kb)@inquirer/editor
(~7kb)@inquirer/rawlist
(~3kb)All prompts are also available as standalone packages if you want to minimize your package size further. As a comparison basis, the
inquirer
package is ~242kb.Backward compatibility
The new
@inquirer/prompts
package isn't backward compatible with theinquirer
package. I've been punting a long time rewriting theinquirer
package itself. JavaScript & Node came a long way since the days of Node 0.8! At that time, writing JS code and managing state was much harder. Soinquirer
came with built-in flow management. In 2023, there's in my opinion little need to expose state/flow management utilities. Promises are built-in, we get to enjoyasync/await
, we have good loops utilities, streams are streamlined, and the readline module just work 😱.The
inquirer
package is still part of the monorepo, and I'll be keeping it up to date and under maintenance mode. Maybe one day it'll be rewritten. For now, new usage of Inquirer can start fresh with a leaner package.Contributing
Do you want to help? Here's a few ways:
In conclusion
I hope you'll enjoy the new Inquirer interface. And I hope it'll empower you to create custom prompts and interfaces for you own CLI programs.
The quality of Node based tooling is amazing, I hope we can continue making this dev environment the absolute best in class!
Beta Was this translation helpful? Give feedback.
All reactions