Skip to content

fix: remove deprecated sfdx-core references#562

Merged
mshanemc merged 4 commits intomainfrom
sm/core-7-prep
Apr 2, 2024
Merged

fix: remove deprecated sfdx-core references#562
mshanemc merged 4 commits intomainfrom
sm/core-7-prep

Conversation

@mshanemc
Copy link
Copy Markdown
Contributor

@mshanemc mshanemc commented Apr 2, 2024

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@

@mshanemc mshanemc changed the title Sm/core-7-prep fix: remove deprecated sfdx-core references Apr 2, 2024
Comment thread src/commands/alias/set.ts
} else {
stateAggregator.aliases.set(alias, value);
const results = await Promise.all(
Object.entries(parsed).map(async ([alias, value]) => {
Copy link
Copy Markdown
Contributor Author

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]

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);
Copy link
Copy Markdown
Contributor Author

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

Comment thread src/alias.ts Outdated
}
}

export const setUnsetErrorHandler = (err: unknown, alias: string, value?: string): AliasResult => {
Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor

@shetzel shetzel left a 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?

@mshanemc mshanemc merged commit 70a36ac into main Apr 2, 2024
@mshanemc mshanemc deleted the sm/core-7-prep branch April 2, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants