Socket
Socket
Sign inDemoInstall

@inquirer/input

Package Overview
Dependencies
Maintainers
3
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inquirer/input - npm Package Compare versions

Comparing version 2.1.12 to 2.2.0

4

dist/cjs/index.js

@@ -14,3 +14,3 @@ "use strict";

exports.default = (0, core_1.createPrompt)((config, done) => {
const { validate = () => true } = config;
const { required, validate = () => true } = config;
const theme = (0, core_1.makeTheme)(config.theme);

@@ -31,3 +31,3 @@ const [status, setStatus] = (0, core_1.useState)('pending');

setStatus('loading');
const isValid = yield validate(answer);
const isValid = required && !answer ? 'You must provide a value' : yield validate(answer);
if (isValid === true) {

@@ -34,0 +34,0 @@ setValue(answer);

@@ -6,2 +6,3 @@ import { type Theme } from '@inquirer/core';

default?: string;
required?: boolean;
transformer?: (value: string, { isFinal }: {

@@ -8,0 +9,0 @@ isFinal: boolean;

{
"name": "@inquirer/input",
"version": "2.1.12",
"version": "2.2.0",
"description": "Inquirer input text prompt",

@@ -57,7 +57,7 @@ "main": "./dist/cjs/index.js",

"dependencies": {
"@inquirer/core": "^9.0.0",
"@inquirer/core": "^9.0.1",
"@inquirer/type": "^1.4.0"
},
"devDependencies": {
"@inquirer/testing": "^2.1.24"
"@inquirer/testing": "^2.1.25"
},

@@ -90,3 +90,3 @@ "scripts": {

"sideEffects": false,
"gitHead": "fc27d575bceb96466cb8da8524c26d4eb2a77df0"
"gitHead": "2285f2c043448ff4317635cf6481df7ffda2d3bd"
}

@@ -9,8 +9,25 @@ # `@inquirer/input`

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>
```sh
npm install @inquirer/input
```
</td>
<td>
```sh
yarn add @inquirer/input
```
</td>
</tr>
</table>
# Usage

@@ -17,0 +34,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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