Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@clack/prompts

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clack/prompts - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

node_modules/is-unicode-supported/index.d.ts

14

CHANGELOG.md
# @clack/prompts
## 0.3.0
### Minor Changes
- 493c592: Improve types for select/multiselect prompts. Numbers and booleans are now supported as the `value` option.
- 15558e3: Improved Windows/non-unicode support
### Patch Changes
- ca77da1: Fix multiselect initial value logic
- Updated dependencies [ca77da1]
- Updated dependencies [8aed606]
- @clack/core@0.1.4
## 0.2.2

@@ -4,0 +18,0 @@

17

dist/index.d.ts

@@ -17,3 +17,4 @@ export { isCancel } from '@clack/core';

declare const confirm: (opts: ConfirmOptions) => Promise<boolean | symbol>;
interface Option<Value extends Readonly<string>> {
type Primitive = Readonly<string | boolean | number>;
interface Option<Value extends Primitive> {
value: Value;

@@ -23,3 +24,3 @@ label?: string;

}
interface SelectOptions<Options extends Option<Value>[], Value extends Readonly<string>> {
interface SelectOptions<Options extends Option<Value>[], Value extends Primitive> {
message: string;

@@ -29,4 +30,10 @@ options: Options;

}
declare const select: <Options extends Option<Value>[], Value extends string>(opts: SelectOptions<Options, Value>) => Promise<symbol | Options[number]["value"]>;
declare const multiselect: <Options extends Option<Value>[], Value extends string>(opts: SelectOptions<Options, Value>) => Promise<symbol | Options[number]["value"][]>;
interface MultiSelectOptions<Options extends Option<Value>[], Value extends Primitive> {
message: string;
options: Options;
initialValue?: Options[number]['value'][];
cursorAt?: Options[number]["value"];
}
declare const select: <Options extends Option<Value>[], Value extends Primitive>(opts: SelectOptions<Options, Value>) => Promise<symbol | Options[number]["value"]>;
declare const multiselect: <Options extends Option<Value>[], Value extends Primitive>(opts: MultiSelectOptions<Options, Value>) => Promise<symbol | Options[number]["value"][]>;
declare const note: (message?: string, title?: string) => void;

@@ -41,2 +48,2 @@ declare const cancel: (message?: string) => void;

export { ConfirmOptions, SelectOptions, TextOptions, cancel, confirm, intro, multiselect, note, outro, select, spinner, text };
export { ConfirmOptions, MultiSelectOptions, SelectOptions, TextOptions, cancel, confirm, intro, multiselect, note, outro, select, spinner, text };
{
"name": "@clack/prompts",
"version": "0.2.2",
"version": "0.3.0",
"type": "module",

@@ -52,3 +52,3 @@ "main": "./dist/index.cjs",

"dependencies": {
"@clack/core": "^0.1.3",
"@clack/core": "^0.1.4",
"picocolors": "^1.0.0",

@@ -58,5 +58,9 @@ "sisteransi": "^1.0.5"

"devDependencies": {
"unbuild": "^1.1.1"
"unbuild": "^1.1.1",
"is-unicode-supported": "^1.3.0"
},
"bundledDependencies": [
"is-unicode-supported"
],
"scripts": {}
}

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