Skip to content

Commit

Permalink
fix(validate): fix incorrect override of diff packages in source mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sfopsbot committed Dec 19, 2023
1 parent 2cab0e8 commit e1b48d7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/sfpowerscripts-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dxatscale/sfpowerscripts",
"description": "DX@Scale Toolkit",
"version": "25.6.0",
"version": "25.6.1",
"license": "MIT",
"author": "dxatscale",
"release": "January 24",
Expand Down
45 changes: 21 additions & 24 deletions packages/sfpowerscripts-cli/src/impl/validate/ValidateImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,30 +477,27 @@ export default class ValidateImpl implements PostDeployHook, PreDeployHook {


function computePackageOverrides(props: ValidateProps): { [key: string]: PackageType } {
let overridedPackages: { [key: string]: PackageType } = {};
const allPackages = ProjectConfig.getAllPackages(null);
const projectConfig = ProjectConfig.getSFDXProjectConfig(null);
for (const pkg of allPackages) {

if (ProjectConfig.getPackageType(projectConfig, pkg) !== PackageType.Data) {
if (
props.validationMode ===
ValidationMode.FASTFEEDBACK_LIMITED_BY_RELEASE_CONFIG ||
props.validationMode ===
ValidationMode.FAST_FEEDBACK
) {
overridedPackages[pkg] = PackageType.Diff
}
else {
if (!props.disableSourcePackageOverride) {
if (ProjectConfig.getPackageType(projectConfig, pkg) != PackageType.Data || ProjectConfig.getPackageType(projectConfig, pkg) != PackageType.Diff)
overridedPackages[pkg] = PackageType.Source
}
}
}
}
return overridedPackages;
}
let overridedPackages: { [key: string]: PackageType } = {};
const allPackages = ProjectConfig.getAllPackages(null);
const projectConfig = ProjectConfig.getSFDXProjectConfig(null);
for (const pkg of allPackages) {
if (ProjectConfig.getPackageType(projectConfig, pkg) !== PackageType.Data) {
if (
props.validationMode === ValidationMode.FASTFEEDBACK_LIMITED_BY_RELEASE_CONFIG ||
props.validationMode === ValidationMode.FAST_FEEDBACK
) {
overridedPackages[pkg] = PackageType.Diff;
} else {
if (!props.disableSourcePackageOverride) {
if (ProjectConfig.getPackageType(projectConfig, pkg) == PackageType.Unlocked) {
overridedPackages[pkg] = PackageType.Source;
}
}
}
}
}
return overridedPackages;
}

function fetchPackagesAsPerReleaseConfig(
logger: Logger,
Expand Down

0 comments on commit e1b48d7

Please sign in to comment.