@oclif/core 2.3.1 → 2.4.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.
@@ -33,4 +33,4 @@ export declare function getCommandIdPermutations(commandId: string): string[];
33
33
  * @param commandIds string[]
34
34
  * @returns string[]
35
35
  */
36
- export declare function collectUsableIds(commandIds: string[]): string[];
36
+ export declare function collectUsableIds(commandIds: string[]): Set<string>;
@@ -122,6 +122,6 @@ function collectUsableIds(commandIds) {
122
122
  parts.pop();
123
123
  }
124
124
  }
125
- return uniq(usuableIds).sort();
125
+ return new Set(usuableIds);
126
126
  }
127
127
  exports.collectUsableIds = collectUsableIds;
@@ -1,2 +1,4 @@
1
1
  import { OclifError, PrettyPrintableError } from '../interfaces';
2
- export declare const handle: (err: Error & Partial<PrettyPrintableError> & Partial<OclifError>) => void;
2
+ export declare const handle: (err: Error & Partial<PrettyPrintableError> & Partial<OclifError> & {
3
+ skipOclifErrorHandling?: boolean;
4
+ }) => void;
@@ -14,7 +14,7 @@ const handle = (err) => {
14
14
  err = new cli_1.CLIError('no error?');
15
15
  if (err.message === 'SIGINT')
16
16
  process.exit(1);
17
- const shouldPrint = !(err instanceof _1.ExitError);
17
+ const shouldPrint = !(err instanceof _1.ExitError) && !err.skipOclifErrorHandling;
18
18
  const pretty = (0, pretty_print_1.default)(err);
19
19
  const stack = clean(err.stack || '', { pretty: true });
20
20
  if (shouldPrint) {
package/lib/help/util.js CHANGED
@@ -37,7 +37,7 @@ function collateSpacedCmdIDFromArgs(argv, config) {
37
37
  const findId = (argv) => {
38
38
  const ids = (0, util_1.collectUsableIds)(config.commandIDs);
39
39
  const final = [];
40
- const idPresent = (id) => ids.includes(id);
40
+ const idPresent = (id) => ids.has(id);
41
41
  const isFlag = (s) => s.startsWith('-');
42
42
  const isArgWithValue = (s) => s.includes('=');
43
43
  const finalizeId = (s) => s ? [...final, s].join(':') : final.join(':');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "2.3.1",
4
+ "version": "2.4.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -38,7 +38,7 @@
38
38
  "@commitlint/config-conventional": "^12.1.4",
39
39
  "@oclif/plugin-help": "^5.2.5",
40
40
  "@oclif/plugin-plugins": "^2.3.2",
41
- "@oclif/test": "^2.3.6",
41
+ "@oclif/test": "^2.3.7",
42
42
  "@types/ansi-styles": "^3.2.1",
43
43
  "@types/chai": "^4.3.4",
44
44
  "@types/chai-as-promised": "^7.1.5",