Skip to content
Snippets Groups Projects
Unverified Commit db938c67 authored by Maron's avatar Maron Committed by GitHub
Browse files

fix(composer): problem with locked versions without patch part (#15783)

parent 8502c140
Branches
Tags 32.68.3
No related merge requests found
...@@ -150,6 +150,8 @@ describe('modules/versioning/composer/index', () => { ...@@ -150,6 +150,8 @@ describe('modules/versioning/composer/index', () => {
${'^5.1'} | ${'update-lockfile'} | ${'5.1.0'} | ${'6.0.0'} | ${'^6.0'} ${'^5.1'} | ${'update-lockfile'} | ${'5.1.0'} | ${'6.0.0'} | ${'^6.0'}
${'^5'} | ${'update-lockfile'} | ${'5.1.0'} | ${'5.2.0'} | ${'^5'} ${'^5'} | ${'update-lockfile'} | ${'5.1.0'} | ${'5.2.0'} | ${'^5'}
${'^5'} | ${'update-lockfile'} | ${'5.1.0'} | ${'6.0.0'} | ${'^6'} ${'^5'} | ${'update-lockfile'} | ${'5.1.0'} | ${'6.0.0'} | ${'^6'}
${'^0.4.0'} | ${'replace'} | ${'0.4'} | ${'0.5'} | ${'^0.5.0'}
${'^0.4.0'} | ${'replace'} | ${'0.4'} | ${'1.0'} | ${'^1.0.0'}
`( `(
'getNewValue("$currentValue", "$rangeStrategy", "$currentVersion", "$newVersion") === "$expected"', 'getNewValue("$currentValue", "$rangeStrategy", "$currentVersion", "$newVersion") === "$expected"',
({ currentValue, rangeStrategy, currentVersion, newVersion, expected }) => { ({ currentValue, rangeStrategy, currentVersion, newVersion, expected }) => {
......
...@@ -216,7 +216,7 @@ function getNewValue({ ...@@ -216,7 +216,7 @@ function getNewValue({
newValue = npm.getNewValue({ newValue = npm.getNewValue({
currentValue: normalizeVersion(currentValue), currentValue: normalizeVersion(currentValue),
rangeStrategy, rangeStrategy,
currentVersion: normalizeVersion(currentVersion), currentVersion: padZeroes(normalizeVersion(currentVersion)),
newVersion: padZeroes(normalizeVersion(newVersion)), newVersion: padZeroes(normalizeVersion(newVersion)),
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment