Skip to content
Snippets Groups Projects
Commit 797c35ed authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: packageRule match anything only if there is a negating config

parent 41072f3d
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,11 @@ function getDepConfig(depTypeConfig, dep) {
);
depConfig.packageRules.forEach(packageRule => {
let applyRule = false;
if (!(packageRule.packageNames || packageRule.packagePatterns)) {
if (
(packageRule.excludePackageNames ||
packageRule.excludePackagePatterns) &&
!(packageRule.packageNames || packageRule.packagePatterns)
) {
logger.debug(
{ packageRule, dependency },
'packageRule is missing packageNames and packagePatterns so will match anything'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment