New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support flag and command deprecations #511
Conversation
@@ -97,3 +98,32 @@ export function getHelpFlagAdditions(config: IConfig): string[] { | |||
const additionalHelpFlags = config.pjson.oclif.additionalHelpFlags ?? [] | |||
return [...new Set([...helpFlags, ...additionalHelpFlags]).values()] | |||
} | |||
|
|||
export function formatFlagDeprecationWarning(flag: string, opts: true | Deprecation): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since there's only 1 word of difference, it could be consolidated?
formatDeprecationWarning(deprecationType: 'command' | 'flag', item: string, opts: true | Deprecation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 non-blocking suggestion comment.
can you also put on here what, if anything, needs to be done or should be done for SfdxCommand as a result of this?
Are the deprecations compatible? Does this get overridden in sfdxCommand? Should sfdxCommand remove its code for this and rely directly on oclif's ?
@@ -57,7 +57,7 @@ describe('Config with flexible taxonomy', () => { | |||
|
|||
const load = async (): Promise<void> => {} | |||
const findCommand = async (): Promise<ICommand.Class> => { | |||
return new MyComandClass() as unknown as ICommand.Class | |||
return new MyCommandClass() as unknown as ICommand.Class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for that!
Support deprecation warnings for flags and commands
Commands
Flags
@W-11836498@