@inquirer/select
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -10,3 +10,3 @@ "use strict"; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
const figures_1 = __importDefault(require("figures")); | ||
const figures_1 = __importDefault(require("@inquirer/figures")); | ||
const ansi_escapes_1 = __importDefault(require("ansi-escapes")); | ||
@@ -29,6 +29,6 @@ const selectTheme = { | ||
const first = items.findIndex(isSelectable); | ||
// TODO: Replace with `findLastIndex` when it's available. | ||
const last = items.length - 1 - [...items].reverse().findIndex(isSelectable); | ||
if (first < 0) | ||
const last = items.findLastIndex(isSelectable); | ||
if (first < 0) { | ||
throw new core_1.ValidationError('[select prompt] No selectable choices. All choices are disabled.'); | ||
} | ||
return { first, last }; | ||
@@ -35,0 +35,0 @@ }, [items]); |
@@ -10,3 +10,3 @@ "use strict"; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
const figures_1 = __importDefault(require("figures")); | ||
const figures_1 = __importDefault(require("@inquirer/figures")); | ||
const ansi_escapes_1 = __importDefault(require("ansi-escapes")); | ||
@@ -29,6 +29,6 @@ const selectTheme = { | ||
const first = items.findIndex(isSelectable); | ||
// TODO: Replace with `findLastIndex` when it's available. | ||
const last = items.length - 1 - [...items].reverse().findIndex(isSelectable); | ||
if (first < 0) | ||
const last = items.findLastIndex(isSelectable); | ||
if (first < 0) { | ||
throw new core_1.ValidationError('[select prompt] No selectable choices. All choices are disabled.'); | ||
} | ||
return { first, last }; | ||
@@ -35,0 +35,0 @@ }, [items]); |
{ | ||
"name": "@inquirer/select", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "Inquirer select/list prompt", | ||
@@ -57,10 +57,10 @@ "main": "./dist/cjs/index.js", | ||
"dependencies": { | ||
"@inquirer/core": "^7.1.2", | ||
"@inquirer/type": "^1.2.1", | ||
"@inquirer/core": "^7.1.3", | ||
"@inquirer/figures": "^1.0.0", | ||
"@inquirer/type": "^1.2.2", | ||
"ansi-escapes": "^4.3.2", | ||
"chalk": "^4.1.2", | ||
"figures": "^3.2.0" | ||
"chalk": "^4.1.2" | ||
}, | ||
"devDependencies": { | ||
"@inquirer/testing": "^2.1.15" | ||
"@inquirer/testing": "^2.1.16" | ||
}, | ||
@@ -91,3 +91,3 @@ "scripts": { | ||
}, | ||
"gitHead": "e5300568c6b043f325a1107e38e99d931593510e" | ||
"gitHead": "6bfbdfc457ab6d99b9d80c106b5edad285c8b9ba" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26322
+ Added@inquirer/figures@^1.0.0
- Removedfigures@^3.2.0
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfigures@3.2.0(transitive)
Updated@inquirer/core@^7.1.3
Updated@inquirer/type@^1.2.2