-
Notifications
You must be signed in to change notification settings - Fork 129
Support wild cards in nuget versions for dialog:merge #1096
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple suggestions, otherwise LGTM.
@@ -1069,18 +1094,27 @@ export class SchemaMerger { | |||
for (const pkgVersion of await fs.readdir(pkgPath)) { | |||
versions.push(pkgVersion.toLowerCase()) | |||
} | |||
// NOTE: The semver package does not handle more complex nuget range revisions | |||
// We get an exception and will ignore those dependencies. | |||
let versionToUse: any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any
should almost always be avoided if possible. #Resolved
if (this.debug) { | ||
this.parsingWarning(`Using most recent version ${minVersion}`) | ||
} | ||
} else if (minVersion.includes('*')) { | ||
// Match pattern against available versions | ||
let pattern = this.nugetPattern(minVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
#Resolved
@@ -1055,6 +1056,30 @@ export class SchemaMerger { | |||
} | |||
} | |||
|
|||
// Convert a nuget pattern to a regexp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment that includes a few examples of nuget versions and the expected RegExp
could be helpful. #Resolved
@@ -39,7 +39,7 @@ | |||
</PropertyGroup> | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="nuget1" Version="10.0.0" /> | |||
<PackageReference Include="nuget1" Version="10.*" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be worth putting in some with * in other version parts plus having the format from the daily builds where there is more text in different parts. example: 4.12.0-daily.* #WontFix
This fixes composer bug: microsoft/BotFramework-Composer#5576 by adding support for matching nuget versions with * by building a regex and matching against the file path names.