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

Sh/package version install #109

Merged
merged 6 commits into from
Sep 30, 2022
Merged

Sh/package version install #109

merged 6 commits into from
Sep 30, 2022

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Sep 29, 2022

Updates the plugin with the PackageVersion refactoring. The PackageVersion class now has more meaningful instance and static functions, rather than a group of utility functions on a class.

NOTE: requires forcedotcom/packaging#63 to be merged first.

@W-11819142@

For testing: link the sh/packageVersionInstall branch of the packaging library to the plugin, then modify the tsconfig.json files compiler options to force resolution of core and jsforce to the same version.

"baseUrl": ".",
"paths": {
  "@salesforce/core": ["node_modules/@salesforce/core"],
  "jsforce": ["node_modules/jsforce"]
}

@shetzel shetzel requested a review from a team as a code owner September 29, 2022 16:16
src/commands/force/package/beta/version/create.ts Outdated Show resolved Hide resolved
const pv = new PackageVersion({ connection: this.hubOrg.getConnection(), project: undefined });
const results = await pv.createdList({ ...this.flags });
const connection = this.hubOrg.getConnection();
const results = await PackageVersion.createdList(connection, { ...this.flags });
Copy link
Contributor

Choose a reason for hiding this comment

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

an even smaller NIT: sometimes we're setting a const connection = this.hubOrg.getConnection and other times we're passing this.hubOrg.getConnection right into the library

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think most cases we just pass this.hubOrg.getConnection() but in this function the connection was being reused several times so it made sense to assign to a const.

Copy link
Contributor

Choose a reason for hiding this comment

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

I figured I probably missed that in the GH diff view, it's really not a big deal :)

@WillieRuemmele WillieRuemmele merged commit 50dead8 into main Sep 30, 2022
@WillieRuemmele WillieRuemmele deleted the sh/packageVersionInstall branch September 30, 2022 14:22
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.

3 participants