Skip to content

Commit 20a1247

Browse files
authored
Merge pull request #140 from CycloneDX/json-deserialization-regression
Bump CycloneDX libraries to 2.2.1 to fix JSON deserialization regression
2 parents 43b8cf8 + 4a78f16 commit 20a1247

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

cyclonedx/Commands/MergeCommand.cs

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public static async Task<int> Merge(MergeCommandOptions options)
111111
}
112112

113113
outputBom = CycloneDXUtils.Merge(outputBom, inputBom);
114+
outputBom.Version = 1;
114115
if (inputBom.Components != null && !outputToConsole)
115116
Console.WriteLine($" Contains {inputBom.Components.Count} components");
116117
}

cyclonedx/CsvSerializer.cs

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ public static Bom Deserialize(string csv)
145145
using (var csvReader = new CsvReader(reader, csvConfig))
146146
{
147147
var bom = new Bom();
148+
bom.Version = 1;
148149
bom.Components = new List<Component>();
149150

150151
csvReader.Read();

cyclonedx/cyclonedx.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
<ItemGroup>
1919
<PackageReference Include="CsvHelper" Version="27.1.0" />
20-
<PackageReference Include="CycloneDX.Core" Version="2.1.0" />
21-
<PackageReference Include="CycloneDX.Utils" Version="2.1.0" />
20+
<PackageReference Include="CycloneDX.Core" Version="2.2.1" />
21+
<PackageReference Include="CycloneDX.Utils" Version="2.2.1" />
2222
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20371.2" />
2323
</ItemGroup>
2424

0 commit comments

Comments
 (0)