Skip to content

Upgrade from v4 to v5

Rmannn edited this page May 20, 2021 · 1 revision

Updated signature

@Console

Signature of @Console decorator has been updated. ConsoleOptions has been replaced by CreateCommandOptions, you simply have to change property name by command.

@Console({name: "myCommand"})

To

@Console({command: "myCommand"})`

@Command handler

Command handler signature has changed. Options are now passed to the handler. See the command handler signature for more details.

handler(arg: any, command: commander.Command){}

To

handler(arg: any, options: any, command: commander.Command){}

Commander version bump to ^7.2.0

Commander@< 7.2.0 is not any more supported. Please upgrade to latest version

npm install commander@^7.2.0 --save

or using yarn

yarn add commander@^7.2.0

Remove unused helper

The helper formatResponse has been removed