From 8e2ec0fcf44e2d9750d4136a456aad862e609979 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Tue, 3 Jan 2023 11:47:34 -0700 Subject: [PATCH] fix: remove alias requirement when constructing a Package --- LICENSE.txt | 2 +- src/package/package.ts | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index d1c9164c7..f2cee7bb6 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2022, Salesforce.com, Inc. +Copyright (c) 2023, Salesforce.com, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/src/package/package.ts b/src/package/package.ts index 8189ab2ba..6a7550eaa 100644 --- a/src/package/package.ts +++ b/src/package/package.ts @@ -87,7 +87,6 @@ export class Package { if (packageId.startsWith(packagePrefixes.PackageId)) { this.packageId = packageId; - this.verifyAliasForId(); } else { throw messages.createError('invalidPackageId', [this.options.packageAliasOrId, packagePrefixes.PackageId]); } @@ -280,10 +279,4 @@ export class Package { } return this.packageData; } - - private verifyAliasForId(): void { - if (this.options.project.getAliasesFromPackageId(this.packageId).length === 0) { - throw new SfError(messages.getMessage('couldNotFindAliasForId', [this.packageId])); - } - } }