From 7327e628914b49816ef7e202dac8357db97922ae Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Mon, 20 Nov 2023 08:06:41 +0100 Subject: [PATCH] Fix: exclude vendor name while matching sample-data packages --- src/package-modules.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/package-modules.js b/src/package-modules.js index cf47df6..5562c77 100644 --- a/src/package-modules.js +++ b/src/package-modules.js @@ -123,8 +123,8 @@ function setDependencyVersions(composerConfig, dependencyVersions, vendor) { if (dependencyVersions[dep] || (vendor && dep.startsWith(vendor) && dependencyVersions['*'])) { // The "Sample Data version:" prefix is used by sampledata:deploy to identify packages to require. // See \Magento\SampleData\Model\Dependency::getSampleDataPackages - // Package names are for example magento/module-catalog-sample-data or magento/magento/sample-data-media - composerConfig[dependencyType][dep] = dependencyType === 'suggest' && (dep.endsWith('-sample-data') || dep.startsWith('sample-data-')) + // Package names are for example magento/module-catalog-sample-data or magento/sample-data-media + composerConfig[dependencyType][dep] = dependencyType === 'suggest' && (dep.endsWith('-sample-data') || dep.includes('/sample-data-')) ? `Sample Data version: ${dependencyVersions[dep] || dependencyVersions['*']}` : dependencyVersions[dep] || dependencyVersions['*']; }