Skip to content

Commit

Permalink
fix: use correct values for replacements (#18858)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kulmburg committed Nov 10, 2022
1 parent b03a813 commit 569f5fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/workers/repository/process/lookup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ export async function lookupUpdates(
res.updates.push(rollback);
}
let rangeStrategy = getRangeStrategy(config);
if (dependency.replacementName && dependency.replacementVersion) {
if (config.replacementName && config.replacementVersion) {
res.updates.push({
updateType: 'replacement',
newName: dependency.replacementName,
newName: config.replacementName,
newValue: versioning.getNewValue({
// TODO #7154
currentValue: currentValue!,
newVersion: dependency.replacementVersion,
newVersion: config.replacementVersion,
rangeStrategy: rangeStrategy!,
})!,
});
Expand Down
2 changes: 2 additions & 0 deletions lib/workers/repository/process/lookup/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export interface LookupUpdateConfig
depName: string;
minimumConfidence?: string;
extractedConstraints?: Record<string, string>;
replacementName?: string;
replacementVersion?: string;
}

export interface UpdateResult {
Expand Down

0 comments on commit 569f5fb

Please sign in to comment.