Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project>
<!-- Shared package refs -->
<PropertyGroup>
<!-- Suppress NU1507 (multiple package sources with CPM) -->
<NoWarn>$(NoWarn);NU1507;MSTEST0001</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors);MSTEST0001</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>
<!-- NBGV drives versions; PrivateAssets=all keeps it out of consumers -->
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
<!-- SourceLink for GitHub -->
<PackageReference Include="Microsoft.SourceLink.GitHub"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" />
</ItemGroup>
Expand Down Expand Up @@ -43,6 +45,7 @@
<!-- Global project properies -->
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<TargetFramework>net10.0</TargetFramework>
<!-- Primary target: .NET 10 (next LTS), with .NET 9 for current support, .NET 8 for compatibility -->
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
</PropertyGroup>
</Project>
23 changes: 19 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,28 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="JsonCons.JsonPath" Version="1.1.0" />
<PackageVersion Include="JsonPatch.Net" Version="4.0.1" />
<PackageVersion Include="JsonPath.Net" Version="2.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.JsonPatch" Version="10.0.1" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<!-- Benchmarking -->
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
</ItemGroup>

<!-- .NET 8.0 specific packages -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageVersion Include="Microsoft.AspNetCore.JsonPatch" Version="8.0.23" />
</ItemGroup>

<!-- .NET 9.0 specific packages -->
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageVersion Include="JsonCraft.JsonPath" Version="1.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.JsonPatch" Version="9.0.12" />
</ItemGroup>

<!-- .NET 10.0 specific packages -->
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageVersion Include="Microsoft.AspNetCore.JsonPatch" Version="10.0.2" />
<PackageVersion Include="JsonCraft.JsonPath" Version="1.1.0" />
</ItemGroup>

</Project>
7 changes: 7 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
1 change: 0 additions & 1 deletion src/Hyperbee.Json/Hyperbee.Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="/" />
<None Include="..\..\README.md" Pack="true" Visible="true" PackagePath="/" Link="README.md" />
<None Include="..\..\LICENSE" Pack="true" Visible="false" PackagePath="/" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Scripting" />
<PackageReference Update="Microsoft.SourceLink.GitHub" />
<PackageReference Update="Nerdbank.GitVersioning" />
</ItemGroup>
Expand Down
15 changes: 14 additions & 1 deletion test/Hyperbee.Json.Benchmark/Config.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;
Expand All @@ -12,7 +13,19 @@ public class Config : ManualConfig
{
public Config()
{
AddJob( Job.ShortRun );

AddJob( Job.ShortRun
.WithRuntime( CoreRuntime.Core90 )
.WithId( ".NET 8" ) );

AddJob( Job.ShortRun
.WithRuntime( CoreRuntime.Core90 )
.WithId( ".NET 9" ) );

AddJob( Job.ShortRun
.WithRuntime( CoreRuntime.Core10_0 )
.WithId( ".NET 10" ) );

AddValidator( JitOptimizationsValidator.DontFailOnError );
AddLogger( ConsoleLogger.Default );
AddColumnProvider(
Expand Down
6 changes: 5 additions & 1 deletion test/Hyperbee.Json.Benchmark/Hyperbee.Json.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="JsonCons.JsonPath" />
<PackageReference Include="JsonCraft.JsonPath" />
<PackageReference Include="JsonPatch.Net" />
<PackageReference Include="JsonPath.Net" />
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" />
Expand All @@ -23,6 +22,11 @@
<PackageReference Update="Nerdbank.GitVersioning" />
</ItemGroup>

<!-- JsonCraft.JsonPath is only available for .NET 9.0 and later -->
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
<PackageReference Include="JsonCraft.JsonPath" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Hyperbee.Json\Hyperbee.Json.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public void JsonCons_JsonElement()
Consume( select, first );
}

#if NET9_0_OR_GREATER
[Benchmark( Description = "JsonCraft.JsonElement" )]
public void JsonCraft_JsonElement()
{
Expand All @@ -182,4 +183,6 @@ public void JsonCraft_JsonElement()

Consume( select, first );
}
#endif

}
Binary file added test/Hyperbee.Json.Cts.lnk
Binary file not shown.
6 changes: 3 additions & 3 deletions test/Hyperbee.Json.Cts/Hyperbee.Json.Cts.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
Expand All @@ -11,9 +11,9 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="MSTest.TestAdapter" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions test/Hyperbee.Json.Tests/Hyperbee.Json.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<RootNamespace>Hyperbee.Json.Tests</RootNamespace>
Expand All @@ -7,11 +7,11 @@
<EmbeddedResource Include="TestSupport\Json\BookStore.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="YamlDotNet"/>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="YamlDotNet" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Hyperbee.Json\Hyperbee.Json.csproj" />
Expand Down
9 changes: 6 additions & 3 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "3.1.2",
"version": "3.2-alpha",
"publicReleaseRefSpec": [
"^refs/heads/main$",
"^refs/heads/hotfix$",
"^refs/heads/hotfix\\/.+$",
"^refs/heads/v\\d+\\.\\d+$"
]
],
"release": {
"firstUnstableTag": "alpha"
}
}
Loading