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

fix(autoReplace): Correct digest resolution when the replacementName and replacementVersion options are defined #28655

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/workers/repository/process/lookup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,15 @@ export async function lookupUpdates(
registryUrl: update.registryUrl ?? res.registryUrl,
lookupName: res.lookupName,
};

//TODO #27728
// If the present contains the replacementName option and this update executes the replacement
// uses the correct lookupname based on the new replacementName, otherwise it keeps the origina one
if (update.updateType === 'replacement' && config.replacementName) {
getDigestConfig.lookupName = config.replacementName.substring(config.replacementName.indexOf("/") + 1);
Copy link
Member

Choose a reason for hiding this comment

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

this looks wrong to me. why the substring ?

getDigestConfig.currentDigest = undefined
};

// TODO #22198
update.newDigest ??=
dependency?.releases.find((r) => r.version === update.newValue)
Expand Down