@inquirer/select
Advanced tools
+2
-2
@@ -25,6 +25,6 @@ import { Separator, type Theme, type Keybinding } from '@inquirer/core'; | ||
| message: string; | ||
| choices: readonly (string | Separator)[] | readonly (Separator | Choice<Value>)[]; | ||
| choices: readonly (Separator | Value | Choice<Value>)[]; | ||
| pageSize?: number | undefined; | ||
| loop?: boolean | undefined; | ||
| default?: unknown; | ||
| default?: NoInfer<Value> | undefined; | ||
| theme?: PartialDeep<Theme<SelectTheme>> | undefined; | ||
@@ -31,0 +31,0 @@ }, context?: import("@inquirer/type").Context) => Promise<Value>; |
+5
-3
@@ -24,7 +24,9 @@ import { createPrompt, useState, useKeypress, usePrefix, usePagination, useRef, useMemo, useEffect, isBackspaceKey, isEnterKey, isUpKey, isDownKey, isNumberKey, Separator, ValidationError, makeTheme, } from '@inquirer/core'; | ||
| return choice; | ||
| if (typeof choice === 'string') { | ||
| if (typeof choice !== 'object' || choice === null || !('value' in choice)) { | ||
| // It's a raw value (string, number, etc.) | ||
| const name = String(choice); | ||
| return { | ||
| value: choice, | ||
| name: choice, | ||
| short: choice, | ||
| name, | ||
| short: name, | ||
| disabled: false, | ||
@@ -31,0 +33,0 @@ }; |
+5
-4
| { | ||
| "name": "@inquirer/select", | ||
| "version": "5.0.2", | ||
| "version": "5.0.3", | ||
| "description": "Inquirer select/list prompt", | ||
@@ -68,3 +68,3 @@ "keywords": [ | ||
| "@inquirer/ansi": "^2.0.2", | ||
| "@inquirer/core": "^11.0.2", | ||
| "@inquirer/core": "^11.1.0", | ||
| "@inquirer/figures": "^2.0.2", | ||
@@ -74,3 +74,4 @@ "@inquirer/type": "^4.0.2" | ||
| "devDependencies": { | ||
| "@inquirer/testing": "^3.0.2", | ||
| "@inquirer/testing": "^3.0.3", | ||
| "@repo/tsconfig": "0.0.0", | ||
| "typescript": "^5.9.3" | ||
@@ -94,3 +95,3 @@ }, | ||
| "types": "./dist/index.d.ts", | ||
| "gitHead": "9c724296daad3d740b09173f9aae035dc62cb106" | ||
| "gitHead": "7eedd8e1de71764d0d30e762c97992ceb9f68ed3" | ||
| } |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
16666
0.93%208
0.97%3
50%1
Infinity%Updated