Skip to content

Commit be7e4b7

Browse files
committed
Fix multi-targeting
1 parent 86b3e3f commit be7e4b7

13 files changed

Lines changed: 88 additions & 45 deletions

Directory.Build.props

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2323
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2424
<PackageIcon>assets/icon.png</PackageIcon>
25-
<PackageReleaseNotes>https://github.com/Stillpoint-Software/PostgresTest/releases/latest</PackageReleaseNotes>
26-
<RepositoryUrl>https://github.com/Stillpoint-Software/PostgresTest</RepositoryUrl>
25+
<PackageReleaseNotes>https://github.com/Stillpoint-Software/hyperbee.json/releases/latest</PackageReleaseNotes>
26+
<RepositoryUrl>https://github.com/Stillpoint-Software/hyperbee.json</RepositoryUrl>
2727
<RepositoryType>git</RepositoryType>
28-
<PackageProjectUrl>https://github.com/Stillpoint-Software/PostgresTest</PackageProjectUrl>
28+
<PackageProjectUrl>https://stillpoint-software.github.io/hyperbee.json/</PackageProjectUrl>
2929
</PropertyGroup>
3030

3131
<!-- Pull README & LICENSE into the package root -->
@@ -40,9 +40,15 @@
4040
PackagePath="\"
4141
Link="LICENSE" />
4242
</ItemGroup>
43-
<!-- Global project properies -->
43+
<!-- Global project properties - .NET 10 LTS First Strategy -->
4444
<PropertyGroup>
4545
<ImplicitUsings>enable</ImplicitUsings>
46-
<TargetFramework>net10.0</TargetFramework>
46+
<!-- Primary target: .NET 10 (next LTS), with .NET 9 for current support, .NET 8 for compatibility -->
47+
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
48+
</PropertyGroup>
49+
50+
<!-- Suppress common warnings -->
51+
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
52+
<NoWarn>$(NoWarn);MSTEST0001</NoWarn>
4753
</PropertyGroup>
4854
</Project>

Directory.Packages.props

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<Project>
2-
<PropertyGroup>
3-
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4-
</PropertyGroup>
2+
<!-- Enable Central Package Management -->
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
<!-- Suppress NuGet version constraint warnings -->
6+
<NoWarn>$(NoWarn);NU1608</NoWarn>
7+
</PropertyGroup>
8+
9+
<!-- Common packages for all frameworks -->
510
<ItemGroup>
611
<!-- Core Application Dependencies -->
712
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="5.0.0" />
@@ -27,6 +32,20 @@
2732
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
2833
<!-- Benchmarking -->
2934
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
35+
</ItemGroup>
36+
37+
<!-- .NET 8 specific packages (compatibility) -->
38+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
39+
<!-- JsonCraft.JsonPath doesn't support .NET 8 -->
40+
</ItemGroup>
41+
42+
<!-- .NET 9+ specific packages -->
43+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0' OR '$(TargetFramework)' == 'net10.0'">
3044
<PackageVersion Include="JsonCraft.JsonPath" Version="1.0.0" />
3145
</ItemGroup>
46+
47+
<!-- .NET 10 specific packages (primary target) -->
48+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
49+
<!-- Add .NET 10 specific package versions here if needed -->
50+
</ItemGroup>
3251
</Project>

NuGet.Config

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
5+
</packageSources>
6+
7+
<!-- Package source mapping for Central Package Management -->
8+
<packageSourceMapping>
9+
<packageSource key="nuget.org">
10+
<package pattern="Microsoft.*" />
11+
<package pattern="System.*" />
12+
<package pattern="*" />
13+
</packageSource>
14+
</packageSourceMapping>
15+
</configuration>

src/Hyperbee.Json/Dynamic/DynamicJsonElement.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public override bool TryGetIndex( GetIndexBinder binder, object[] indexes, out o
4343
return true;
4444
}
4545

46-
result = null;
46+
result = null!;
4747
return false;
4848
}
4949

@@ -60,7 +60,7 @@ public override bool TryGetMember( GetMemberBinder binder, out object result )
6060
}
6161
}
6262

63-
result = null;
63+
result = null!;
6464
return false;
6565
}
6666

@@ -74,7 +74,7 @@ public override bool TryInvokeMember( InvokeMemberBinder binder, object[] args,
7474
return true;
7575
}
7676

77-
result = null;
77+
result = null!;
7878
return false;
7979
}
8080

src/Hyperbee.Json/Dynamic/DynamicJsonNode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public override bool TryGetIndex( GetIndexBinder binder, object[] indexes, out o
3939
return true;
4040
}
4141

42-
result = null;
42+
result = null!;
4343
return false;
4444
}
4545

@@ -57,7 +57,7 @@ public override bool TryGetMember( GetMemberBinder binder, out object result )
5757
result = new DynamicJsonNode( ref arrayValue );
5858
return true;
5959
default:
60-
result = null;
60+
result = null!;
6161
return false;
6262
}
6363
}
@@ -86,7 +86,7 @@ public override bool TryInvokeMember( InvokeMemberBinder binder, object[] args,
8686
return true;
8787
}
8888

