Skip to content

Commit 3122917

Browse files
CopilotTravisEz13pwshBotdaxian-dbw
authored
Fix ConvertFrom-ClearlyDefinedCoordinates to handle API object coordinates (#26893)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com> Co-authored-by: Travis Plunk <travis.plunk@microsoft.com> Co-authored-by: PowerShell Team Bot <69177312+pwshBot@users.noreply.github.com> Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
1 parent e170b72 commit 3122917

File tree

8 files changed

+29
-18
lines changed

8 files changed

+29
-18
lines changed

DotnetRuntimeMetadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"quality": "daily",
55
"qualityFallback": "preview",
66
"packageVersionPattern": "9.0.0-preview.6",
7-
"sdkImageVersion": "10.0.101",
7+
"sdkImageVersion": "11.0.100-preview.1.26104.118",
88
"nextChannel": "9.0.0-preview.7",
99
"azureFeed": "",
1010
"sdkImageOverride": ""

src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<ItemGroup>
1010
<ProjectReference Include="..\System.Management.Automation\System.Management.Automation.csproj" />
11-
<PackageReference Include="Markdig.Signed" Version="0.45.0" />
11+
<PackageReference Include="Markdig.Signed" Version="1.0.0" />
1212
<PackageReference Include="Microsoft.PowerShell.MarkdownRender" Version="7.2.1" />
1313
</ItemGroup>
1414

src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="11.0.0-preview.1.26104.118" />
2020
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="11.0.0-preview.1.26104.118" />
2121
<!-- the following package(s) are from https://github.com/dotnet/fxdac -->
22-
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" />
22+
<PackageReference Include="System.Data.SqlClient" Version="4.9.1" />
2323
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
2424
<PackageReference Include="System.IO.Packaging" Version="11.0.0-preview.1.26104.118" />
2525
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="11.0.0-preview.1.26104.118" />

test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<PackageReference Include="MarkdownLog.NS20" Version="0.10.1" />
1111
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
1212
<PackageReference Include="BenchmarkDotNet" Version="0.15.8" />
13-
<PackageReference Include="Perfolizer" Version="0.6.5" />
13+
<PackageReference Include="Perfolizer" Version="0.6.7" />
1414
</ItemGroup>
1515
</Project>

test/tools/TestService/TestService.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="Microsoft.Windows.Compatibility" Version="11.0.0-preview.1.26104.118" />
19-
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" />
19+
<PackageReference Include="System.Data.SqlClient" Version="4.9.1" />
2020
</ItemGroup>
2121

2222
</Project>

test/xUnit/xUnit.tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<PrivateAssets>all</PrivateAssets>
3131
</PackageReference>
3232
<PackageReference Include="XunitXml.TestLogger" Version="8.0.0" />
33-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
33+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
3434
</ItemGroup>
3535

3636
<ItemGroup>

tools/cgmanifest/main/cgmanifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/component-detection-manifest.json",
23
"Registrations": [
34
{
45
"Component": {
@@ -65,7 +66,7 @@
6566
"Type": "nuget",
6667
"Nuget": {
6768
"Name": "Markdig.Signed",
68-
"Version": "0.45.0"
69+
"Version": "1.0.0"
6970
}
7071
},
7172
"DevelopmentDependency": false
@@ -495,7 +496,7 @@
495496
"Type": "nuget",
496497
"Nuget": {
497498
"Name": "System.Data.SqlClient",
498-
"Version": "4.9.0"
499+
"Version": "4.9.1"
499500
}
500501
},
501502
"DevelopmentDependency": false
@@ -750,6 +751,5 @@
750751
},
751752
"DevelopmentDependency": false
752753
}
753-
],
754-
"$schema": "https://json.schemastore.org/component-detection-manifest.json"
754+
]
755755
}

tools/clearlyDefined/src/ClearlyDefined/ClearlyDefined.psm1

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,30 @@ function ConvertFrom-ClearlyDefinedCoordinates {
4040
[CmdletBinding()]
4141
param(
4242
[parameter(mandatory = $true, ValueFromPipeline = $true)]
43-
[string]
43+
[object]
4444
$Coordinates
4545
)
4646

4747
Begin {}
4848
Process {
49-
$parts = $Coordinates.Split('/')
50-
[PSCustomObject]@{
51-
type = $parts[0]
52-
provider = $parts[1]
53-
namespace = $parts[2]
54-
name = $parts[3]
55-
revision = $parts[4]
49+
if ($Coordinates -is [string]) {
50+
$parts = $Coordinates.Split('/')
51+
[PSCustomObject]@{
52+
type = $parts[0]
53+
provider = $parts[1]
54+
namespace = $parts[2]
55+
name = $parts[3]
56+
revision = $parts[4]
57+
}
58+
} else {
59+
# Coordinates is already an object (e.g., from ClearlyDefined API response)
60+
[PSCustomObject]@{
61+
type = $Coordinates.type
62+
provider = $Coordinates.provider
63+
namespace = $Coordinates.namespace
64+
name = $Coordinates.name
65+
revision = $Coordinates.revision
66+
}
5667
}
5768
}
5869
End {}

0 commit comments

Comments
 (0)