🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@inquirer/search

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inquirer/search - npm Package Compare versions

Comparing version
4.1.6
to
4.1.7
+1
-1
dist/index.d.ts

@@ -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;

@@ -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) => {

{
"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"
}