@oclif/core
Advanced tools
Comparing version 0.5.38 to 0.5.39
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.5.39](https://github.com/oclif/core/compare/v0.5.38...v0.5.39) (2021-09-17) | ||
### Features | ||
* parallelize runHook ([#253](https://github.com/oclif/core/issues/253)) ([34abf7c](https://github.com/oclif/core/commit/34abf7cd80f2f8825682ca782e42f62002215ebb)) | ||
### [0.5.38](https://github.com/oclif/core/compare/v0.5.37...v0.5.38) (2021-09-15) | ||
@@ -7,0 +14,0 @@ |
@@ -151,5 +151,7 @@ "use strict"; | ||
}; | ||
const successes = []; | ||
const failures = []; | ||
for (const p of this.plugins) { | ||
const final = { | ||
successes: [], | ||
failures: [], | ||
}; | ||
const promises = this.plugins.map(async (p) => { | ||
const debug = require('debug')([this.bin, p.name, 'hooks', event].join(':')); | ||
@@ -181,14 +183,14 @@ const context = { | ||
await search(module).call(context, Object.assign(Object.assign({}, opts), { config: this })); | ||
successes.push({ plugin: p, result }); | ||
final.successes.push({ plugin: p, result }); | ||
debug('done'); | ||
} | ||
catch (error) { | ||
failures.push({ plugin: p, error: error }); | ||
if (error && error.oclif && error.oclif.exit !== undefined) | ||
throw error; | ||
final.failures.push({ plugin: p, error: error }); | ||
debug(error); | ||
} | ||
} | ||
} | ||
}); | ||
await Promise.all(promises); | ||
debug('%s hook done', event); | ||
return { successes, failures }; | ||
return final; | ||
} | ||
@@ -195,0 +197,0 @@ async runCommand(id, argv = [], cachedCommand) { |
{ | ||
"name": "@oclif/core", | ||
"description": "base library for oclif CLIs", | ||
"version": "0.5.38", | ||
"version": "0.5.39", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/core/issues", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208502
5194