@listr2/prompt-adapter-inquirer
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
import { CancelablePromise, Prompt } from '@inquirer/type'; | ||
import { Prompt } from '@inquirer/type'; | ||
import { ListrPromptAdapter } from 'listr2'; | ||
@@ -6,6 +6,7 @@ | ||
private prompt; | ||
private signal; | ||
/** | ||
* Get the current running instance of `inquirer`. | ||
*/ | ||
get instance(): CancelablePromise<any>; | ||
get instance(): Promise<any>; | ||
/** | ||
@@ -12,0 +13,0 @@ * Create a new prompt with `inquirer`. |
@@ -11,2 +11,3 @@ var __defProp = Object.defineProperty; | ||
prompt; | ||
signal = new AbortController(); | ||
/** | ||
@@ -24,2 +25,3 @@ * Get the current running instance of `inquirer`. | ||
context.output ??= this.wrapper.stdout(ListrTaskEventType.PROMPT); | ||
context.signal ??= this.signal.signal; | ||
this.reportStarted(); | ||
@@ -50,3 +52,3 @@ this.task.on(ListrTaskEventType.STATE, (event) => { | ||
this.reportFailed(); | ||
this.prompt.cancel(); | ||
this.signal.abort("Prompt was cancelled"); | ||
} | ||
@@ -53,0 +55,0 @@ }; |
{ | ||
"name": "@listr2/prompt-adapter-inquirer", | ||
"version": "2.0.17", | ||
"version": "3.0.0-beta.1", | ||
"description": "Listr2 prompt adapter for inquirer.", | ||
@@ -39,3 +39,3 @@ "license": "MIT", | ||
"format": "prettier --log-level warn --write src/ tests/ && pnpm run lint --fix", | ||
"lint": "eslint --ext .ts,.js,.tsx,.jsx src/ tests/", | ||
"lint": "eslint --flag unstable_config_lookup_from_file src/ tests/", | ||
"test": "NO_COLOR=1 TS_NODE_PROJECT=tests/tsconfig.json NODE_OPTIONS='--no-warnings --experimental-specifier-resolution=node --experimental-vm-modules' jest --config tests/jest.config.ts", | ||
@@ -48,3 +48,3 @@ "test:cov": "pnpm run test --coverage", | ||
"prettier --log-level warn --write", | ||
"eslint --fix" | ||
"eslint --flag unstable_config_lookup_from_file --fix" | ||
], | ||
@@ -75,12 +75,13 @@ "*.{json,md}": [ | ||
"dependencies": { | ||
"@inquirer/type": "^1.5.5" | ||
"@inquirer/type": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@inquirer/input": "^3.0.1", | ||
"@inquirer/prompts": "^6.0.1", | ||
"listr2": "8.2.5" | ||
"@inquirer/core": "^10.0.0", | ||
"@inquirer/input": "^4.0.0", | ||
"@inquirer/prompts": "^7.0.0", | ||
"listr2": "9.0.0-beta.1" | ||
}, | ||
"peerDependencies": { | ||
"@inquirer/prompts": ">= 3 < 7" | ||
"@inquirer/prompts": ">= 3 < 8" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10021
2.87%151
3.42%4
33.33%2
100%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated