Skip to content

Commit

Permalink
Fix: exclude vendor name while matching sample-data packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinai committed Nov 20, 2023
1 parent f91819d commit 7327e62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/package-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -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['*'];
}
Expand Down

0 comments on commit 7327e62

Please sign in to comment.