Skip to content
Snippets Groups Projects
Unverified Commit 7f5ce433 authored by Sergio Zharinov's avatar Sergio Zharinov Committed by GitHub
Browse files

fix(poetry): Fix range unions (#6587)

parent 0c06a23a
No related branches found
No related tags found
No related merge requests found
......@@ -457,4 +457,14 @@ describe('semver.getNewValue()', () => {
})
).toEqual('~2');
});
it('widens range', () => {
expect(
semver.getNewValue({
currentValue: '^2.2',
rangeStrategy: 'widen',
fromVersion: '2.2.0',
toVersion: '3.0.0',
})
).toEqual('^2.2 || ^3.0.0');
});
});
......@@ -40,7 +40,7 @@ function npm2poetry(input: string): string {
res.splice(i, 2, newValue);
}
}
return res.join(', ');
return res.join(', ').replace(/\s*,?\s*\|\|\s*,?\s*/, ' || ');
}
const isLessThanRange = (version: string, range: string): boolean =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment