Skip to content

feat: Add net10 #1719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: ⚙️ Setup GIT versioning
uses: dotnet/[email protected]
Expand Down Expand Up @@ -127,6 +128,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: ⚙️ Restore packages and tools
run: |
Expand Down Expand Up @@ -220,6 +222,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: ⚙️ Setup GIT versioning
uses: dotnet/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: 🎨 Setup color
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: 🛠️ Update changelog
uses: thomaseizinger/[email protected]
Expand Down Expand Up @@ -96,7 +97,7 @@ jobs:
- name: 🛠️ Packing library in release mode
run: |
dotnet pack src/bunit/ -c Release --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages -p:ContinuousIntegrationBuild=true -p:publicrelease=true
dotnet pack src/bunit.template/ -c Release --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages -p:ContinuousIntegrationBuild=true -p:publicrelease=true
dotnet pack src/bunit.template/ -c Release --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages -p:ContinuousIntegrationBuild=true -p:publicrelease=true
dotnet pack src/bunit.generators/ -c Release --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages -p:ContinuousIntegrationBuild=true -p:publicrelease=true
dotnet pack src/bunit.web.query/ -c Release --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages -p:ContinuousIntegrationBuild=true -p:publicrelease=true

Expand Down
15 changes: 14 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<ItemGroup Label="System.Text.Json Vulnerability">
<!-- Due to a CVE in System.Text.Json we explicitly reference the latest version of System.Text.Json -->
<PackageVersion Include="System.Text.Json" Version="9.0.2"/>
<PackageVersion Include="System.Text.Json" Version="9.0.5"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
Expand Down Expand Up @@ -57,6 +57,19 @@
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.0.2"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.0-preview.4.25258.110"/>
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0-preview.4.25258.110"/>
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="10.0.0-preview.4.25258.110"/>

<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="10.0.0-preview.4.25258.110"/>
<PackageVersion Include="Microsoft.Extensions.Localization.Abstractions" Version="10.0.0-preview.4.25258.110"/>
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0-preview.4.25258.110"/>
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="10.0.0-preview.4.25258.110"/>
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.0-preview.4.25258.110"/>
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="10.0.0-preview.4.25258.110"/>
</ItemGroup>

<ItemGroup Label="Test Dependencies">
<PackageVersion Include="AutoFixture" Version="4.18.1"/>
<PackageVersion Include="AutoFixture.Xunit2" Version="4.18.1"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/samples/components/bunit.docs.samples.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<RootNamespace>Bunit.Docs.Samples</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>CA1014,NU5104</NoWarn>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"rollForward": "latestMajor",
"allowPrerelease": false
"allowPrerelease": true
}
}
3 changes: 1 addition & 2 deletions src/bunit.web.query/bunit.web.query.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<RootNamespace>Bunit</RootNamespace>
<AssemblyName>Bunit.Web.Query</AssemblyName>
</PropertyGroup>
Expand All @@ -25,7 +25,6 @@
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Microsoft.AspNetCore.Components" />
<PackageReference Include="Meziantou.Polyfill" Condition="'$(TargetFramework)' == 'netstandard2.1'" PrivateAssets="all" IncludeAssets="Runtime;Build;Native;contentFiles;Analyzers" />
</ItemGroup>

<ItemGroup>
Expand Down
29 changes: 29 additions & 0 deletions src/bunit/JSInterop/Implementation/BunitJSObjectReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,35 @@ public ValueTask<TValue> InvokeAsync<TValue>(string identifier, object?[]? args)
public ValueTask<TValue> InvokeAsync<TValue>(string identifier, CancellationToken cancellationToken, object?[]? args)
=> JSInterop.HandleInvokeAsync<TValue>(identifier, cancellationToken, args);

#if NET10_0_OR_GREATER
/// <inheritdoc/>
public ValueTask<IJSObjectReference> InvokeNewAsync(string identifier, object?[]? args) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask<IJSObjectReference> InvokeNewAsync(string identifier, CancellationToken cancellationToken, object?[]? args) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask<TValue> GetValueAsync<TValue>(string identifier) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask<TValue> GetValueAsync<TValue>(string identifier, CancellationToken cancellationToken) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask SetValueAsync<TValue>(string identifier, TValue value) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask SetValueAsync<TValue>(string identifier, TValue value, CancellationToken cancellationToken) => throw new NotImplementedException();

/// <inheritdoc/>
public IJSInProcessObjectReference InvokeNew(string identifier, object?[]? args) => throw new NotImplementedException();

/// <inheritdoc/>
public TValue GetValue<TValue>(string identifier) => throw new NotImplementedException();

/// <inheritdoc/>
public void SetValue<TValue>(string identifier, TValue value) => throw new NotImplementedException();
#endif

/// <inheritdoc/>
public TValue Invoke<TValue>(string identifier, params object?[]? args)
=> JSInterop.HandleInvoke<TValue>(identifier, args);
Expand Down
29 changes: 29 additions & 0 deletions src/bunit/JSInterop/Implementation/BunitJSRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,35 @@ public ValueTask<TValue> InvokeAsync<TValue>(string identifier, object?[]? args)
public ValueTask<TValue> InvokeAsync<TValue>(string identifier, CancellationToken cancellationToken, object?[]? args)
=> JSInterop.HandleInvokeAsync<TValue>(identifier, cancellationToken, args);

#if NET10_0_OR_GREATER
/// <inheritdoc/>
public ValueTask<IJSObjectReference> InvokeNewAsync(string identifier, object?[]? args) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask<IJSObjectReference> InvokeNewAsync(string identifier, CancellationToken cancellationToken, object?[]? args) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask<TValue> GetValueAsync<TValue>(string identifier) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask<TValue> GetValueAsync<TValue>(string identifier, CancellationToken cancellationToken) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask SetValueAsync<TValue>(string identifier, TValue value) => throw new NotImplementedException();

/// <inheritdoc/>
public ValueTask SetValueAsync<TValue>(string identifier, TValue value, CancellationToken cancellationToken) => throw new NotImplementedException();

/// <inheritdoc/>
public IJSInProcessObjectReference InvokeNew(string identifier, params object?[]? args) => throw new NotImplementedException();

/// <inheritdoc/>
public TValue GetValue<TValue>(string identifier) => throw new NotImplementedException();

/// <inheritdoc/>
public void SetValue<TValue>(string identifier, TValue value) => throw new NotImplementedException();
#endif

/// <inheritdoc/>
public TResult Invoke<TResult>(string identifier, params object?[]? args)
=> JSInterop.HandleInvoke<TResult>(identifier, args);
Expand Down
3 changes: 1 addition & 2 deletions src/bunit/bunit.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<RootNamespace>Bunit</RootNamespace>
</PropertyGroup>

Expand Down Expand Up @@ -41,7 +41,6 @@
<PackageReference Include="Microsoft.AspNetCore.Components.Web" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions tests/bunit.testassets/bunit.testassets.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<RootNamespace>Bunit.TestAssets</RootNamespace>
<AssemblyName>Bunit.TestAssets</AssemblyName>
<OutputType>Library</OutputType>
Expand All @@ -23,7 +23,6 @@
<PackageReference Include="Microsoft.AspNetCore.Components" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="Serilog.Extensions.Logging" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion tests/bunit.tests/bunit.tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<RootNamespace>Bunit</RootNamespace>
<AssemblyName>Bunit.Tests</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/bunit.web.query.tests/bunit.web.query.tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<RootNamespace>Bunit</RootNamespace>
<AssemblyName>Bunit.Web.Query.Tests</AssemblyName>
</PropertyGroup>
Expand Down