Skip to content
Snippets Groups Projects
Commit dacaad74 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

Fix pin branch name (#36)

parent 74c3aba2
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,11 @@ function getUpgrades(depName, currentVersion, versions) {
if (isRange(currentVersion)) {
// Pin ranges to their maximum satisfying version
const maxSatisfying = semver.maxSatisfying(versions, currentVersion);
allUpgrades.pin = { upgradeType: 'pin', newVersion: maxSatisfying };
allUpgrades.pin = {
upgradeType: 'pin',
newVersion: maxSatisfying,
newVersionMajor: semver.major(maxSatisfying),
};
workingVersion = maxSatisfying;
}
// Loop through all possible versions
......
......@@ -64,6 +64,7 @@ describe('npm helper', () => {
const upgradeVersions = [
{
'newVersion': '3.1.0',
'newVersionMajor': 3,
'upgradeType': 'pin',
},
];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment