Socket
Socket
Sign inDemoInstall

@inquirer/expand

Package Overview
Dependencies
Maintainers
0
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inquirer/expand - npm Package Compare versions

Comparing version 2.3.0 to 3.0.0

6

dist/cjs/index.js

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

const choices = (0, core_1.useMemo)(() => normalizeChoices(config.choices), [config.choices]);
const [status, setStatus] = (0, core_1.useState)('pending');
const [status, setStatus] = (0, core_1.useState)('idle');
const [value, setValue] = (0, core_1.useState)('');

@@ -38,3 +38,3 @@ const [expanded, setExpanded] = (0, core_1.useState)((_a = config.expanded) !== null && _a !== void 0 ? _a : false);

const theme = (0, core_1.makeTheme)(config.theme);
const prefix = (0, core_1.usePrefix)({ theme });
const prefix = (0, core_1.usePrefix)({ theme, status });
(0, core_1.useKeypress)((event, rl) => {

@@ -67,3 +67,3 @@ if ((0, core_1.isEnterKey)(event)) {

});
const message = theme.style.message(config.message);
const message = theme.style.message(config.message, status);
if (status === 'done') {

@@ -70,0 +70,0 @@ // If the prompt is done, it's safe to assume there is a selected value.

@@ -21,4 +21,6 @@ import { Separator, type Theme } from '@inquirer/core';

theme?: PartialDeep<Theme> | undefined;
}, context?: import("@inquirer/type").Context) => import("@inquirer/type").CancelablePromise<Value>;
}, context?: import("@inquirer/type").Context) => Promise<Value> & {
cancel: () => void;
};
export default _default;
export { Separator } from '@inquirer/core';
{
"name": "@inquirer/expand",
"version": "2.3.0",
"version": "3.0.0",
"description": "Inquirer checkbox prompt",

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

"dependencies": {
"@inquirer/core": "^9.1.0",
"@inquirer/type": "^1.5.3",
"@inquirer/core": "^9.2.0",
"@inquirer/type": "^1.5.4",
"yoctocolors-cjs": "^2.1.2"
},
"devDependencies": {
"@inquirer/testing": "^2.1.32"
"@inquirer/testing": "^2.1.33"
},

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

"sideEffects": false,
"gitHead": "4937ea3a74152b59bf4198dbaa803119ed4ef8e2"
"gitHead": "5fe03a4686d349d0d6cf281f86f12a4f7c992ad4"
}

@@ -123,3 +123,3 @@ # `@inquirer/expand`

type Theme = {
prefix: string;
prefix: string | { idle: string; done: string };
spinner: {

@@ -131,3 +131,3 @@ interval: number;

answer: (text: string) => string;
message: (text: string) => string;
message: (text: string, status: 'idle' | 'done' | 'loading') => string;
error: (text: string) => string;

@@ -134,0 +134,0 @@ defaultAnswer: (text: string) => string;

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