@inquirer/core 9.0.4 → 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.
@@ -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.4",
3
+ "version": "9.0.5",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },
@@ -57,8 +57,8 @@
57
57
  "license": "MIT",
58
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.27"
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": "f2c4983dd390c6244fb4668a8e87c9e786e4326f"
99
+ "gitHead": "92eb67edb388404a6d737c0605648ac797c84fb6"
101
100
  }