mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
6d09535c9f
Closes #2069
20 lines
375 B
JavaScript
20 lines
375 B
JavaScript
const npm = require('../npm');
|
|
|
|
function getNewValue(currentValue, rangeStrategy, fromVersion, toVersion) {
|
|
const res = npm.getNewValue(
|
|
currentValue,
|
|
rangeStrategy,
|
|
fromVersion,
|
|
toVersion
|
|
);
|
|
if (npm.isVersion(res)) {
|
|
// normalize out any 'v' prefix
|
|
return npm.isVersion(res);
|
|
}
|
|
return res;
|
|
}
|
|
|
|
module.exports = {
|
|
...npm,
|
|
getNewValue,
|
|
};
|