-
Notifications
You must be signed in to change notification settings - Fork 73
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: remove support for baseFlags
#1084
Conversation
import {expect} from 'chai' | ||
import {resolve} from 'node:path' | ||
import {pathToFileURL} from 'node:url' | ||
|
||
import {runCommand} from '../test' |
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.
why do this change? @cristiand391 and I struggled to reverse this in jsforce
?
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.
@WillieRuemmele I'm not sure what you mean. This change is to use the new major of oclif/test (which I originally wrote as POC inside ../test
). Not sure how it relates to jsforce
test/errors/handle.test.ts
Outdated
|
||
import {Command, Flags} from '../../src' | ||
// import Cache from '../../src/cache' |
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.
probably clean this at L11 up
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.
I don't see a major bump in pjson, or in commit messages - did I miss it?
This is going into the |
Remove support for
baseFlags
Currently, in order for one
Command
class to inherit flags from anotherCommand
class is to use a property calledbaseFlags
(see docs).This solution assumes that you'll only ever have one layer of abstraction, which is not a safe assumption. So in order for commands to inherit flags from multiple parents you have to use the spread operator
Because of this, we're removing
baseFlags
and requiring the spread operator anytime you want flags to be inherited. So the above example would change to this:The downside is that it will require an extra line of code for those who are only using a single base
Command
class but the upside is that there won't be any confusion about the difference betweenbaseFlags
andflags
and when to use each.Other Changes
@W-15470630@