inquirerer 1.4.0 → 1.5.0

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/esm/keypress.js CHANGED
@@ -9,7 +9,7 @@ export const KEY_CODES = {
9
9
  ENTER: '\r',
10
10
  SPACE: ' ',
11
11
  CTRL_C: '\u0003',
12
- BACKSPACE: '\x7f',
12
+ BACKSPACE: '\x7f', // Commonly used BACKSPACE key in Unix-like systems
13
13
  BACKSPACE_LEGACY: '\x08' // For compatibility with some systems
14
14
  };
15
15
  export class TerminalKeypress {
package/esm/prompt.js CHANGED
@@ -554,6 +554,8 @@ export class Inquirerer {
554
554
  input = input.toLowerCase(); // Normalize input for case-insensitive comparison
555
555
  // Fuzzy matching: Check if all characters of the input can be found in the option name in order
556
556
  const fuzzyMatch = (option, input) => {
557
+ if (!input || !input.trim().length)
558
+ return true;
557
559
  const length = input.length;
558
560
  let position = 0; // Position in the input string
559
561
  // Iterate over each character in the option name
package/keypress.js CHANGED
@@ -12,7 +12,7 @@ exports.KEY_CODES = {
12
12
  ENTER: '\r',
13
13
  SPACE: ' ',
14
14
  CTRL_C: '\u0003',
15
- BACKSPACE: '\x7f',
15
+ BACKSPACE: '\x7f', // Commonly used BACKSPACE key in Unix-like systems
16
16
  BACKSPACE_LEGACY: '\x08' // For compatibility with some systems
17
17
  };
18
18
  class TerminalKeypress {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inquirerer",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "inquirerer",
6
6
  "main": "index.js",
@@ -35,5 +35,5 @@
35
35
  "minimist": "^1.2.8"
36
36
  },
37
37
  "keywords": [],
38
- "gitHead": "b782a9a8f201cdc779f7425774f680bc758a2506"
38
+ "gitHead": "624206356e03bb9c096b0a33f4dff5c28f50b3e4"
39
39
  }
package/prompt.js CHANGED
@@ -560,6 +560,8 @@ class Inquirerer {
560
560
  input = input.toLowerCase(); // Normalize input for case-insensitive comparison
561
561
  // Fuzzy matching: Check if all characters of the input can be found in the option name in order
562
562
  const fuzzyMatch = (option, input) => {
563
+ if (!input || !input.trim().length)
564
+ return true;
563
565
  const length = input.length;
564
566
  let position = 0; // Position in the input string
565
567
  // Iterate over each character in the option name