From 15dd304b973559425b4e88a14dbc7e07ad20492e Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Fri, 29 Nov 2019 20:05:49 +0100
Subject: [PATCH] fix: rangeStrategy fall back to bump if no lockfile

---
 lib/workers/repository/process/lookup/index.ts | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/workers/repository/process/lookup/index.ts b/lib/workers/repository/process/lookup/index.ts
index 0f5775407c..f07743163f 100644
--- a/lib/workers/repository/process/lookup/index.ts
+++ b/lib/workers/repository/process/lookup/index.ts
@@ -215,7 +215,11 @@ export async function lookupUpdates(
       }
       res.updates.push(rollback);
     }
-    const rangeStrategy = getRangeStrategy(config);
+    let rangeStrategy = getRangeStrategy(config);
+    // istanbul ignore if
+    if (rangeStrategy === 'update-lockfile' && !lockedVersion) {
+      rangeStrategy = 'bump';
+    }
     const nonDeprecatedVersions = releases
       .filter(release => !release.isDeprecated)
       .map(release => release.version);
-- 
GitLab