@inquirer/search
Advanced tools
+1
-1
@@ -26,3 +26,3 @@ import { Separator, type Theme } from '@inquirer/core'; | ||
| signal: AbortSignal; | ||
| }) => readonly (string | Separator)[] | readonly (Separator | Choice<Value>)[] | Promise<readonly (string | Separator)[]> | Promise<readonly (Separator | Choice<Value>)[]>; | ||
| }) => readonly (Separator | Value | Choice<Value>)[] | Promise<readonly (Separator | Value | Choice<Value>)[]>; | ||
| validate?: ((value: Value) => boolean | string | Promise<string | boolean>) | undefined; | ||
@@ -29,0 +29,0 @@ pageSize?: number | undefined; |
+5
-3
@@ -22,7 +22,8 @@ import { createPrompt, useState, useKeypress, usePrefix, usePagination, useEffect, useMemo, useRef, isDownKey, isEnterKey, isTabKey, isUpKey, Separator, makeTheme, } from '@inquirer/core'; | ||
| return choice; | ||
| if (typeof choice === 'string') { | ||
| if (typeof choice !== 'object' || choice === null || !('value' in choice)) { | ||
| const name = String(choice); | ||
| return { | ||
| value: choice, | ||
| name: choice, | ||
| short: choice, | ||
| name, | ||
| short: name, | ||
| disabled: false, | ||
@@ -94,2 +95,3 @@ }; | ||
| // Safe to assume the cursor position never points to a Separator. | ||
| // oxlint-disable-next-line typescript/no-unsafe-type-assertion | ||
| const selectedChoice = searchResults[active]; | ||
@@ -96,0 +98,0 @@ useKeypress(async (key, rl) => { |
+6
-6
| { | ||
| "name": "@inquirer/search", | ||
| "version": "4.1.6", | ||
| "version": "4.1.7", | ||
| "description": "Inquirer search prompt", | ||
@@ -70,8 +70,8 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@inquirer/core": "^11.1.7", | ||
| "@inquirer/figures": "^2.0.4", | ||
| "@inquirer/type": "^4.0.4" | ||
| "@inquirer/core": "^11.1.8", | ||
| "@inquirer/figures": "^2.0.5", | ||
| "@inquirer/type": "^4.0.5" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "^5.9.3" | ||
| "typescript": "^6.0.2" | ||
| }, | ||
@@ -91,3 +91,3 @@ "peerDependencies": { | ||
| "types": "./dist/index.d.ts", | ||
| "gitHead": "b218fcc4afe888a58957aa78c9a032f9bd2d60cb" | ||
| "gitHead": "e68fe01d65359e083581c48c4a18cd8f97d88842" | ||
| } |
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.
19199
0.42%228
0.88%0
-100%Updated
Updated
Updated