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

plugin-source ESM #992

Merged
merged 30 commits into from
Nov 24, 2023
Merged

plugin-source ESM #992

merged 30 commits into from
Nov 24, 2023

Conversation

WillieRuemmele
Copy link
Contributor

@WillieRuemmele WillieRuemmele commented Nov 1, 2023

What does this PR do?

ESM'ifies plugin-source

What issues does this PR fix or reference?

@W-14406731@

Copy link

git2gus bot commented Nov 1, 2023

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

Copy link
Member

Choose a reason for hiding this comment

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

this file can be removed, see: salesforcecli/plugin-login#650 (comment)

@@ -113,7 +115,7 @@ export default class Pull extends SourceCommand {
if (this.flags['api-version']) {
componentSet.apiVersion = this.flags['api-version'];
}
const username = this.flags['target-org'].getUsername();
const username = this.flags['target-org'].getUsername() as string;
Copy link
Member

@cristiand391 cristiand391 Nov 9, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

The sfdx-core Org class allows you to instantiate an Org (the class), assign various props, and then write it for the first time.

I've always wanted to make either an option on Org.create to say, "read this from the FS and throw" and then have better typing on that version. Or to have a method that verifies it's coming from the FS and then you can depend on all the expected props being there.

It's kind of hard, though, with a bunch of these being define as class props rather than a type-able object.

@@ -223,6 +227,8 @@ export class DeployResultFormatter extends ResultFormatter {
this.ux.log('');
this.ux.styledHeader(chalk.red(`Component Failures [${failures.length}]`));
this.ux.table(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
failures.map((entry: FileResponseFailure) => ({
Copy link
Member

Choose a reason for hiding this comment

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

if you remove the FileResponseFailure type it shows almost all of the props it tries to access doesn't exist. Are the types from SDR wrong or where does it get corrected?

Copy link
Member

Choose a reason for hiding this comment

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

I couldn't get this to work without refactoring a bunch of stuff, will verify on QA.

Copy link
Member

@cristiand391 cristiand391 left a comment

Choose a reason for hiding this comment

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

approved with some questions

@cristiand391
Copy link
Member

QA notes:

✅ mdapi/source deploy/retrieve commands, human/json output
✅ deploy reporter

@cristiand391 cristiand391 merged commit fc3403e into main Nov 24, 2023
26 checks passed
@cristiand391 cristiand391 deleted the wr/esm branch November 24, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants