diff --git a/packages/jsii-pacmak/lib/targets/version-utils.ts b/packages/jsii-pacmak/lib/targets/version-utils.ts index 70d2d632ae..a7a6af1b64 100644 --- a/packages/jsii-pacmak/lib/targets/version-utils.ts +++ b/packages/jsii-pacmak/lib/targets/version-utils.ts @@ -20,7 +20,7 @@ export function toMavenVersionRange(semverRange: string, suffix?: string): strin * @see https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges-and-wildcards */ export function toNuGetVersionRange(semverRange: string): string { - return toBracketNotation(semverRange); + return toBracketNotation(semverRange, undefined, { semver: false }); } /** diff --git a/packages/jsii-pacmak/test/targets/version-utils.test.ts b/packages/jsii-pacmak/test/targets/version-utils.test.ts index 99192bcda8..9b227c7303 100644 --- a/packages/jsii-pacmak/test/targets/version-utils.test.ts +++ b/packages/jsii-pacmak/test/targets/version-utils.test.ts @@ -9,12 +9,12 @@ const examples: Record }, '~1.2.3': { maven: '[1.2.3,1.3.0)', - nuget: '[1.2.3,1.3.0-0)', + nuget: '[1.2.3,1.3.0)', python: '>=1.2.3, <1.3.0', }, '^1.2.3': { maven: '[1.2.3,2.0.0)', - nuget: '[1.2.3,2.0.0-0)', + nuget: '[1.2.3,2.0.0)', python: '>=1.2.3, <2.0.0', }, @@ -26,12 +26,12 @@ const examples: Record }, '~0.1.2': { maven: '[0.1.2,0.2.0)', - nuget: '[0.1.2,0.2.0-0)', + nuget: '[0.1.2,0.2.0)', python: '>=0.1.2, <0.2.0', }, '^0.1.2': { maven: '[0.1.2,0.2.0)', - nuget: '[0.1.2,0.2.0-0)', + nuget: '[0.1.2,0.2.0)', python: '>=0.1.2, <0.2.0', },