@oclif/core 1.2.0 → 1.2.1

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
+ ### [1.2.1](https://github.com/oclif/core/compare/v1.2.0...v1.2.1) (2022-01-28)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * module resolution of linked plugins ([#352](https://github.com/oclif/core/issues/352)) ([c7f5d34](https://github.com/oclif/core/commit/c7f5d3439e7e60b6562362c87fe0d16a99a42a08))
11
+
5
12
  ## [1.2.0](https://github.com/oclif/core/compare/v1.1.2...v1.2.0) (2022-01-26)
6
13
 
7
14
 
@@ -214,7 +214,11 @@ class Config {
214
214
  debug('runCommand %s %o', id, argv);
215
215
  const c = cachedCommand || this.findCommand(id);
216
216
  if (!c) {
217
- await this.runHook('command_not_found', { id, argv });
217
+ const hookResult = await this.runHook('command_not_found', { id, argv });
218
+ if (hookResult.successes[0]) {
219
+ const cmdResult = hookResult.successes[0].result;
220
+ return cmdResult;
221
+ }
218
222
  throw new errors_1.CLIError(`command ${id} not found`);
219
223
  }
220
224
  const command = await c.load();
@@ -78,7 +78,7 @@ async function findRoot(name, root) {
78
78
  if (name) {
79
79
  let pkgPath;
80
80
  try {
81
- pkgPath = (0, util_3.resolvePackage)(name, { paths: [__dirname, root] });
81
+ pkgPath = (0, util_3.resolvePackage)(name, { paths: [root] });
82
82
  }
83
83
  catch { }
84
84
  return pkgPath ? findSourcesRoot(path.dirname(pkgPath)) : findRootLegacy(name, root);
@@ -46,7 +46,7 @@ export interface Hooks {
46
46
  id: string;
47
47
  argv?: string[];
48
48
  };
49
- return: void;
49
+ return: unknown;
50
50
  };
51
51
  'plugins:preinstall': {
52
52
  options: {
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": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {