@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 +7 -0
- package/lib/config/config.js +5 -1
- package/lib/config/plugin.js +1 -1
- package/lib/interfaces/hooks.d.ts +1 -1
- package/package.json +1 -1
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
|
|
package/lib/config/config.js
CHANGED
|
@@ -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();
|
package/lib/config/plugin.js
CHANGED
|
@@ -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: [
|
|
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);
|