From 6ede22ab03bca32563228f98ac178fa2204bf86d Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Fri, 8 Mar 2019 08:16:26 +0100 Subject: [PATCH] fix: lockfile-update => update-lockfile --- lib/versioning/npm/range.js | 2 +- lib/workers/repository/process/lookup/index.js | 2 +- test/workers/repository/process/lookup/index.spec.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/versioning/npm/range.js b/lib/versioning/npm/range.js index 451a481155..c2a03dc802 100644 --- a/lib/versioning/npm/range.js +++ b/lib/versioning/npm/range.js @@ -17,7 +17,7 @@ function getNewValue(currentValue, rangeStrategy, fromVersion, toVersion) { if (rangeStrategy === 'pin' || isVersion(currentValue)) { return toVersion; } - if (rangeStrategy === 'lockfile-update') { + if (rangeStrategy === 'update-lockfile') { if (satisfies(toVersion, currentValue)) { return currentValue; } diff --git a/lib/workers/repository/process/lookup/index.js b/lib/workers/repository/process/lookup/index.js index 30edf1e3aa..9811901b26 100644 --- a/lib/workers/repository/process/lookup/index.js +++ b/lib/workers/repository/process/lookup/index.js @@ -132,7 +132,7 @@ async function lookupUpdates(config) { }); } let filterStart = fromVersion; - if (lockedVersion && rangeStrategy === 'lockfile-update') { + if (lockedVersion && rangeStrategy === 'update-lockfile') { // Look for versions greater than the current locked version that still satisfy the package.json range filterStart = lockedVersion; } diff --git a/test/workers/repository/process/lookup/index.spec.js b/test/workers/repository/process/lookup/index.spec.js index 416b225c2a..c265595a6a 100644 --- a/test/workers/repository/process/lookup/index.spec.js +++ b/test/workers/repository/process/lookup/index.spec.js @@ -58,7 +58,7 @@ describe('workers/repository/process/lookup', () => { }); it('supports lock file updates mixed with regular updates', async () => { config.currentValue = '^0.4.0'; - config.rangeStrategy = 'lockfile-update'; + config.rangeStrategy = 'update-lockfile'; config.depName = 'q'; config.datasource = 'npm'; config.lockedVersion = '0.4.0'; -- GitLab