Comparing version 9.3.5 to 10.0.0
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7
0
62434
19
898
530
No
+ Added@inquirer/prompts@^5.1.2
+ Added@inquirer/type@^1.3.3
+ Added@types/mute-stream@^0.0.4
+ Added@inquirer/confirm@3.2.0(transitive)
+ Added@inquirer/core@9.2.1(transitive)
+ Added@inquirer/editor@2.2.0(transitive)
+ Added@inquirer/expand@2.3.0(transitive)
+ Added@inquirer/input@2.3.0(transitive)
+ Added@inquirer/number@1.1.0(transitive)
+ Added@inquirer/password@2.2.0(transitive)
+ Added@inquirer/prompts@5.5.0(transitive)
+ Added@inquirer/rawlist@2.3.0(transitive)
+ Added@inquirer/search@1.1.0(transitive)
+ Added@inquirer/select@2.5.0(transitive)
+ Added@inquirer/type@1.5.52.0.0(transitive)
+ Added@types/mute-stream@0.0.4(transitive)
+ Added@types/node@22.9.0(transitive)
+ Added@types/wrap-ansi@3.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removed@inquirer/figures@^1.0.3
- Removedcli-width@^4.1.0
- Removedexternal-editor@^3.1.0
- Removedora@^5.4.1
- Removedstring-width@^4.2.3
- Removedstrip-ansi@^6.0.1
- Removedwrap-ansi@^6.2.0
- Removedyoctocolors-cjs@^2.1.2
- Removedbase64-js@1.5.1(transitive)
- Removedbl@4.1.0(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcli-cursor@3.1.0(transitive)
- Removedcli-spinners@2.9.2(transitive)
- Removedclone@1.0.4(transitive)
- Removeddefaults@1.0.4(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedieee754@1.2.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-interactive@1.0.0(transitive)
- Removedis-unicode-supported@0.1.0(transitive)
- Removedlog-symbols@4.1.0(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removedonetime@5.1.2(transitive)
- Removedora@5.4.1(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedrestore-cursor@3.1.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwcwidth@1.0.1(transitive)
Updatedmute-stream@^1.0.0