From a378bbbac3446874221295e3da9016e79de8661b Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Fri, 26 Jan 2018 19:30:57 +0100
Subject: [PATCH] =?UTF-8?q?fix:=20massage=20invalid=20Regex=20pattern=20?=
 =?UTF-8?q?=E2=80=98^*$=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/workers/dep-type/index.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/workers/dep-type/index.js b/lib/workers/dep-type/index.js
index d4c1e139c2..6cd5b70fc1 100644
--- a/lib/workers/dep-type/index.js
+++ b/lib/workers/dep-type/index.js
@@ -87,7 +87,9 @@ function getDepConfig(depTypeConfig, dep) {
       } else if (packageRule.packagePatterns) {
         for (const packagePattern of packageRule.packagePatterns) {
           const packageRegex = new RegExp(
-            packagePattern === '*' ? '.*' : packagePattern
+            packagePattern === '^*$' || packagePattern === '*'
+              ? '.*'
+              : packagePattern
           );
           if (depConfig.depName.match(packageRegex)) {
             applyRule = true;
-- 
GitLab