@oclif/core 3.3.2 → 3.3.3-dev.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.
- package/lib/config/config.js +9 -0
- package/package.json +1 -1
package/lib/config/config.js
CHANGED
|
@@ -680,6 +680,15 @@ class Config {
|
|
|
680
680
|
insertLegacyPlugins(plugins) {
|
|
681
681
|
for (const plugin of plugins) {
|
|
682
682
|
this.plugins.set(plugin.name, plugin);
|
|
683
|
+
// Delete all commands from the legacy plugin so that we can re-add them.
|
|
684
|
+
// This is necessary because this.determinePriority will pick the initial
|
|
685
|
+
// command that was added, which won't have been converted by PluginLegacy yet.
|
|
686
|
+
for (const cmd of plugin.commands ?? []) {
|
|
687
|
+
this._commands.delete(cmd.id);
|
|
688
|
+
for (const alias of [...(cmd.aliases ?? []), ...(cmd.hiddenAliases ?? [])]) {
|
|
689
|
+
this._commands.delete(alias);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
683
692
|
this.loadCommands(plugin);
|
|
684
693
|
}
|
|
685
694
|
}
|