@oclif/test 3.2.1 → 3.2.2
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/lib/command.js +1 -1
- package/lib/hook.js +2 -3
- package/lib/index.d.ts +1 -1
- package/package.json +7 -7
package/lib/command.js
CHANGED
|
@@ -16,7 +16,7 @@ function command(args, opts = {}) {
|
|
|
16
16
|
args = castArray(args);
|
|
17
17
|
const [id, ...extra] = args;
|
|
18
18
|
const cmdId = (0, core_1.toStandardizedId)(id, ctx.config);
|
|
19
|
-
ctx.expectation
|
|
19
|
+
ctx.expectation ||= `runs ${args.join(' ')}`;
|
|
20
20
|
await ctx.config.runHook('init', { argv: extra, id: cmdId });
|
|
21
21
|
ctx.returned = await ctx.config.runCommand(cmdId, extra);
|
|
22
22
|
},
|
package/lib/hook.js
CHANGED
|
@@ -17,9 +17,8 @@ exports.default = (event, hookOpts = {}, options = {}) => ({
|
|
|
17
17
|
async run(ctx) {
|
|
18
18
|
if (!event)
|
|
19
19
|
throw new Error('no hook provided');
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
ctx.expectation = ctx.expectation || `runs ${event} hook`;
|
|
20
|
+
ctx.config ||= await (0, load_config_1.loadConfig)(options).run({});
|
|
21
|
+
ctx.expectation ||= `runs ${event} hook`;
|
|
23
22
|
ctx.returned = await ctx.config.runHook(event, hookOpts || {});
|
|
24
23
|
},
|
|
25
24
|
});
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="sinon" />
|
|
2
2
|
import { loadConfig } from './load-config';
|
|
3
|
-
export declare const test: import("fancy-test
|
|
3
|
+
export declare const test: import("fancy-test").Fancy<import("fancy-test/lib/types").Context, {
|
|
4
4
|
skip: {
|
|
5
5
|
output: unknown;
|
|
6
6
|
args: [];
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/test",
|
|
3
3
|
"description": "test helpers for oclif components",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.2",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/test/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^3.
|
|
8
|
+
"@oclif/core": "^3.23.0",
|
|
9
9
|
"chai": "^4.4.1",
|
|
10
10
|
"fancy-test": "^3.0.11"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@commitlint/config-conventional": "^18.6.
|
|
13
|
+
"@commitlint/config-conventional": "^18.6.2",
|
|
14
14
|
"@oclif/prettier-config": "^0.2.1",
|
|
15
15
|
"@types/cli-progress": "^3.11.5",
|
|
16
16
|
"@types/mocha": "^10",
|
|
17
17
|
"@types/node": "^18",
|
|
18
18
|
"commitlint": "^18.6.1",
|
|
19
|
-
"eslint": "^8.
|
|
20
|
-
"eslint-config-oclif": "^5.0.
|
|
21
|
-
"eslint-config-oclif-typescript": "^3.0.
|
|
19
|
+
"eslint": "^8.57.0",
|
|
20
|
+
"eslint-config-oclif": "^5.0.3",
|
|
21
|
+
"eslint-config-oclif-typescript": "^3.0.48",
|
|
22
22
|
"eslint-config-prettier": "^9.1.0",
|
|
23
23
|
"globby": "^11.0.1",
|
|
24
24
|
"husky": "^8.0.3",
|
|
25
25
|
"lint-staged": "^15.2.2",
|
|
26
26
|
"mocha": "^10",
|
|
27
|
-
"nock": "^13.5.
|
|
27
|
+
"nock": "^13.5.4",
|
|
28
28
|
"prettier": "^3.2.5",
|
|
29
29
|
"shx": "^0.3.3",
|
|
30
30
|
"ts-node": "^10.9.2",
|