@oclif/core 2.0.10 → 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.
@@ -44,7 +44,7 @@ export declare class Config implements IConfig {
44
44
  loadCorePlugins(): Promise<void>;
45
45
  loadDevPlugins(): Promise<void>;
46
46
  loadUserPlugins(): Promise<void>;
47
- runHook<T extends keyof Hooks>(event: T, opts: Hooks[T]['options'], timeout?: number): Promise<Hook.Result<Hooks[T]['return']>>;
47
+ runHook<T extends keyof Hooks>(event: T, opts: Hooks[T]['options'], timeout?: number, captureErrors?: boolean): Promise<Hook.Result<Hooks[T]['return']>>;
48
48
  runCommand<T = unknown>(id: string, argv?: string[], cachedCommand?: Command.Loadable | null): Promise<T>;
49
49
  scopedEnvVar(k: string): string | undefined;
50
50
  scopedEnvVarTrue(k: string): boolean;
@@ -186,7 +186,7 @@ class Config {
186
186
  }
187
187
  }
188
188
  }
189
- async runHook(event, opts, timeout) {
189
+ async runHook(event, opts, timeout, captureErrors) {
190
190
  debug('start %s hook', event);
191
191
  const search = (m) => {
192
192
  if (typeof m === 'function')
@@ -244,6 +244,8 @@ class Config {
244
244
  catch (error) {
245
245
  final.failures.push({ plugin: p, error: error });
246
246
  debug(error);
247
+ if (!captureErrors && error.oclif?.exit !== undefined)
248
+ throw error;
247
249
  }
248
250
  }
249
251
  });
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.0.10",
4
+ "version": "2.1.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -29,16 +29,16 @@
29
29
  "strip-ansi": "^6.0.1",
30
30
  "supports-color": "^8.1.1",
31
31
  "supports-hyperlinks": "^2.2.0",
32
- "tslib": "^2.4.1",
32
+ "tslib": "^2.5.0",
33
33
  "widest-line": "^3.1.0",
34
34
  "wordwrap": "^1.0.0",
35
35
  "wrap-ansi": "^7.0.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@commitlint/config-conventional": "^12.1.4",
39
- "@oclif/plugin-help": "^5.1.22",
40
- "@oclif/plugin-plugins": "^2.1.12",
41
- "@oclif/test": "^2.2.20",
39
+ "@oclif/plugin-help": "^5.2.4",
40
+ "@oclif/plugin-plugins": "^2.3.0",
41
+ "@oclif/test": "^2.3.5",
42
42
  "@types/ansi-styles": "^3.2.1",
43
43
  "@types/chai": "^4.3.4",
44
44
  "@types/chai-as-promised": "^7.1.5",
@@ -63,7 +63,7 @@
63
63
  "commitlint": "^12.1.4",
64
64
  "eslint": "^7.32.0",
65
65
  "eslint-config-oclif": "^4.0.0",
66
- "eslint-config-oclif-typescript": "^1.0.2",
66
+ "eslint-config-oclif-typescript": "^1.0.3",
67
67
  "fancy-test": "^2.0.12",
68
68
  "globby": "^11.1.0",
69
69
  "husky": "6",
@@ -110,7 +110,7 @@
110
110
  "posttest": "yarn lint",
111
111
  "prepack": "yarn run build",
112
112
  "test": "mocha --forbid-only \"test/**/*.test.ts\"",
113
- "test:e2e": "mocha \"test/**/*.e2e.ts\" --timeout 1200000",
113
+ "test:e2e": "mocha --forbid-only \"test/**/*.e2e.ts\" --timeout 1200000",
114
114
  "pretest": "yarn build --noEmit && tsc -p test --noEmit --skipLibCheck"
115
115
  },
116
116
  "types": "lib/index.d.ts"