diff --git a/lib/versioning/pep440/range.js b/lib/versioning/pep440/range.js index e2450b6c30b671d86a48f7047d79b06b60b0f383..5e9cb17f5f4904eac70c6ba95dea497539aa8811 100644 --- a/lib/versioning/pep440/range.js +++ b/lib/versioning/pep440/range.js @@ -3,7 +3,7 @@ module.exports = { }; function getNewValue(config, fromVersion, toVersion) { - if (config.currentValue.startsWith('==')) { + if (config.rangeStrategy === 'pin' || config.currentValue.startsWith('==')) { return '==' + toVersion; } logger.warn('Unsupported currentValue: ' + config.currentValue); diff --git a/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap b/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap index ec2bdc5dd626747dbb161f5ced2c326d15bb8b99..ac1a4a521a58c8eb60006f2a3b19fd094a99ad08 100644 --- a/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap +++ b/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap @@ -49,9 +49,10 @@ Array [ Object { "canBeUnpublished": false, "fromVersion": "0.9.4", + "isRange": true, "newMajor": 0, "newMinor": 9, - "newValue": "0.9.7", + "newValue": "==0.9.7", "repositoryUrl": "https://github.com/kriskowal/q", "toVersion": "0.9.7", "type": "minor", @@ -59,9 +60,10 @@ Array [ Object { "canBeUnpublished": false, "fromVersion": "0.9.4", + "isRange": true, "newMajor": 1, "newMinor": 4, - "newValue": "1.4.1", + "newValue": "==1.4.1", "repositoryUrl": "https://github.com/kriskowal/q", "toVersion": "1.4.1", "type": "major",