mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-14 16:46:25 +00:00
fix(poetry): Fix existing range unions (#19785)
Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
de289bb409
commit
1991b7fcb0
2 changed files with 2 additions and 1 deletions
|
@ -226,6 +226,7 @@ describe('modules/versioning/poetry/index', () => {
|
|||
${'~1.2'} | ${'replace'} | ${'1.2.3'} | ${'2.0.0'} | ${'~2.0'}
|
||||
${'~1'} | ${'replace'} | ${'1.2.3'} | ${'2.0.0'} | ${'~2'}
|
||||
${'^2.2'} | ${'widen'} | ${'2.2.0'} | ${'3.0.0'} | ${'^2.2 || ^3.0.0'}
|
||||
${'^2.2 || ^3.0.0'} | ${'widen'} | ${'3.0.0'} | ${'4.0.0'} | ${'^2.2 || ^3.0.0 || ^4.0.0'}
|
||||
${'^3.5'} | ${'pin'} | ${'3.5'} | ${'3.5'} | ${'3.5'}
|
||||
`(
|
||||
'getNewValue("$currentValue", "$rangeStrategy", "$currentVersion", "$newVersion") === "$expected"',
|
||||
|
|
|
@ -144,5 +144,5 @@ export function npm2poetry(range: string): string {
|
|||
res.splice(i, 2, newValue);
|
||||
}
|
||||
}
|
||||
return res.join(', ').replace(/\s*,?\s*\|\|\s*,?\s*/, ' || ');
|
||||
return res.join(', ').replace(/\s*,?\s*\|\|\s*,?\s*/g, ' || ');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue