Skip to content

W-16742559 fix(search): remove deprecated flags#1034

Merged
cristiand391 merged 16 commits intomainfrom
cd/org-flag
Sep 16, 2024
Merged

W-16742559 fix(search): remove deprecated flags#1034
cristiand391 merged 16 commits intomainfrom
cd/org-flag

Conversation

@cristiand391
Copy link
Copy Markdown
Member

@cristiand391 cristiand391 commented Aug 14, 2024

What does this PR do?

Use proper target-org/api-version flags from sf-plugins-core instead of the deprecated ones (those included --loglevel and old sfdx-style aliases)

BEFORE

You can use the old flag aliases (--defaultusername instead of --target-org, --apiversion instead of --api-version):

➜  plugin-data git:(cd/org-flag) sf data search --targetusername na40 -q 'FIND {NewAcme} IN Name Fields RETURNING Account (name,id)' --apiversion 61.0
Warning: The "--targetusername" flag has been deprecated. Use "--target-org | -o" instead.
Warning: The "--apiversion" flag has been deprecated. Use "--api-version" instead.
Account
============================
| Name    Id
| ─────── ──────────────────
| NewAcme 0014600001eI1n6AAC

AFTER

only --target-org and --api-version are accepted:

➜  plugin-data git:(cd/org-flag) ./bin/dev.js data search --targetusername na40 -q 'FIND {NewAcme} IN Name Fields RETURNING Account (name,id)' --apiversion 61.0
Error (NoDefaultEnvError): No default environment found. Use -o or --target-org to specify an environment.

What issues does this PR fix or reference?

@W-16742559@

default: 'human',
exclusive: ['json'],
}),
})(),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was done to remove the deprecated resultformat alias, see the command snapshot diff

@svc-cli-bot svc-cli-bot requested a review from a team as a code owner August 21, 2024 14:53
@cristiand391 cristiand391 added the bug Something isn't working label Sep 13, 2024
@git2gus
Copy link
Copy Markdown

git2gus bot commented Sep 13, 2024

This issue has been linked to a new work item: W-16742559

Copy link
Copy Markdown
Contributor

@soridalac soridalac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the changes look good to me 👍🏽

@soridalac
Copy link
Copy Markdown
Contributor

QA notes:

✅ : data search works with --target-org & --api-version
-> sf data search --target-org mydevorg -q 'FIND {NewAcme} IN Name Fields RETURNING Account (name,id)' --api-version 61.0

| Name Id
| ─────── ──────────────────
| NewAcme 0014600001eI1n6AAC

✅ : data search fails with --defaultusername & --apiversion
-> ./bin/dev.js data search --targetusername mydevorg -q 'FIND {NewAcme} IN Name Fields RETURNING Account (name,id)' --apiversion 61.0

Error (NoDefaultEnvError): No default environment found. Use -o or --target-org to specify an environment.

@cristiand391 cristiand391 merged commit 87e04f2 into main Sep 16, 2024
@cristiand391 cristiand391 deleted the cd/org-flag branch September 16, 2024 13:16
@iowillhoit iowillhoit changed the title fix(search): remove deprecated flags W-16742559 fix(search): remove deprecated flags Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants