Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inquirer

Package Overview
Dependencies
Maintainers
4
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inquirer - npm Package Compare versions

Comparing version 9.3.5 to 10.0.0

dist/cjs/index.js

47

package.json
{
"name": "inquirer",
"type": "module",
"version": "9.3.5",
"version": "10.0.0",
"description": "A collection of common interactive command line user interfaces.",
"author": "Simon Boudrias <admin@simonboudrias.com>",
"main": "./dist/cjs/index.js",
"files": [
"lib"
"dist/**/*"
],
"main": "lib/index.js",
"keywords": [

@@ -53,5 +52,2 @@ "answer",

},
"devDependencies": {
"terminal-link": "^3.0.0"
},
"repository": {

@@ -63,18 +59,33 @@ "type": "git",

"dependencies": {
"@inquirer/figures": "^1.0.3",
"@inquirer/prompts": "^5.1.2",
"@inquirer/type": "^1.3.3",
"@types/mute-stream": "^0.0.4",
"ansi-escapes": "^4.3.2",
"cli-width": "^4.1.0",
"external-editor": "^3.1.0",
"mute-stream": "1.0.0",
"ora": "^5.4.1",
"mute-stream": "^1.0.0",
"run-async": "^3.0.0",
"rxjs": "^7.8.1",
"string-width": "^4.2.3",
"strip-ansi": "^6.0.1",
"wrap-ansi": "^6.2.0",
"yoctocolors-cjs": "^2.1.2"
"rxjs": "^7.8.1"
},
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/inquirer/README.md",
"sideEffects": false,
"gitHead": "093c565bb915053c263b8fe09f550d55f76360ff"
"scripts": {
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
"dev": "tsc -p ./tsconfig.json --watch",
"attw": "attw --pack"
},
"exports": {
".": {
"import": {
"types": "./dist/esm/types/index.d.mts",
"default": "./dist/esm/index.mjs"
},
"require": {
"types": "./dist/cjs/types/index.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"typings": "./dist/cjs/types/index.d.ts",
"gitHead": "a9ee70f34327e2af1712dd984ea43993645de9ff"
}

@@ -97,17 +97,2 @@ <img width="75px" height="75px" align="right" alt="Inquirer Logo" src="https://raw.githubusercontent.com/SBoudrias/Inquirer.js/master/assets/inquirer_readme.svg?sanitize=true" title="Inquirer.js"/>

> [!WARNING]
> Inquirer v9 and higher are native esm modules, this mean you cannot use the commonjs syntax `require('inquirer')` anymore. If you want to learn more about using native esm in Node, I'd recommend reading [the following guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
Alternatively, if you require a commonjs module, you should rely on an older version until you're ready to upgrade your environment:
```sh
npm install --save inquirer@^8.0.0
```
This will then allow import inquirer with the commonjs `require`:
```js
const inquirer = require('inquirer');
```
<a name="examples"></a>

@@ -120,4 +105,4 @@

```shell
node packages/inquirer/examples/pizza.js
node packages/inquirer/examples/checkbox.js
yarn node packages/inquirer/examples/pizza.js
yarn node packages/inquirer/examples/checkbox.js
# etc...

@@ -130,2 +115,5 @@ ```

> [!WARNING]
> Those interfaces are not necessary for modern Javascript, while still maintained, they're depreciated. We highly encourage you to adopt the more ergonomic and modern API with [@inquirer/prompts](https://www.npmjs.com/package/@inquirer/prompts). Both `inquirer` and `@inquirer/prompts` are usable at the same time, so you can progressively migrate.
#### `inquirer.prompt(questions, answers) -> promise`

@@ -342,25 +330,2 @@

## User Interfaces and layouts
Along with the prompts, Inquirer offers some basic text UI.
#### Bottom Bar - `inquirer.ui.BottomBar`
This UI present a fixed text at the bottom of a free text zone. This is useful to keep a message to the bottom of the screen while outputting command outputs on the higher section.
```javascript
const ui = new inquirer.ui.BottomBar();
// pipe a Stream to the log zone
outputStream.pipe(ui.log);
// Or simply write output
ui.log.write('something just happened.');
ui.log.write('Almost over, standby!');
// During processing, update the bottom bar content to display a loader
// or output a progress bar, etc
ui.updateBottomBar('new bottom bar content');
```
<a name="reactive"></a>

@@ -442,3 +407,3 @@

**Unit test**
Please add a unit test for every new feature or bug fix. `npm test` to run the test suite.
Please add a unit test for every new feature or bug fix. `yarn test` to run the test suite.

@@ -464,2 +429,12 @@ **Documentation**

You can build custom prompts, or use open sourced ones. See [`@inquirer/core` documentation for building custom prompts](https://github.com/SBoudrias/Inquirer.js/tree/master/packages/core).
You can either call the custom prompts directly, or you can register them:
```js
import CustomPrompt from '$$$/custom-prompt';
inquirer.registerPrompt('custom', CustomPrompt);
```
### Prompts

@@ -466,0 +441,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc