@oclif/test 2.0.3 → 2.1.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.1.0](https://github.com/oclif/test/compare/v2.0.3...v2.1.0) (2022-02-10)
6
+
7
+
8
+ ### Features
9
+
10
+ * support commands with spaces ([531f8e0](https://github.com/oclif/test/commit/531f8e08e101e084a050410a6d63ac28c3277de9))
11
+
5
12
  ### [2.0.3](https://github.com/oclif/test/compare/v2.0.2...v2.0.3) (2021-12-08)
6
13
 
7
14
 
package/README.md CHANGED
@@ -4,8 +4,7 @@
4
4
  test helpers for oclif components
5
5
 
6
6
  [![Version](https://img.shields.io/npm/v/@oclif/test.svg)](https://npmjs.org/package/@oclif/test)
7
- [![CircleCI](https://circleci.com/gh/oclif/test/tree/master.svg?style=svg)](https://circleci.com/gh/oclif/test/tree/master)
8
- [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/test?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/test/branch/master)
7
+ [![CircleCI](https://circleci.com/gh/oclif/test/tree/main.svg?style=svg)](https://circleci.com/gh/oclif/test/tree/main)
9
8
  [![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/test/badge.svg)](https://snyk.io/test/npm/@oclif/test)
10
9
  [![Downloads/week](https://img.shields.io/npm/dw/@oclif/test.svg)](https://npmjs.org/package/@oclif/test)
11
- [![License](https://img.shields.io/npm/l/@oclif/test.svg)](https://github.com/oclif/test/blob/master/package.json)
10
+ [![License](https://img.shields.io/npm/l/@oclif/test.svg)](https://github.com/oclif/test/blob/main/package.json)
package/lib/command.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
+ const core_1 = require("@oclif/core");
4
5
  const load_config_1 = require("./load-config");
5
6
  const castArray = (input) => {
6
7
  if (input === undefined)
@@ -10,15 +11,14 @@ const castArray = (input) => {
10
11
  function command(args, opts = {}) {
11
12
  return {
12
13
  async run(ctx) {
13
- // eslint-disable-next-line require-atomic-updates
14
14
  if (!ctx.config || opts.reset)
15
15
  ctx.config = await (0, load_config_1.loadConfig)(opts).run({});
16
16
  args = castArray(args);
17
17
  const [id, ...extra] = args;
18
- // eslint-disable-next-line require-atomic-updates
18
+ const cmdId = (0, core_1.toStandardizedId)(id, ctx.config);
19
19
  ctx.expectation = ctx.expectation || `runs ${args.join(' ')}`;
20
- await ctx.config.runHook('init', { id, argv: extra });
21
- await ctx.config.runCommand(id, extra);
20
+ await ctx.config.runHook('init', { id: cmdId, argv: extra });
21
+ await ctx.config.runCommand(cmdId, extra);
22
22
  },
23
23
  };
24
24
  }
@@ -1,4 +1,4 @@
1
- import { Interfaces, Config } from '@oclif/core';
1
+ import { Interfaces } from '@oclif/core';
2
2
  /**
3
3
  * loads CLI plugin/multi config
4
4
  * @param {loadConfig.Options} opts options
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@oclif/test",
3
3
  "description": "test helpers for oclif components",
4
- "version": "2.0.3",
5
- "author": "Jeff Dickey @jdxcode",
4
+ "version": "2.1.0",
5
+ "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/test/issues",
7
7
  "dependencies": {
8
+ "@oclif/core": "^1.3.1",
8
9
  "fancy-test": "^2.0.0"
9
10
  },
10
11
  "devDependencies": {
11
- "@oclif/core": "^1.0.10",
12
12
  "@types/chai": "^4.1.7",
13
13
  "@types/mocha": "^9.0.0",
14
- "@types/node": "^14.0.14",
14
+ "@types/node": "^14.18.0",
15
15
  "chai": "^4.2.0",
16
16
  "eslint": "^7.32.0",
17
17
  "eslint-config-oclif": "^4.0.0",