@oclif/test 4.1.1 → 4.1.3
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 +5 -1
- package/lib/index.js +2 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -14,7 +14,11 @@ See the [V4 Migration Guide](./MIGRATION.md) if you are migrating from v3 or old
|
|
|
14
14
|
|
|
15
15
|
`@oclif/test` provides a handful of utilities that make it easy to test your [oclif](https://oclif.io) CLI.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
> [!NOTE]
|
|
18
|
+
> In order for these utilities to capture all output to the terminal, you must disable any console output interception/suppression features in your test framework.
|
|
19
|
+
>
|
|
20
|
+
> - For Jest users, enable [the `verbose` flag](https://jestjs.io/docs/configuration#verbose-boolean) in your Jest config.
|
|
21
|
+
> - For Vitest users, enable [the `disableConsoleIntercept` flag](https://vitest.dev/guide/cli.html#disableconsoleintercept) in your Vitest config.
|
|
18
22
|
|
|
19
23
|
### `captureOutput`
|
|
20
24
|
|
package/lib/index.js
CHANGED
|
@@ -98,8 +98,8 @@ async function captureOutput(fn, opts) {
|
|
|
98
98
|
}
|
|
99
99
|
catch (error) {
|
|
100
100
|
return {
|
|
101
|
-
...(error instanceof core_1.Errors.CLIError && { error:
|
|
102
|
-
...(error instanceof Error && { error:
|
|
101
|
+
...(error instanceof core_1.Errors.CLIError && { error: Object.assign(error, { message: toString(error.message) }) }),
|
|
102
|
+
...(error instanceof Error && { error: Object.assign(error, { message: toString(error.message) }) }),
|
|
103
103
|
stderr: getStderr(),
|
|
104
104
|
stdout: getStdout(),
|
|
105
105
|
};
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/test",
|
|
3
3
|
"description": "test helpers for oclif components",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.3",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/test/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"ansis": "^3.3.2",
|
|
9
|
-
"debug": "^4.
|
|
9
|
+
"debug": "^4.4.0"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
12
|
"@oclif/core": ">= 3.0.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@commitlint/config-conventional": "^18.6.3",
|
|
16
|
-
"@oclif/core": "^4.0.
|
|
16
|
+
"@oclif/core": "^4.0.34",
|
|
17
17
|
"@oclif/prettier-config": "^0.2.1",
|
|
18
18
|
"@types/chai": "^5.0.1",
|
|
19
19
|
"@types/debug": "^4.1.12",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"chai": "^5.1.2",
|
|
23
23
|
"commitlint": "^18.6.1",
|
|
24
24
|
"eslint": "^8.57.1",
|
|
25
|
-
"eslint-config-oclif": "^5.2.
|
|
25
|
+
"eslint-config-oclif": "^5.2.2",
|
|
26
26
|
"eslint-config-oclif-typescript": "^3.1.12",
|
|
27
27
|
"eslint-config-prettier": "^9.1.0",
|
|
28
|
-
"husky": "^9.1.
|
|
28
|
+
"husky": "^9.1.7",
|
|
29
29
|
"lint-staged": "^15.2.10",
|
|
30
30
|
"mocha": "^10",
|
|
31
|
-
"prettier": "^3.
|
|
31
|
+
"prettier": "^3.4.2",
|
|
32
32
|
"shx": "^0.3.3",
|
|
33
33
|
"tsx": "^4.19.2",
|
|
34
|
-
"typescript": "^5.
|
|
34
|
+
"typescript": "^5.7.2"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=18.0.0"
|