89-
result = null;
89+
result = null!;
9090
return false;
9191
}
9292

src/Hyperbee.Json/Hyperbee.Json.csproj

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<IsPackable>true</IsPackable>
4-
<Authors>Stillpoint Software, Inc.</Authors>
5-
<PackageId>Hyperbee.Json</PackageId>
6-
<PackageReadmeFile>README.md</PackageReadmeFile>
7-
<PackageTags>json-path;jsonpath;json-pointer;jsonpointer;json-patch;jsonpatch;query;path;patch;diff;json;rfc9535;rfc6901;rfc6902</PackageTags>
8-
<PackageIcon>icon.png</PackageIcon>
9-
<PackageProjectUrl>https://stillpoint-software.github.io/hyperbee.json/</PackageProjectUrl>
10-
<PackageLicenseFile>LICENSE</PackageLicenseFile>
11-
<Copyright>Stillpoint Software, Inc.</Copyright>
12-
<Title>Hyperbee Json</Title>
13-
<Description>A high-performance JSON library for System.Text.Json JsonElement and JsonNode, providing robust support for JSONPath, JsonPointer, JsonPatch, and JsonDiff.</Description>
14-
<RepositoryUrl>https://github.com/Stillpoint-Software/Hyperbee.Json</RepositoryUrl>
15-
<RepositoryType>git</RepositoryType>
16-
<PackageReleaseNotes>https://github.com/Stillpoint-Software/Hyperbee.Json/releases/latest</PackageReleaseNotes>
17-
18-
</PropertyGroup>
2+
<PropertyGroup>
3+
<IsPackable>true</IsPackable>
4+
<Authors>Stillpoint Software, Inc.</Authors>
5+
<PackageId>Hyperbee.Json</PackageId>
6+
<PackageReadmeFile>README.md</PackageReadmeFile>
7+
<PackageTags>json-path;jsonpath;json-pointer;jsonpointer;json-patch;jsonpatch;query;path;patch;diff;json;rfc9535;rfc6901;rfc6902</PackageTags>
8+
<PackageIcon>icon.png</PackageIcon>
9+
<PackageProjectUrl>https://stillpoint-software.github.io/hyperbee.json/</PackageProjectUrl>
10+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
11+
<Copyright>Stillpoint Software, Inc.</Copyright>
12+
<Title>Hyperbee Json</Title>
13+
<Description>A high-performance JSON library for System.Text.Json JsonElement and JsonNode, providing robust support for JSONPath, JsonPointer, JsonPatch, and JsonDiff.</Description>
14+
<RepositoryUrl>https://github.com/Stillpoint-Software/Hyperbee.Json</RepositoryUrl>
15+
<RepositoryType>git</RepositoryType>
16+
<PackageReleaseNotes>https://github.com/Stillpoint-Software/Hyperbee.Json/releases/latest</PackageReleaseNotes>
17+
</PropertyGroup>
1918
<ItemGroup>
2019
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
2120
<_Parameter1>$(AssemblyName).Tests</_Parameter1>

src/Hyperbee.Json/Path/Filters/Parser/Expressions/FunctionExpressionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal class FunctionExpressionFactory : IExpressionFactory
88
public static bool TryGetExpression<TNode>( ref ParserState state, out Expression expression, out CompareConstraint compareConstraint, ITypeDescriptor<TNode> descriptor )
99
{
1010
compareConstraint = CompareConstraint.None;
11-
expression = null;
11+
expression = null!;
1212

1313
if ( state.Item.IsEmpty || !char.IsLetter( state.Item[0] ) )
1414
{

src/Hyperbee.Json/Path/Filters/Parser/Expressions/JsonExpressionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static bool TryGetExpression<TNode>( ref ParserState state, out Expressio
1414

1515
if ( !TryParseNode( descriptor.NodeActions, state.Item, out var node ) )
1616
{
17-
expression = null;
17+
expression = null!;
1818
return false;
1919
}
2020

src/Hyperbee.Json/Path/Filters/Parser/Expressions/NotExpressionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal class NotExpressionFactory : IExpressionFactory
88
public static bool TryGetExpression<TNode>( ref ParserState state, out Expression expression, out CompareConstraint compareConstraint, ITypeDescriptor<TNode> _ = null )
99
{
1010
compareConstraint = CompareConstraint.None;
11-
expression = null;
11+
expression = null!;
1212

1313
return state.Operator == Operator.Not;
1414
}

src/Hyperbee.Json/Path/Filters/Parser/Expressions/ParenExpressionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static bool TryGetExpression<TNode>( ref ParserState state, out Expressio
1111

1212
if ( state.Operator != Operator.OpenParen || !state.Item.IsEmpty )
1313
{
14-
expression = null;
14+
expression = null!;
1515
return false;
1616
}
1717

0 commit comments

Comments
 (0)