fix(pep440): return ==version when pinning

This commit is contained in:
Rhys Arkins 2018-06-06 12:12:28 +02:00
parent 603b77799b
commit 8b9d4b106c
2 changed files with 5 additions and 3 deletions

View file

@ -3,7 +3,7 @@ module.exports = {
}; };
function getNewValue(config, fromVersion, toVersion) { function getNewValue(config, fromVersion, toVersion) {
if (config.currentValue.startsWith('==')) { if (config.rangeStrategy === 'pin' || config.currentValue.startsWith('==')) {
return '==' + toVersion; return '==' + toVersion;
} }
logger.warn('Unsupported currentValue: ' + config.currentValue); logger.warn('Unsupported currentValue: ' + config.currentValue);

View file

@ -49,9 +49,10 @@ Array [
Object { Object {
"canBeUnpublished": false, "canBeUnpublished": false,
"fromVersion": "0.9.4", "fromVersion": "0.9.4",
"isRange": true,
"newMajor": 0, "newMajor": 0,
"newMinor": 9, "newMinor": 9,
"newValue": "0.9.7", "newValue": "==0.9.7",
"repositoryUrl": "https://github.com/kriskowal/q", "repositoryUrl": "https://github.com/kriskowal/q",
"toVersion": "0.9.7", "toVersion": "0.9.7",
"type": "minor", "type": "minor",
@ -59,9 +60,10 @@ Array [
Object { Object {
"canBeUnpublished": false, "canBeUnpublished": false,
"fromVersion": "0.9.4", "fromVersion": "0.9.4",
"isRange": true,
"newMajor": 1, "newMajor": 1,
"newMinor": 4, "newMinor": 4,
"newValue": "1.4.1", "newValue": "==1.4.1",
"repositoryUrl": "https://github.com/kriskowal/q", "repositoryUrl": "https://github.com/kriskowal/q",
"toVersion": "1.4.1", "toVersion": "1.4.1",
"type": "major", "type": "major",