@inquirer/testing 2.1.45 → 2.1.47

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
@@ -2,6 +2,16 @@
2
2
 
3
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
+ # Special Thanks
6
+
7
+ <div align="center" markdown="1">
8
+
9
+ [![Graphite](https://github.com/user-attachments/assets/53db40ca-2254-481a-a094-6597f8716e29)](https://graphite.dev/?utm_source=npmjs&utm_medium=repo&utm_campaign=inquirerjs)<br>
10
+
11
+ ### [Graphite is the AI developer productivity platform helping teams on GitHub ship higher quality software, faster](https://graphite.dev/?utm_source=npmjs&utm_medium=repo&utm_campaign=inquirerjs)
12
+
13
+ </div>
14
+
5
15
  # Installation
6
16
 
7
17
  <table>
@@ -2,17 +2,18 @@ import MuteStream from 'mute-stream';
2
2
  import type { Prompt, Context } from '@inquirer/type';
3
3
  export declare function render<const Props, const Value>(prompt: Prompt<Value, Props>, props: Props, options?: Context): Promise<{
4
4
  answer: Promise<Value> & {
5
+ /** @deprecated pass an AbortSignal in the context options instead. See {@link https://github.com/SBoudrias/Inquirer.js#canceling-prompt} */
5
6
  cancel: () => void;
6
7
  };
7
8
  input: MuteStream;
8
9
  events: {
9
- keypress(key: string | {
10
- name?: string | undefined;
11
- ctrl?: boolean | undefined;
12
- meta?: boolean | undefined;
13
- shift?: boolean | undefined;
14
- }): void;
15
- type(text: string): void;
10
+ keypress: (key: string | {
11
+ name?: string;
12
+ ctrl?: boolean;
13
+ meta?: boolean;
14
+ shift?: boolean;
15
+ }) => void;
16
+ type: (text: string) => void;
16
17
  };
17
18
  getScreen: ({ raw }?: {
18
19
  raw?: boolean;
@@ -67,7 +67,7 @@ async function render(prompt, props, options) {
67
67
  input,
68
68
  events,
69
69
  getScreen: ({ raw } = {}) => {
70
- const lastScreen = output.getLastChunk({ raw });
70
+ const lastScreen = output.getLastChunk({ raw: Boolean(raw) });
71
71
  return raw ? lastScreen : (0, node_util_1.stripVTControlCharacters)(lastScreen).trim();
72
72
  },
73
73
  getFullOutput: () => {
@@ -2,17 +2,18 @@ import MuteStream from 'mute-stream';
2
2
  import type { Prompt, Context } from '@inquirer/type';
3
3
  export declare function render<const Props, const Value>(prompt: Prompt<Value, Props>, props: Props, options?: Context): Promise<{
4
4
  answer: Promise<Value> & {
5
+ /** @deprecated pass an AbortSignal in the context options instead. See {@link https://github.com/SBoudrias/Inquirer.js#canceling-prompt} */
5
6
  cancel: () => void;
6
7
  };
7
8
  input: MuteStream;
8
9
  events: {
9
- keypress(key: string | {
10
- name?: string | undefined;
11
- ctrl?: boolean | undefined;
12
- meta?: boolean | undefined;
13
- shift?: boolean | undefined;
14
- }): void;
15
- type(text: string): void;
10
+ keypress: (key: string | {
11
+ name?: string;
12
+ ctrl?: boolean;
13
+ meta?: boolean;
14
+ shift?: boolean;
15
+ }) => void;
16
+ type: (text: string) => void;
16
17
  };
17
18
  getScreen: ({ raw }?: {
18
19
  raw?: boolean;
package/dist/esm/index.js CHANGED
@@ -61,7 +61,7 @@ export async function render(prompt, props, options) {
61
61
  input,
62
62
  events,
63
63
  getScreen: ({ raw } = {}) => {
64
- const lastScreen = output.getLastChunk({ raw });
64
+ const lastScreen = output.getLastChunk({ raw: Boolean(raw) });
65
65
  return raw ? lastScreen : stripVTControlCharacters(lastScreen).trim();
66
66
  },
67
67
  getFullOutput: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/testing",
3
- "version": "2.1.45",
3
+ "version": "2.1.47",
4
4
  "description": "Inquirer testing utilities",
5
5
  "keywords": [
6
6
  "answer",
@@ -77,15 +77,14 @@
77
77
  "tsc": "tshy"
78
78
  },
79
79
  "dependencies": {
80
- "@inquirer/type": "^3.0.5",
80
+ "@inquirer/type": "^3.0.7",
81
81
  "ansi-escapes": "^4.3.2",
82
82
  "mute-stream": "^2.0.0"
83
83
  },
84
84
  "devDependencies": {
85
- "@arethetypeswrong/cli": "^0.17.4",
86
- "@repo/tsconfig": "workspace:*",
85
+ "@arethetypeswrong/cli": "^0.18.1",
87
86
  "@types/mute-stream": "^0.0.4",
88
- "@types/node": "^22.13.10",
87
+ "@types/node": "^22.14.0",
89
88
  "tshy": "^3.0.2"
90
89
  },
91
90
  "engines": {
@@ -108,5 +107,5 @@
108
107
  "optional": true
109
108
  }
110
109
  },
111
- "gitHead": "79a0b3e7446b4a3de09445bf2f4031e4190b6382"
110
+ "gitHead": "85d4642b4a7a2229ea60167fc7cc25fe6fea2f18"
112
111
  }