@inquirer/core 8.2.3 → 9.0.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.
Files changed (39) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/lib/Separator.js +2 -2
  3. package/dist/cjs/lib/create-prompt.js +1 -2
  4. package/dist/cjs/lib/hook-engine.js +6 -6
  5. package/dist/cjs/lib/make-theme.js +1 -2
  6. package/dist/cjs/lib/pagination/lines.js +1 -2
  7. package/dist/cjs/lib/pagination/position.js +2 -3
  8. package/dist/cjs/lib/pagination/use-pagination.js +1 -2
  9. package/dist/cjs/lib/theme.js +10 -10
  10. package/dist/cjs/lib/use-effect.js +1 -2
  11. package/dist/cjs/lib/use-keypress.js +1 -2
  12. package/dist/cjs/lib/use-memo.js +1 -2
  13. package/dist/cjs/lib/use-prefix.js +1 -2
  14. package/dist/cjs/lib/use-ref.js +1 -2
  15. package/dist/cjs/lib/use-state.js +1 -2
  16. package/dist/cjs/lib/utils.js +2 -3
  17. package/dist/cjs/types/index.d.ts +0 -1
  18. package/dist/cjs/types/lib/hook-engine.d.ts +1 -1
  19. package/dist/cjs/types/lib/pagination/lines.d.ts +1 -1
  20. package/dist/cjs/types/lib/pagination/use-pagination.d.ts +1 -1
  21. package/dist/cjs/types/lib/screen-manager.d.ts +1 -1
  22. package/dist/cjs/types/lib/use-effect.d.ts +2 -2
  23. package/dist/cjs/types/lib/use-keypress.d.ts +1 -1
  24. package/dist/cjs/types/lib/use-memo.d.ts +1 -1
  25. package/dist/esm/lib/Separator.mjs +2 -2
  26. package/dist/esm/lib/theme.mjs +10 -10
  27. package/dist/esm/types/index.d.mts +0 -1
  28. package/dist/esm/types/lib/hook-engine.d.mts +1 -1
  29. package/dist/esm/types/lib/pagination/lines.d.mts +1 -1
  30. package/dist/esm/types/lib/pagination/use-pagination.d.mts +1 -1
  31. package/dist/esm/types/lib/screen-manager.d.mts +1 -1
  32. package/dist/esm/types/lib/use-effect.d.mts +2 -2
  33. package/dist/esm/types/lib/use-keypress.d.mts +1 -1
  34. package/dist/esm/types/lib/use-memo.d.mts +1 -1
  35. package/package.json +7 -7
  36. package/dist/cjs/lib/read-line.type.js +0 -2
  37. package/dist/cjs/types/lib/read-line.type.d.ts +0 -9
  38. package/dist/esm/lib/read-line.type.mjs +0 -1
  39. package/dist/esm/types/lib/read-line.type.d.mts +0 -9
package/README.md CHANGED
@@ -15,7 +15,7 @@ yarn add @inquirer/core
15
15
  # Usage
16
16
 
