From e92b8c74c9311469383f1a35b820a7f1f6575b8d Mon Sep 17 00:00:00 2001 From: Ryan Hoerr Date: Fri, 19 Jul 2024 08:39:16 -0400 Subject: [PATCH] fix: set package replace value by original package name (#169) --- src/release-build-tools.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/release-build-tools.js b/src/release-build-tools.js index f2c110c..228d13a 100644 --- a/src/release-build-tools.js +++ b/src/release-build-tools.js @@ -169,14 +169,17 @@ function updateComposerPluginConfigForMageOs(composerConfig, vendor) { * This also happens for the "replace" section, before the given replaceVersionMap is merged. */ function updateComposerConfigFromMagentoToMageOs(composerConfig, releaseVersion, replaceVersionMap, vendor) { + const originalPackageName = composerConfig.name + composerConfig.version = releaseVersion composerConfig.name = setMageOsVendor(composerConfig.name, vendor) + updateComposerDepsFromMagentoToMageOs(composerConfig, vendor) updateComposerDepsVersionForMageOs(composerConfig, releaseVersion, vendor) updateComposerPluginConfigForMageOs(composerConfig, vendor) - if (replaceVersionMap[composerConfig.name]) { - composerConfig.replace = {[composerConfig.name]: replaceVersionMap[composerConfig.name]} + if (replaceVersionMap[originalPackageName]) { + composerConfig.replace = {[originalPackageName]: replaceVersionMap[originalPackageName]} } }