@oclif/core 4.8.4 → 4.9.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/command.js +1 -1
- package/lib/help/index.js +2 -2
- package/package.json +1 -1
package/lib/command.js
CHANGED
|
@@ -295,7 +295,7 @@ class Command {
|
|
|
295
295
|
}
|
|
296
296
|
warnIfCommandDeprecated() {
|
|
297
297
|
const [id] = (0, util_1.normalizeArgv)(this.config);
|
|
298
|
-
if (this.ctor.deprecateAliases && this.ctor.aliases.includes(id)) {
|
|
298
|
+
if (this.ctor.deprecateAliases && [...this.ctor.aliases, ...this.ctor.hiddenAliases].includes(id)) {
|
|
299
299
|
const cmdName = (0, ids_1.toConfiguredId)(this.ctor.id, this.config);
|
|
300
300
|
const aliasName = (0, ids_1.toConfiguredId)(id, this.config);
|
|
301
301
|
this.warn((0, util_1.formatCommandDeprecationWarning)(aliasName, { to: cmdName }));
|
package/lib/help/index.js
CHANGED
|
@@ -174,8 +174,8 @@ class Help extends HelpBase {
|
|
|
174
174
|
? `${(0, util_2.formatCommandDeprecationWarning)((0, ids_1.toConfiguredId)(name, this.config), command.deprecationOptions)}\n`
|
|
175
175
|
: `This command is in ${state}.\n`);
|
|
176
176
|
}
|
|
177
|
-
if (command.deprecateAliases && command.aliases.includes(name)) {
|
|
178
|
-
const actualCmd = this.config.commands.find((c) => c.aliases.includes(name));
|
|
177
|
+
if (command.deprecateAliases && [...(command.aliases ?? []), ...(command.hiddenAliases ?? [])].includes(name)) {
|
|
178
|
+
const actualCmd = this.config.commands.find((c) => [...(c.aliases ?? []), ...(c.hiddenAliases ?? [])].includes(name));
|
|
179
179
|
const actualCmdName = actualCmd ? (0, ids_1.toConfiguredId)(actualCmd.id, this.config) : '';
|
|
180
180
|
const opts = { ...command.deprecationOptions, ...(actualCmd ? { to: actualCmdName } : {}) };
|
|
181
181
|
this.log(`${(0, util_2.formatCommandDeprecationWarning)((0, ids_1.toConfiguredId)(name, this.config), opts)}\n`);
|