Skip to content
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: add array style flag for backward compatibility #155

Merged
merged 8 commits into from
Dec 7, 2022

Conversation

peternhale
Copy link
Collaborator

@W-12165862@

messages/messages.md Outdated Show resolved Hide resolved
messages/messages.md Outdated Show resolved Hide resolved
src/compatibility.ts Outdated Show resolved Hide resolved
src/compatibility.ts Outdated Show resolved Hide resolved
src/compatibility.ts Outdated Show resolved Hide resolved
src/compatibility.ts Outdated Show resolved Hide resolved
src/compatibility.ts Outdated Show resolved Hide resolved
src/compatibility.ts Outdated Show resolved Hide resolved
src/compatibility.ts Outdated Show resolved Hide resolved
Co-authored-by: Shane McLaughlin <shane.mclaughlin@salesforce.com>
@mshanemc
Copy link
Contributor

mshanemc commented Dec 7, 2022

:QA notes:

using data:tree:import off of my sf-ified data branch, combined with files from https://github.com/mshanemc/cg1

flags is

files: arrayWithDeprecation({
      char: 'f',
      summary: messages.getMessage('flags.files'),
      exclusive: ['plan'],
      aliases: ['--sobjecttreefiles'],
      deprecateAliases: true,
    }),

✅ warning is produced and shows nicely.
👎🏻 message should match sf, which would say array-flag, not arrayFlag
💡 at this point in the code, you've already parsed the values and you know the flag name. We could output the real text they should have used. 😄

two values on the flag: ../bin/dev force:data:tree:import -f data/Account.json,data/Dealer__c.json
✅ worked (tree is freaky fast)

two values on two instances of the flag ../bin/dev force:data:tree:import -f data/Account.json,data/Dealer__c.json -f data/Motorcycle__c.json,data/Lead.json
✅ worked fine
👎🏻 warning is shown twice. Knowing what I know about the command, I'm not sure there's a good way to fix it, and I don't think this'll hit users much (you either use a comma-list, or the multi-flag thing, not both)

@mshanemc mshanemc merged commit b1844a4 into main Dec 7, 2022
@mshanemc mshanemc deleted the phale/array-style-flag branch December 7, 2022 22:07
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