@inquirer/core 9.0.3 → 9.0.5

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/README.md CHANGED
@@ -79,14 +79,14 @@ const answer = await confirm({ message: 'Do you want to continue?' });
79
79
 
80
80
  See more examples:
81
81
 
82
- - [Confirm Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/confirm/src/index.mts)
83
- - [Input Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/input/src/index.mts)
84
- - [Password Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/password/src/index.mts)
85
- - [Editor Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/editor/src/index.mts)
86
- - [Select Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/select/src/index.mts)
87
- - [Checkbox Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/checkbox/src/index.mts)
88
- - [Rawlist Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/rawlist/src/index.mts)
89
- - [Expand Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/expand/src/index.mts)
82
+ - [Confirm Prompt](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/confirm/src/index.mts)
83
+ - [Input Prompt](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/input/src/index.mts)
84
+ - [Password Prompt](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/password/src/index.mts)
85
+ - [Editor Prompt](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/editor/src/index.mts)
86
+ - [Select Prompt](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/select/src/index.mts)
87
+ - [Checkbox Prompt](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/checkbox/src/index.mts)
88
+ - [Rawlist Prompt](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/rawlist/src/index.mts)
89
+ - [Expand Prompt](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/expand/src/index.mts)
90
90
 
91
91
  ## API
92
92
 
@@ -28,7 +28,7 @@ function lines({ items, width, renderItem, active, position: requested, pageSize
28
28
  isActive: index === active,
29
29
  }));
30
30
  const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
31
- const renderItemAt = (index) => split(renderItem(layoutsInPage[index]), width);
31
+ const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
32
32
  // Create a blank array of lines for the page
33
33
  const pageBuffer = Array.from({ length: pageSize });
34
34
  // Render the active item to decide the position
@@ -25,7 +25,7 @@ export function lines({ items, width, renderItem, active, position: requested, p
25
25
  isActive: index === active,
26
26
  }));
27
27
  const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
28
- const renderItemAt = (index) => split(renderItem(layoutsInPage[index]), width);
28
+ const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
29
29
  // Create a blank array of lines for the page
30
30
  const pageBuffer = Array.from({ length: pageSize });
31
31
  // Render the active item to decide the position
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/core",
3
- "version": "9.0.3",
3
+ "version": "9.0.5",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },
@@ -55,10 +55,10 @@
55
55
  ],
56
56
  "author": "Simon Boudrias <admin@simonboudrias.com>",
57
57
  "license": "MIT",
58
- "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/core/README.md",
58
+ "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/main/packages/core/README.md",
59
59
  "dependencies": {
60
- "@inquirer/figures": "^1.0.4",
61
- "@inquirer/type": "^1.5.0",
60
+ "@inquirer/figures": "^1.0.5",
61
+ "@inquirer/type": "^1.5.1",
62
62
  "@types/mute-stream": "^0.0.4",
63
63
  "@types/node": "^20.14.11",
64
64
  "@types/wrap-ansi": "^3.0.0",
@@ -72,13 +72,12 @@
72
72
  "yoctocolors-cjs": "^2.1.2"
73
73
  },
74
74
  "devDependencies": {
75
- "@inquirer/testing": "^2.1.26"
75
+ "@inquirer/testing": "^2.1.28"
76
76
  },
77
77
  "scripts": {
78
78
  "tsc": "yarn run tsc:esm && yarn run tsc:cjs",
79
79
  "tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
80
80
  "tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
81
- "tsc:watch": "tsc -p ./tsconfig.json --watch",
82
81
  "attw": "attw --pack"
83
82
  },
84
83
  "publishConfig": {
@@ -97,5 +96,5 @@
97
96
  }
98
97
  },
99
98
  "sideEffects": false,
100
- "gitHead": "eb7a658ca58d8cc5863efb9289ae1b42e818bdd0"
99
+ "gitHead": "92eb67edb388404a6d737c0605648ac797c84fb6"
101
100
  }