Socket
Socket
Sign inDemoInstall

inquirer

Package Overview
Dependencies
Maintainers
4
Versions
182
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 10.0.2 to 10.0.3

10

dist/cjs/types/types.d.ts

@@ -25,3 +25,3 @@ import { input, select, number, confirm, rawlist, expand, checkbox, password, editor } from '@inquirer/prompts';

type PromptConfigMap<A extends Answers> = {
[key in keyof QuestionMap]: DistributiveMerge<QuestionMap[keyof QuestionMap], {
[key in keyof QuestionMap]: Readonly<DistributiveMerge<QuestionMap[keyof QuestionMap], {
type: keyof QuestionMap;

@@ -34,9 +34,9 @@ name: KeyUnion<A>;

default?: Pick<QuestionMap[keyof QuestionMap], 'default'> | AsyncGetterFunction<Pick<QuestionMap[keyof QuestionMap], 'default'> | string[], Prettify<A>>;
}>;
}>>;
};
export type Question<A extends Answers> = PromptConfigMap<A>[keyof PromptConfigMap<A>];
export type QuestionAnswerMap<A extends Answers> = {
export type QuestionAnswerMap<A extends Answers> = Readonly<{
[name in KeyUnion<A>]: Omit<Question<A>, 'name'>;
} | never;
export type QuestionArray<A extends Answers> = Question<A>[] | never;
}> | never;
export type QuestionArray<A extends Answers> = readonly Question<A>[] | never;
export type QuestionObservable<A extends Answers> = Observable<Question<A>> | never;

@@ -43,0 +43,0 @@ export type StreamOptions = Prettify<Parameters<typeof input>[1] & {

@@ -12,3 +12,2 @@ import { Observable } from 'rxjs';

run(): Promise<any>;
close(): void;
}

@@ -15,0 +14,0 @@ /**

@@ -83,2 +83,5 @@ "use strict";

}
function isQuestionArray(questions) {
return Array.isArray(questions);
}
function isQuestionMap(questions) {

@@ -170,3 +173,3 @@ return Object.values(questions).every((maybeQuestion) => typeof maybeQuestion === 'object' &&

if (!this.prompts[question.type]) {
question.type = 'input';
question = Object.assign({}, question, { type: 'input' });
}

@@ -207,3 +210,3 @@ return (0, rxjs_1.defer)(() => (0, rxjs_1.of)(question));

let obs;
if (Array.isArray(questions)) {
if (isQuestionArray(questions)) {
obs = (0, rxjs_1.from)(questions);

@@ -210,0 +213,0 @@ }

{
"name": "inquirer",
"version": "10.0.2",
"version": "10.0.3",
"description": "A collection of common interactive command line user interfaces.",

@@ -58,3 +58,3 @@ "author": "Simon Boudrias <admin@simonboudrias.com>",

"dependencies": {
"@inquirer/prompts": "^5.1.3",
"@inquirer/prompts": "^5.2.0",
"@inquirer/type": "^1.5.0",

@@ -89,3 +89,3 @@ "@types/mute-stream": "^0.0.4",

"typings": "./dist/cjs/types/index.d.ts",
"gitHead": "eb7a658ca58d8cc5863efb9289ae1b42e818bdd0"
"gitHead": "6e2ddec8ca97ee176f080efd2cba76e39b5b9628"
}

Sorry, the diff of this file is not supported yet

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