-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: remove deprecated sfdx-core references #562
Conversation
} else { | ||
stateAggregator.aliases.set(alias, value); | ||
const results = await Promise.all( | ||
Object.entries(parsed).map(async ([alias, value]) => { |
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.
because we're setting aliases in parallel you'll see some NUTs change because the alias entries can end up in any order
[also, they're now good tests of the alias cross-save lockfile feature]
@@ -76,7 +76,8 @@ describe('alias list NUTs', () => { | |||
|
|||
it('lists multiple results correctly JSON', () => { | |||
const result = execCmd('alias list --json', { ensureExitCode: 0 }).jsonOutput?.result; | |||
expect(result).to.deep.equal([ | |||
expect(result).lengthOf(3); |
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.
these each now assert the total length and that each item is included
src/alias.ts
Outdated
@@ -49,3 +49,13 @@ export abstract class AliasCommand<T> extends SfCommand<T> { | |||
this.table(results, columns, { title, 'no-truncate': true }); | |||
} | |||
} | |||
|
|||
export const setUnsetErrorHandler = (err: unknown, alias: string, value?: string): AliasResult => { |
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.
DRY, used by both set and unset
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.
nit suggestion: rename setUnsetErrorHandler
to aliasErrorHandler
?
What does this PR do?
remove use of deprecated methods from aliasAccessor
adjust NUTs to allow aliases:list in any order
What issues does this PR fix or reference?
@W-15387805@