-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: update imports to focus on main classes #121
Conversation
src/package/package.ts
Outdated
* | ||
* @param conn: Connection to the org | ||
*/ | ||
public static async installedList(conn: Connection): Promise<InstalledPackages[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WillieRuemmele the list of installed packages only uses the InstalledSubscriberPackage
table. This makes me feel that this function should be in SubscriberPackageVersion class. What do you think about the suggestion?
src/package/packageVersion.ts
Outdated
@@ -99,6 +92,18 @@ export class PackageVersion { | |||
} | |||
} | |||
|
|||
public static async getAncestry( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WillieRuemmele I think this belongs in Package. It produces a graph for either a package or a package version.
src/package/packageVersionCreate.ts
Outdated
@@ -23,9 +23,8 @@ import { ComponentSetBuilder, ConvertResult, MetadataConverter } from '@salesfor | |||
import SettingsGenerator from '@salesforce/core/lib/org/scratchOrgSettingsGenerator'; | |||
import * as xml2js from 'xml2js'; | |||
import { PackageDirDependency } from '@salesforce/core/lib/sfProject'; | |||
import { uniqid } from '../utils/uniqid'; | |||
import { genUniqueString } from '@salesforce/cli-plugins-testkit'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I am a fan of using a module used for testing as part of the product side of packaging lib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed. I missed it imported from testkit
@@ -55,9 +62,6 @@ export const DEFAULT_PACKAGE_DIR = { | |||
default: true, | |||
}; | |||
|
|||
export const BY_PREFIX = ((): IdRegistry => | |||
Object.fromEntries(ID_REGISTRY.map((id) => [id.prefix, { prefix: id.prefix, label: id.label }])))(); | |||
|
|||
export const BY_LABEL = ((): IdRegistry => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this function return IdRegistry, should IdRegistry/IdRegistryValue also be exported?
fix: update imports to focus on main classes
@W-12012608@
BUMPED TO 1.0.0
removes unnecessary exports
only export 3 things from
packageUtils
moved
PackageAncestry
code into a getter on thePackageVersion
classremoved
consts
fileremoved
srcUtils
fileremoves unnecessary imports from other files only used within the library
moves
installedList
onto thePackage
class