17
17
  ```ts
18
- import chalk from 'chalk';
18
+ import colors from 'yoctocolors';
19
19
  import {
20
20
  createPrompt,
21
21
  useState,
@@ -44,12 +44,12 @@ const confirm = createPrompt<boolean, { message: string; default?: boolean }>(
44
44
  let formattedValue = value;
45
45
  let defaultValue = '';
46
46
  if (status === 'done') {
47
- formattedValue = chalk.cyan(value);
47
+ formattedValue = colors.cyan(value);
48
48
  } else {
49
- defaultValue = chalk.dim(config.default === false ? ' (y/N)' : ' (Y/n)');
49
+ defaultValue = colors.dim(config.default === false ? ' (y/N)' : ' (Y/n)');
50
50
  }
51
51
 
52
- const message = chalk.bold(config.message);
52
+ const message = colors.bold(config.message);
53
53
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
54
54
  },
55
55
  );
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Separator = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
7
+ const yoctocolors_cjs_1 = __importDefault(require("yoctocolors-cjs"));
8
8
  const figures_1 = __importDefault(require("@inquirer/figures"));
9
9
  /**
10
10
  * Separator object
@@ -16,7 +16,7 @@ class Separator {
16
16
  enumerable: true,
17
17
  configurable: true,
18
18
  writable: true,
19
- value: chalk_1.default.dim(Array.from({ length: 15 }).join(figures_1.default.line))
19
+ value: yoctocolors_cjs_1.default.dim(Array.from({ length: 15 }).join(figures_1.default.line))
20
20
  });
21
21
  Object.defineProperty(this, "type", {
22
22
  enumerable: true,
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.createPrompt = void 0;
29
+ exports.createPrompt = createPrompt;
30
30
  const readline = __importStar(require("node:readline"));
31
31
  const type_1 = require("@inquirer/type");
32
32
  const mute_stream_1 = __importDefault(require("mute-stream"));
@@ -116,4 +116,3 @@ function createPrompt(view) {
116
116
  };
117
117
  return prompt;
118
118
  }
119
- exports.createPrompt = createPrompt;
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  /* eslint @typescript-eslint/no-explicit-any: ["off"] */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.effectScheduler = exports.handleChange = exports.withPointer = exports.withUpdates = exports.readline = exports.withHooks = void 0;
4
+ exports.effectScheduler = void 0;
5
+ exports.withHooks = withHooks;
6
+ exports.readline = readline;
7
+ exports.withUpdates = withUpdates;
8
+ exports.withPointer = withPointer;
9
+ exports.handleChange = handleChange;
5
10
  const node_async_hooks_1 = require("node:async_hooks");
6
11
  const errors_mjs_1 = require('./errors.js');
7
12
  const hookStorage = new node_async_hooks_1.AsyncLocalStorage();
@@ -23,7 +28,6 @@ function withHooks(rl, cb) {
23
28
  cb(store);
24
29
  });
25
30
  }
26
- exports.withHooks = withHooks;
27
31
  // Safe getStore utility that'll return the store or throw if undefined.
28
32
  function getStore() {
29
33
  const store = hookStorage.getStore();
@@ -35,7 +39,6 @@ function getStore() {
35
39
  function readline() {
36
40
  return getStore().rl;
37
41
  }
38
- exports.readline = readline;
39
42
  // Merge state updates happening within the callback function to avoid multiple renders.
40
43
  function withUpdates(fn) {
41
44
  const wrapped = (...args) => {
@@ -54,7 +57,6 @@ function withUpdates(fn) {
54
57
  };
55
58
  return node_async_hooks_1.AsyncResource.bind(wrapped);
56
59
  }
57
- exports.withUpdates = withUpdates;
58
60
  function withPointer(cb) {
59
61
  const store = getStore();
60
62
  const { index } = store;
@@ -71,11 +73,9 @@ function withPointer(cb) {
71
73
  store.index++;
72
74
  return returnValue;
73
75
  }
74
- exports.withPointer = withPointer;
75
76
  function handleChange() {
76
77
  getStore().handleChange();
77
78
  }
78
- exports.handleChange = handleChange;
79
79
  exports.effectScheduler = {
80
80
  queue(cb) {
81
81
  const store = getStore();
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeTheme = void 0;
3
+ exports.makeTheme = makeTheme;
4
4
  const theme_mjs_1 = require('./theme.js');
5
5
  function isPlainObject(value) {
6
6
  if (typeof value !== 'object' || value === null)
@@ -31,4 +31,3 @@ function makeTheme(...themes) {
31
31
  ];
32
32
  return deepMerge(...themesToMerge);
33
33
  }
34
- exports.makeTheme = makeTheme;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lines = void 0;
3
+ exports.lines = lines;
4
4
  const utils_mjs_1 = require('../utils.js');
5
5
  function split(content, width) {
6
6
  return (0, utils_mjs_1.breakLines)(content, width).split('\n');
@@ -60,4 +60,3 @@ function lines({ items, width, renderItem, active, position: requested, pageSize
60
60
  }
61
61
  return pageBuffer.filter((line) => typeof line === 'string');
62
62
  }
63
- exports.lines = lines;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.infinite = exports.finite = void 0;
3
+ exports.finite = finite;
4
+ exports.infinite = infinite;
4
5
  /**
5
6
  * Creates the next position for the active item considering a finite list of
6
7
  * items to be rendered on a page.
@@ -13,7 +14,6 @@ function finite({ active, pageSize, total, }) {
13
14
  return active + pageSize - total;
14
15
  return middle;
15
16
  }
16
- exports.finite = finite;
17
17
  /**
18
18
  * Creates the next position for the active item considering an infinitely
19
19
  * looping list of items to be rendered on the page.
@@ -29,4 +29,3 @@ function infinite({ active, lastActive, total, pageSize, pointer, }) {
29
29
  }
30
30
  return pointer;
31
31
  }
32
- exports.infinite = infinite;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usePagination = void 0;
3
+ exports.usePagination = usePagination;
4
4
  const use_ref_mjs_1 = require('../use-ref.js');
5
5
  const utils_mjs_1 = require('../utils.js');
6
6
  const lines_mjs_1 = require('./lines.js');
@@ -31,4 +31,3 @@ function usePagination({ items, active, renderItem, pageSize, loop = true, }) {
31
31
  pageSize,
32
32
  }).join('\n');
33
33
  }
34
- exports.usePagination = usePagination;
@@ -4,21 +4,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.defaultTheme = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
7
+ const yoctocolors_cjs_1 = __importDefault(require("yoctocolors-cjs"));
8
8
  const cli_spinners_1 = __importDefault(require("cli-spinners"));
9
9
  exports.defaultTheme = {
10
- prefix: chalk_1.default.green('?'),
10
+ prefix: yoctocolors_cjs_1.default.green('?'),
11
11
  spinner: {
12
12
  interval: cli_spinners_1.default.dots.interval,
13
- frames: cli_spinners_1.default.dots.frames.map((frame) => chalk_1.default.yellow(frame)),
13
+ frames: cli_spinners_1.default.dots.frames.map((frame) => yoctocolors_cjs_1.default.yellow(frame)),
14
14
  },
15
15
  style: {
16
- answer: chalk_1.default.cyan,
17
- message: chalk_1.default.bold,
18
- error: (text) => chalk_1.default.red(`> ${text}`),
19
- defaultAnswer: (text) => chalk_1.default.dim(`(${text})`),
20
- help: chalk_1.default.dim,
21
- highlight: chalk_1.default.cyan,
22
- key: (text) => chalk_1.default.cyan.bold(`<${text}>`),
16
+ answer: yoctocolors_cjs_1.default.cyan,
17
+ message: yoctocolors_cjs_1.default.bold,
18
+ error: (text) => yoctocolors_cjs_1.default.red(`> ${text}`),
19
+ defaultAnswer: (text) => yoctocolors_cjs_1.default.dim(`(${text})`),
20
+ help: yoctocolors_cjs_1.default.dim,
21
+ highlight: yoctocolors_cjs_1.default.cyan,
22
+ key: (text) => yoctocolors_cjs_1.default.cyan(yoctocolors_cjs_1.default.bold(`<${text}>`)),
23
23
  },
24
24
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useEffect = void 0;
3
+ exports.useEffect = useEffect;
4
4
  const hook_engine_mjs_1 = require('./hook-engine.js');
5
5
  function useEffect(cb, depArray) {
6
6
  (0, hook_engine_mjs_1.withPointer)((pointer) => {
@@ -12,4 +12,3 @@ function useEffect(cb, depArray) {
12
12
  pointer.set(depArray);
13
13
  });
14
14
  }
15
- exports.useEffect = useEffect;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useKeypress = void 0;
3
+ exports.useKeypress = useKeypress;
4
4
  const use_ref_mjs_1 = require('./use-ref.js');
5
5
  const use_effect_mjs_1 = require('./use-effect.js');
6
6
  const hook_engine_mjs_1 = require('./hook-engine.js');
@@ -17,4 +17,3 @@ function useKeypress(userHandler) {
17
17
  };
18
18
  }, []);
19
19
  }
20
- exports.useKeypress = useKeypress;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useMemo = void 0;
3
+ exports.useMemo = useMemo;
4
4
  const hook_engine_mjs_1 = require('./hook-engine.js');
5
5
  function useMemo(fn, dependencies) {
6
6
  return (0, hook_engine_mjs_1.withPointer)((pointer) => {
@@ -15,4 +15,3 @@ function useMemo(fn, dependencies) {
15
15
  return prev.value;
16
16
  });
17
17
  }
18
- exports.useMemo = useMemo;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usePrefix = void 0;
3
+ exports.usePrefix = usePrefix;
4
4
  const node_async_hooks_1 = require("node:async_hooks");
5
5
  const use_state_mjs_1 = require('./use-state.js');
6
6
  const use_effect_mjs_1 = require('./use-effect.js');
@@ -35,4 +35,3 @@ function usePrefix({ isLoading = false, theme, }) {
35
35
  }
36
36
  return prefix;
37
37
  }
38
- exports.usePrefix = usePrefix;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useRef = void 0;
3
+ exports.useRef = useRef;
4
4
  const use_state_mjs_1 = require('./use-state.js');
5
5
  function useRef(val) {
6
6
  return (0, use_state_mjs_1.useState)({ current: val })[0];
7
7
  }
8
- exports.useRef = useRef;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useState = void 0;
3
+ exports.useState = useState;
4
4
  const hook_engine_mjs_1 = require('./hook-engine.js');
5
5
  function useState(defaultValue) {
6
6
  return (0, hook_engine_mjs_1.withPointer)((pointer) => {
@@ -20,4 +20,3 @@ function useState(defaultValue) {
20
20
  return [value, setFn];
21
21
  });
22
22
  }
23
- exports.useState = useState;
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.readlineWidth = exports.breakLines = void 0;
6
+ exports.breakLines = breakLines;
7
+ exports.readlineWidth = readlineWidth;
7
8
  const cli_width_1 = __importDefault(require("cli-width"));
8
9
  const wrap_ansi_1 = __importDefault(require("wrap-ansi"));
9
10
  const hook_engine_mjs_1 = require('./hook-engine.js');
@@ -22,7 +23,6 @@ function breakLines(content, width) {
22
23
  .map((str) => str.trimEnd()))
23
24
  .join('\n');
24
25
  }
25
- exports.breakLines = breakLines;
26
26
  /**
27
27
  * Returns the width of the active readline, or 80 as default value.
28
28
  * @returns {number}
@@ -30,4 +30,3 @@ exports.breakLines = breakLines;
30
30
  function readlineWidth() {
31
31
  return (0, cli_width_1.default)({ defaultWidth: 80, output: (0, hook_engine_mjs_1.readline)().output });
32
32
  }
33
- exports.readlineWidth = readlineWidth;
@@ -11,4 +11,3 @@ export type { Theme } from './lib/theme.js';
11
11
  export { usePagination } from './lib/pagination/use-pagination.js';
12
12
  export { createPrompt } from './lib/create-prompt.js';
13
13
  export { Separator } from './lib/Separator.js';
14
- export { type InquirerReadline } from './lib/read-line.type.js';
@@ -1,4 +1,4 @@
1
- import type { InquirerReadline } from './read-line.type.js';
1
+ import type { InquirerReadline } from '@inquirer/type';
2
2
  type HookStore = {
3
3
  rl: InquirerReadline;
4
4
  hooks: any[];
@@ -12,7 +12,7 @@ export type Layout<T> = {
12
12
  * of the active item get rendered as possible.
13
13
  */
14
14
  export declare function lines<T>({ items, width, renderItem, active, position: requested, pageSize, }: {
15
- items: readonly T[];
15
+ items: ReadonlyArray<T>;
16
16
  /** The width of a rendered line in characters. */
17
17
  width: number;
18
18
  /** Renders an item as part of a page. */
@@ -2,7 +2,7 @@ import type { Prettify } from '@inquirer/type';
2
2
  import { type Theme } from '../theme.js';
3
3
  import { type Layout } from './lines.js';
4
4
  export declare function usePagination<T>({ items, active, renderItem, pageSize, loop, }: {
5
- items: readonly T[];
5
+ items: ReadonlyArray<T>;
6
6
  /** The index of the active item. */
7
7
  active: number;
8
8
  /** Renders an item as part of a page. */
@@ -1,4 +1,4 @@
1
- import type { InquirerReadline } from './read-line.type.js';
1
+ import type { InquirerReadline } from '@inquirer/type';
2
2
  export default class ScreenManager {
3
3
  private readonly rl;
4
4
  private height;
@@ -1,2 +1,2 @@
1
- import type { InquirerReadline } from './read-line.type.js';
2
- export declare function useEffect(cb: (rl: InquirerReadline) => void | (() => void), depArray: unknown[]): void;
1
+ import type { InquirerReadline } from '@inquirer/type';
2
+ export declare function useEffect(cb: (rl: InquirerReadline) => void | (() => void), depArray: ReadonlyArray<unknown>): void;
@@ -1,3 +1,3 @@
1
- import { type InquirerReadline } from './read-line.type.js';
1
+ import { type InquirerReadline } from '@inquirer/type';
2
2
  import { type KeypressEvent } from './key.js';
3
3
  export declare function useKeypress(userHandler: (event: KeypressEvent, rl: InquirerReadline) => void): void;
@@ -1 +1 @@
1
- export declare function useMemo<Value>(fn: () => Value, dependencies: unknown[]): Value;
1
+ export declare function useMemo<Value>(fn: () => Value, dependencies: ReadonlyArray<unknown>): Value;
@@ -1,11 +1,11 @@
1
- import chalk from 'chalk';
1
+ import colors from 'yoctocolors-cjs';
2
2
  import figures from '@inquirer/figures';
3
3
  /**
4
4
  * Separator object
5
5
  * Used to space/separate choices group
6
6
  */
7
7
  export class Separator {
8
- separator = chalk.dim(Array.from({ length: 15 }).join(figures.line));
8
+ separator = colors.dim(Array.from({ length: 15 }).join(figures.line));
9
9
  type = 'separator';
10
10
  constructor(separator) {
11
11
  if (separator) {
@@ -1,18 +1,18 @@
1
- import chalk from 'chalk';
1
+ import colors from 'yoctocolors-cjs';
2
2
  import spinners from 'cli-spinners';
3
3
  export const defaultTheme = {
4
- prefix: chalk.green('?'),
4
+ prefix: colors.green('?'),
5
5
  spinner: {
6
6
  interval: spinners.dots.interval,
7
- frames: spinners.dots.frames.map((frame) => chalk.yellow(frame)),
7
+ frames: spinners.dots.frames.map((frame) => colors.yellow(frame)),
8
8
  },
9
9
  style: {
10
- answer: chalk.cyan,
11
- message: chalk.bold,
12
- error: (text) => chalk.red(`> ${text}`),
13
- defaultAnswer: (text) => chalk.dim(`(${text})`),
14
- help: chalk.dim,
15
- highlight: chalk.cyan,
16
- key: (text) => chalk.cyan.bold(`<${text}>`),
10
+ answer: colors.cyan,
11
+ message: colors.bold,
12
+ error: (text) => colors.red(`> ${text}`),
13
+ defaultAnswer: (text) => colors.dim(`(${text})`),
14
+ help: colors.dim,
15
+ highlight: colors.cyan,
16
+ key: (text) => colors.cyan(colors.bold(`<${text}>`)),
17
17
  },
18
18
  };
@@ -11,4 +11,3 @@ export type { Theme } from './lib/theme.mjs';
11
11
  export { usePagination } from './lib/pagination/use-pagination.mjs';
12
12
  export { createPrompt } from './lib/create-prompt.mjs';
13
13
  export { Separator } from './lib/Separator.mjs';
14
- export { type InquirerReadline } from './lib/read-line.type.mjs';
@@ -1,4 +1,4 @@
1
- import type { InquirerReadline } from './read-line.type.mjs';
1
+ import type { InquirerReadline } from '@inquirer/type';
2
2
  type HookStore = {
3
3
  rl: InquirerReadline;
4
4
  hooks: any[];
@@ -12,7 +12,7 @@ export type Layout<T> = {
12
12
  * of the active item get rendered as possible.
13
13
  */
14
14
  export declare function lines<T>({ items, width, renderItem, active, position: requested, pageSize, }: {
15
- items: readonly T[];
15
+ items: ReadonlyArray<T>;
16
16
  /** The width of a rendered line in characters. */
17
17
  width: number;
18
18
  /** Renders an item as part of a page. */
@@ -2,7 +2,7 @@ import type { Prettify } from '@inquirer/type';
2
2
  import { type Theme } from '../theme.mjs';
3
3
  import { type Layout } from './lines.mjs';
4
4
  export declare function usePagination<T>({ items, active, renderItem, pageSize, loop, }: {
5
- items: readonly T[];
5
+ items: ReadonlyArray<T>;
6
6
  /** The index of the active item. */
7
7
  active: number;
8
8
  /** Renders an item as part of a page. */
@@ -1,4 +1,4 @@
1
- import type { InquirerReadline } from './read-line.type.mjs';
1
+ import type { InquirerReadline } from '@inquirer/type';
2
2
  export default class ScreenManager {
3
3
  private readonly rl;
4
4
  private height;
@@ -1,2 +1,2 @@
1
- import type { InquirerReadline } from './read-line.type.mjs';
2
- export declare function useEffect(cb: (rl: InquirerReadline) => void | (() => void), depArray: unknown[]): void;
1
+ import type { InquirerReadline } from '@inquirer/type';
2
+ export declare function useEffect(cb: (rl: InquirerReadline) => void | (() => void), depArray: ReadonlyArray<unknown>): void;
@@ -1,3 +1,3 @@
1
- import { type InquirerReadline } from './read-line.type.mjs';
1
+ import { type InquirerReadline } from '@inquirer/type';
2
2
  import { type KeypressEvent } from './key.mjs';
3
3
  export declare function useKeypress(userHandler: (event: KeypressEvent, rl: InquirerReadline) => void): void;
@@ -1 +1 @@
1
- export declare function useMemo<Value>(fn: () => Value, dependencies: unknown[]): Value;
1
+ export declare function useMemo<Value>(fn: () => Value, dependencies: ReadonlyArray<unknown>): Value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/core",
3
- "version": "8.2.3",
3
+ "version": "9.0.0",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },
@@ -58,21 +58,21 @@
58
58
  "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/core/README.md",
59
59
  "dependencies": {
60
60
  "@inquirer/figures": "^1.0.3",
61
- "@inquirer/type": "^1.3.3",
61
+ "@inquirer/type": "^1.4.0",
62
62
  "@types/mute-stream": "^0.0.4",
63
- "@types/node": "^20.14.6",
63
+ "@types/node": "^20.14.9",
64
64
  "@types/wrap-ansi": "^3.0.0",
65
65
  "ansi-escapes": "^4.3.2",
66
- "chalk": "^4.1.2",
67
66
  "cli-spinners": "^2.9.2",
68
67
  "cli-width": "^4.1.0",
69
68
  "mute-stream": "^1.0.0",
70
69
  "signal-exit": "^4.1.0",
71
70
  "strip-ansi": "^6.0.1",
72
- "wrap-ansi": "^6.2.0"
71
+ "wrap-ansi": "^6.2.0",
72
+ "yoctocolors-cjs": "^2.1.1"
73
73
  },
74
74
  "devDependencies": {
75
- "@inquirer/testing": "^2.1.22"
75
+ "@inquirer/testing": "^2.1.24"
76
76
  },
77
77
  "scripts": {
78
78
  "tsc": "yarn run tsc:esm && yarn run tsc:cjs",
@@ -97,5 +97,5 @@
97
97
  }
98
98
  },
99
99
  "sideEffects": false,
100
- "gitHead": "cc52a353abb1b7f3b3dc81b9e6da7ed478099dbf"
100
+ "gitHead": "fc27d575bceb96466cb8da8524c26d4eb2a77df0"
101
101
  }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import * as readline from 'node:readline';
4
- import MuteStream from 'mute-stream';
5
- export type InquirerReadline = readline.ReadLine & {
6
- output: MuteStream;
7
- input: NodeJS.ReadableStream;
8
- clearLine: (dir: 0 | 1 | -1) => void;
9
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import * as readline from 'node:readline';
4
- import MuteStream from 'mute-stream';
5
- export type InquirerReadline = readline.ReadLine & {
6
- output: MuteStream;
7
- input: NodeJS.ReadableStream;
8
- clearLine: (dir: 0 | 1 | -1) => void;
9
- };