@inquirer/expand 1.1.9 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -27,8 +27,8 @@ exports.default = (0, core_1.createPrompt)((config, done) => {
27
27
  const [expanded, setExpanded] = (0, core_1.useState)(defaultExpandState);
28
28
  const [errorMsg, setError] = (0, core_1.useState)(undefined);
29
29
  const prefix = (0, core_1.usePrefix)();
30
- (0, core_1.useKeypress)((key, rl) => {
31
- if ((0, core_1.isEnterKey)(key)) {
30
+ (0, core_1.useKeypress)((event, rl) => {
31
+ if ((0, core_1.isEnterKey)(event)) {
32
32
  const answer = (value || defaultKey).toLowerCase();
33
33
  if (answer === 'h' && !expanded) {
34
34
  setExpanded(true);
@@ -1,4 +1,3 @@
1
- import { AsyncPromptConfig } from '@inquirer/core';
2
1
  type ExpandChoice = {
3
2
  key: string;
4
3
  name: string;
@@ -10,10 +9,10 @@ type ExpandChoice = {
10
9
  name: string;
11
10
  value: string;
12
11
  };
13
- type ExpandConfig = AsyncPromptConfig & {
14
- choices: ReadonlyArray<ExpandChoice>;
15
- default?: string;
16
- expanded?: boolean;
17
- };
18
- declare const _default: import("@inquirer/type").Prompt<string, ExpandConfig>;
12
+ declare const _default: import("@inquirer/type").Prompt<string, {
13
+ message: string | Promise<string> | (() => Promise<string>);
14
+ choices: readonly ExpandChoice[];
15
+ default?: string | undefined;
16
+ expanded?: boolean | undefined;
17
+ }>;
19
18
  export default _default;
@@ -22,8 +22,8 @@ export default createPrompt((config, done) => {
22
22
  const [expanded, setExpanded] = useState(defaultExpandState);
23
23
  const [errorMsg, setError] = useState(undefined);
24
24
  const prefix = usePrefix();
25
- useKeypress((key, rl) => {
26
- if (isEnterKey(key)) {
25
+ useKeypress((event, rl) => {
26
+ if (isEnterKey(event)) {
27
27
  const answer = (value || defaultKey).toLowerCase();
28
28
  if (answer === 'h' && !expanded) {
29
29
  setExpanded(true);
@@ -1,4 +1,3 @@
1
- import { AsyncPromptConfig } from '@inquirer/core';
2
1
  type ExpandChoice = {
3
2
  key: string;
4
3
  name: string;
@@ -10,10 +9,10 @@ type ExpandChoice = {
10
9
  name: string;
11
10
  value: string;
12
11
  };
13
- type ExpandConfig = AsyncPromptConfig & {
14
- choices: ReadonlyArray<ExpandChoice>;
15
- default?: string;
16
- expanded?: boolean;
17
- };
18
- declare const _default: import("@inquirer/type").Prompt<string, ExpandConfig>;
12
+ declare const _default: import("@inquirer/type").Prompt<string, {
13
+ message: string | Promise<string> | (() => Promise<string>);
14
+ choices: readonly ExpandChoice[];
15
+ default?: string | undefined;
16
+ expanded?: boolean | undefined;
17
+ }>;
19
18
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/expand",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Inquirer checkbox prompt",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "typings": "./dist/cjs/types/index.d.ts",
@@ -54,19 +54,18 @@
54
54
  "license": "MIT",
55
55
  "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/expand/README.md",
56
56
  "dependencies": {
57
- "@inquirer/core": "^4.0.0",
58
- "@inquirer/type": "^1.1.2",
57
+ "@inquirer/core": "^5.0.0",
58
+ "@inquirer/type": "^1.1.4",
59
59
  "chalk": "^4.1.2",
60
60
  "figures": "^3.2.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@inquirer/testing": "^2.1.4"
63
+ "@inquirer/testing": "^2.1.6"
64
64
  },
65
65
  "scripts": {
66
- "tsc": "yarn run clean && yarn run tsc:esm && yarn run tsc:cjs",
67
- "clean": "rm -rf dist",
68
- "tsc:esm": "tsc -p ./tsconfig.json",
69
- "tsc:cjs": "tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
66
+ "tsc": "yarn run tsc:esm && yarn run tsc:cjs",
67
+ "tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
68
+ "tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
70
69
  },
71
70
  "publishConfig": {
72
71
  "access": "public"
@@ -86,5 +85,5 @@
86
85
  }
87
86
  }
88
87
  },
89
- "gitHead": "ea5baff21fb29ed3c0931ea4030cc1dd1e92fc8d"
88
+ "gitHead": "c2d1c5fdfd1029f78351fb04e06f1cfb29d55bb6"
90
89
  }