Skip to content

Commit 77cfacf

Browse files
authored
Merge pull request #1522 from bUnit-dev/release/v1.31
Release of new minor version v1.31
2 parents c2ae00e + f124668 commit 77cfacf

File tree

15 files changed

+30
-13
lines changed

15 files changed

+30
-13
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
9.0.x
6666
6767
- name: 🛠️ Update changelog
68-
uses: thomaseizinger/keep-a-changelog-new-release@3.0.0
68+
uses: thomaseizinger/keep-a-changelog-new-release@3.1.0
6969
with:
7070
version: ${{ env.NBGV_SemVer2 }}
7171

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ All notable changes to **bUnit** will be documented in this file. The project ad
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- `UploadFile` should only throw an exception when the file size exceeds the maximum allowed size. Reported by [@candritzky](https://github.com/candritzky). Fixed by [@linkdotnet](https://github.com/linkdotnet).
12+
913
## [1.30.3] - 2024-07-21
1014

1115
### Fixed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<!-- Shared code analyzers used for all projects in the solution -->
5353
<ItemGroup Label="Code Analyzers">
5454
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
55-
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.29.0.95321" PrivateAssets="All" />
55+
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.32.0.97167" PrivateAssets="All" />
5656
</ItemGroup>
5757

5858
<ItemGroup Label="Implicit usings"

benchmark/bunit.benchmarks/bunit.benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
11+
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ See the full changelog at https://github.com/bUnit-dev/bUnit/releases
6363

6464
<ItemGroup>
6565
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
66-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.139" PrivateAssets="All" />
66+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.141" PrivateAssets="All" />
6767
</ItemGroup>
6868

6969
</Project>

src/bunit.generators/bunit.generators.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@
8080
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
8181
</PackageReference>
8282
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
83-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.139" PrivateAssets="All" />
83+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.141" PrivateAssets="All" />
8484
</ItemGroup>
8585
</Project>

src/bunit.web/Extensions/InputFile/InputFileExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public static void UploadFiles(
3838
uploadTask.GetAwaiter().GetResult();
3939
}
4040

41-
if (uploadTask.Exception is { InnerException: not null } e)
41+
if (uploadTask.Exception?.InnerException is IOException e)
4242
{
43-
ExceptionDispatchInfo.Capture(e.InnerException).Throw();
43+
ExceptionDispatchInfo.Capture(e).Throw();
4444
}
4545
}
4646
}

src/bunit.web/JSInterop/InvocationHandlers/Implementation/VirtualizeJSRuntimeInvocationHandler.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,15 @@ protected internal override Task<object> HandleAsync(JSRuntimeInvocation invocat
4747
if (!invocation.Identifier.Equals(JsFunctionsPrefix + "dispose", StringComparison.Ordinal))
4848
{
4949
// Assert expectations about the internals of the <Virtualize> component
50+
#if !NET9_0_OR_GREATER
5051
Debug.Assert(invocation.Identifier.Equals(JsFunctionsPrefix + "init", StringComparison.Ordinal), "Received an unexpected invocation identifier from the <Virtualize> component.");
5152
Debug.Assert(invocation.Arguments.Count == 3, "Received an unexpected amount of arguments from the <Virtualize> component.");
5253
Debug.Assert(invocation.Arguments[0] is not null, "Received an unexpected null argument, expected an DotNetObjectReference<VirtualizeJsInterop> instance.");
54+
#else
55+
Debug.Assert(invocation.Identifier.Equals(JsFunctionsPrefix + "init", StringComparison.Ordinal));
56+
Debug.Assert(invocation.Arguments.Count == 3);
57+
Debug.Assert(invocation.Arguments[0] is not null);
58+
#endif
5359

5460
InvokeOnSpacerBeforeVisible(invocation.Arguments[0]!);
5561

src/bunit.web/Rendering/BunitHtmlParser.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ private static (IElement? Context, string? MatchedElement) GetParseContextFromTa
105105
int startIndex,
106106
IDocument document)
107107
{
108+
#if !NET9_0_OR_GREATER
108109
Debug.Assert(document.Body is not null, "Body of the document should never be null at this point.");
110+
#else
111+
Debug.Assert(document.Body is not null);
112+
#endif
109113

110114
IElement? result = null;
111115

src/bunit.web/TestDoubles/Localization/PlaceholderStringLocalization.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures)
1717
/// <summary>
1818
/// Will throw exception to prompt the user.
1919
/// </summary>
20+
#pragma warning disable S2325 // "WithCulture" is public API and can't be changed
2021
public IStringLocalizer WithCulture(CultureInfo culture)
22+
#pragma warning restore S2325
2123
=> throw new MissingMockStringLocalizationException(nameof(WithCulture), culture);
2224

2325
/// <summary>

0 commit comments

Comments
 (0)