@inquirer/testing 2.1.25 → 2.1.27

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
@@ -1,6 +1,6 @@
1
1
  # `@inquirer/testing`
2
2
 
3
- The `@inquirer/testing` package is Inquirer's answer to testing prompts [built with `@inquirer/core`](https://github.com/SBoudrias/Inquirer.js/tree/master/packages/core).
3
+ The `@inquirer/testing` package is Inquirer's answer to testing prompts [built with `@inquirer/core`](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/core).
4
4
 
5
5
  # Installation
6
6
 
@@ -72,7 +72,7 @@ The core utility of `@inquirer/testing` is the `render()` function. This `render
72
72
  3. `events` (`{ keypress: (name | Key) => void, type: (string) => void }`) Is the utilities allowing you to interact with the prompt. Use it to trigger keypress events, or typing any input.
73
73
  4. `getFullOutput` (`() => string`) Return a raw dump of everything that got sent on the output stream.
74
74
 
75
- You can refer to [the `@inquirer/input` prompt test suite](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/input/input.test.mts) as a practical example.
75
+ You can refer to [the `@inquirer/input` prompt test suite](https://github.com/SBoudrias/Inquirer.js/blob/main/packages/input/input.test.mts) as a practical example.
76
76
 
77
77
  # License
78
78
 
@@ -1,7 +1,7 @@
1
1
  import MuteStream from 'mute-stream';
2
- import type { Prompt } from '@inquirer/type';
3
- export declare function render<TestedPrompt extends Prompt<unknown, unknown>>(prompt: TestedPrompt, props: Parameters<TestedPrompt>[0], options?: Parameters<TestedPrompt>[1]): Promise<{
4
- answer: import("@inquirer/type").CancelablePromise<unknown>;
2
+ import type { Prompt, Context } from '@inquirer/type';
3
+ export declare function render<const Props, const Value, const TestedPrompt extends Prompt<Value, Props>>(prompt: TestedPrompt, props: Props, options?: Context): Promise<{
4
+ answer: import("@inquirer/type").CancelablePromise<Value>;
5
5
  input: MuteStream;
6
6
  events: {
7
7
  keypress(key: string | {
@@ -1,7 +1,7 @@
1
1
  import MuteStream from 'mute-stream';
2
- import type { Prompt } from '@inquirer/type';
3
- export declare function render<TestedPrompt extends Prompt<unknown, unknown>>(prompt: TestedPrompt, props: Parameters<TestedPrompt>[0], options?: Parameters<TestedPrompt>[1]): Promise<{
4
- answer: import("@inquirer/type").CancelablePromise<unknown>;
2
+ import type { Prompt, Context } from '@inquirer/type';
3
+ export declare function render<const Props, const Value, const TestedPrompt extends Prompt<Value, Props>>(prompt: TestedPrompt, props: Props, options?: Context): Promise<{
4
+ answer: import("@inquirer/type").CancelablePromise<Value>;
5
5
  input: MuteStream;
6
6
  events: {
7
7
  keypress(key: string | {
@@ -0,0 +1,19 @@
1
+ import MuteStream from 'mute-stream';
2
+ import type { Prompt } from '@inquirer/type';
3
+ export declare function render<TestedPrompt extends Prompt<unknown, unknown>>(prompt: TestedPrompt, props: Parameters<TestedPrompt>[0], options?: Parameters<TestedPrompt>[1]): Promise<{
4
+ answer: import("@inquirer/type").CancelablePromise<unknown>;
5
+ input: MuteStream;
6
+ events: {
7
+ keypress(key: string | {
8
+ name?: string | undefined;
9
+ ctrl?: boolean | undefined;
10
+ meta?: boolean | undefined;
11
+ shift?: boolean | undefined;
12
+ }): void;
13
+ type(text: string): void;
14
+ };
15
+ getScreen({ raw }?: {
16
+ raw?: boolean;
17
+ }): string;
18
+ getFullOutput(): string;
19
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/testing",
3
- "version": "2.1.25",
3
+ "version": "2.1.27",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },
@@ -58,11 +58,11 @@
58
58
  ],
59
59
  "author": "Simon Boudrias <admin@simonboudrias.com>",
60
60
  "license": "MIT",
61
- "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/testing/README.md",
61
+ "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/main/packages/testing/README.md",
62
62
  "dependencies": {
63
- "@inquirer/type": "^1.4.0",
63
+ "@inquirer/type": "^1.5.0",
64
64
  "@types/mute-stream": "^0.0.4",
65
- "@types/node": "^20.14.9",
65
+ "@types/node": "^20.14.11",
66
66
  "ansi-escapes": "^4.3.2",
67
67
  "mute-stream": "^1.0.0",
68
68
  "strip-ansi": "^6.0.1"
@@ -71,7 +71,7 @@
71
71
  "tsc": "yarn run tsc:esm && yarn run tsc:cjs",
72
72
  "tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
73
73
  "tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
74
- "dev": "tsc -p ./tsconfig.json --watch",
74
+ "tsc:watch": "tsc -p ./tsconfig.json --watch",
75
75
  "attw": "attw --pack"
76
76
  },
77
77
  "exports": {
@@ -87,5 +87,5 @@
87
87
  }
88
88
  },
89
89
  "sideEffects": false,
90
- "gitHead": "2285f2c043448ff4317635cf6481df7ffda2d3bd"
90
+ "gitHead": "f2c4983dd390c6244fb4668a8e87c9e786e4326f"
91
91
  }