Skip to content

Commit d5f284b

Browse files
authored
V9.0.0/move replace-line-endings to xunit (#89)
💬 updated CHANGELOG tied to PR #88 💥 remove support for ReplaceLineEndings as it was only used for unit testing ⬆️ bump dependencies 💬 updated NuGet package literals and CHANGELOG ⚗️ experimental try on paths-ignore for prs
1 parent e1941c3 commit d5f284b

File tree

24 files changed

+48
-79
lines changed

24 files changed

+48
-79
lines changed

.github/workflows/pipelines.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Cuemon CI/CD Pipeline
22
on:
33
pull_request:
4-
branches: [main]
54
paths-ignore:
65
- .codecov/**
76
- .docfx/**

.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Availability: .NET 9, .NET 8 and .NET Standard 2.0
88
# Breaking Changes
99
- REMOVED ConditionExtensions class from the Cuemon.Extensions namespace and moved members to Condition class in the Cuemon.Core assembly (Cuemon namespace)
1010
- REMOVED ValidatorExtensions class from the Cuemon.Extensions namespace and moved members to Validator class in the Cuemon.Core assembly (Cuemon namespace)
11+
- REMOVED ReplaceLineEndings extension method from the StringExtensions class in the Cuemon.Extensions namespace
1112

1213
Version 8.3.2
1314
Availability: .NET 8, .NET 6 and .NET Standard 2.0

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,32 @@ Removed features:
149149
- UserAgentDocumentFilter class from the Cuemon.Extensions.Swashbuckle.AspNetCore namespace (breaking change)
150150
- UserAgentDocumentOptions class from the Cuemon.Extensions.Swashbuckle.AspNetCore namespace (breaking change)
151151
- XPathDocumentExtensions class from the Cuemon.Extensions.Swashbuckle.AspNetCore namespace (breaking change)
152+
- JsonSerializationInputFormatter class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json namespace (breaking change)
153+
- JsonSerializationMvcOptionsSetup class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json namespace (breaking change)
154+
- JsonSerializationOutputFormatter class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json namespace (breaking change)
155+
- JsonSerializerSettingsExtensions class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json namespace (breaking change)
156+
- MvcBuilderExtensions class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json namespace (breaking change)
157+
- MvcCoreBuilderExtensions class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json namespace (breaking change)
158+
- JsonConverterCollectionExtensions class from the Cuemon.Extensions.AspNetCore.Newtonsoft.Json.Converters namespace (breaking change)
159+
- ServiceCollectionExtensions class from the Cuemon.Extensions.AspNetCore.Newtonsoft.Json.Formatters namespace (breaking change)
160+
- ExceptionConverter class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
161+
- FailureConverter class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
162+
- JsonConverterCollectionExtensions class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
163+
- StringFlagsEnumConverter class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
164+
- TransientFaultExceptionConverter class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
165+
- DynamicContractResolver class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
166+
- DynamicJsonConverter class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
167+
- NewtonsoftJsonFormatter class from the Cuemon.Extensions.Newtonsoft.Json.Formatters namespace (breaking change)
168+
- NewtonsoftJsonFormatterOptions class from the Cuemon.Extensions.Newtonsoft.Json.Formatters namespace (breaking change)
169+
- JData class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
170+
- JDataResult class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
171+
- JDataResultExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
172+
- JsonReaderExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
173+
- JsonSerializerSettingsExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
174+
- JsonWriterExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
175+
- ContractResolverExtensions class from the Cuemon.Extensions.Newtonsoft.Json.Serialization namespace (breaking change)
176+
- ValidatorExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
177+
- ReplaceLineEndings extension method from the StringExtensions class in the Cuemon.Extensions namespace (breaking change)
152178

153179

154180
## [8.3.2] - 2024-08-04

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
7777
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
7878
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.10.0" Condition="$(TargetFramework.StartsWith('net4')) AND '$(IsLinux)' == 'true'" />
79-
<PackageReference Include="xunit" Version="2.9.0" />
80-
<PackageReference Include="xunit.runner.console" Version="2.9.0" />
79+
<PackageReference Include="xunit" Version="2.9.1" />
80+
<PackageReference Include="xunit.runner.console" Version="2.9.1" />
8181
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
8282
<PrivateAssets>all</PrivateAssets>
8383
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -93,6 +93,6 @@
9393
</ItemGroup>
9494

9595
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
96-
<PackageReference Include="Codebelt.Extensions.Xunit" Version="9.0.0-preview.2" />
96+
<PackageReference Include="Codebelt.Extensions.Xunit" Version="9.0.0-preview.4" />
9797
</ItemGroup>
9898
</Project>

src/Cuemon.Extensions.Core/StringExtensions.cs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,6 @@ namespace Cuemon.Extensions
1313
/// </summary>
1414
public static class StringExtensions
1515
{
16-
#if NETSTANDARD2_0_OR_GREATER
17-
private static readonly Regex NewLineRegex = new(@"\r\n|\r|\n", RegexOptions.Compiled);
18-
19-
/// <summary>
20-
/// Replaces all newline sequences in the current string with <see cref="Environment.NewLine"/>.
21-
/// </summary>
22-
/// <param name="input">The <see cref="string"/> to extend.</param>
23-
/// <returns>A string whose contents match the current string, but with all newline sequences replaced with <see cref="Environment.NewLine"/>.</returns>
24-
/// <remarks>Shamefully stolen from https://github.com/WebFormsCore/WebFormsCore/blob/main/src/WebFormsCore/Util/StringExtensions.cs to support .NET Standard 2.0.</remarks>
25-
public static string ReplaceLineEndings(this string input)
26-
{
27-
return ReplaceLineEndings(input, Environment.NewLine);
28-
}
29-
30-
/// <summary>
31-
/// Replaces all newline sequences in the current string with <paramref name="replacementText"/>.
32-
/// </summary>
33-
/// <param name="input">The <see cref="string"/> to extend.</param>
34-
/// <param name="replacementText">The text to use as replacement.</param>
35-
/// <returns>A string whose contents match the current string, but with all newline sequences replaced with <paramref name="replacementText"/>.</returns>
36-
/// <remarks>Shamefully stolen from https://github.com/WebFormsCore/WebFormsCore/blob/main/src/WebFormsCore/Util/StringExtensions.cs to support .NET Standard 2.0.</remarks>
37-
/// <exception cref="ArgumentNullException">
38-
/// <paramref name="input"/> cannot be null -or-
39-
/// <paramref name="replacementText"/> cannot be null.
40-
/// </exception>
41-
public static string ReplaceLineEndings(this string input, string replacementText)
42-
{
43-
Validator.ThrowIfNull(input);
44-
Validator.ThrowIfNull(replacementText);
45-
return NewLineRegex.Replace(input, replacementText);
46-
}
47-
#endif
48-
4916
/// <summary>
5017
/// Returns the set difference between <paramref name="second"/> and <paramref name="first"/> or <see cref="string.Empty"/> if no difference.
5118
/// </summary>

test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.2" />
17+
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.4" />
1818
</ItemGroup>
1919

2020
</Project>

test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<ItemGroup>
99
<PackageReference Include="Codebelt.Extensions.AspNetCore.Newtonsoft.Json" Version="9.0.0-preview.1" />
1010
<PackageReference Include="Meziantou.Xunit.ParallelTestFramework" Version="2.3.0" />
11-
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.2" />
11+
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.4" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<ItemGroup>
99
<PackageReference Include="Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json" Version="9.0.0-preview.1" />
1010
<PackageReference Include="Meziantou.Xunit.ParallelTestFramework" Version="2.3.0" />
11-
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.2" />
11+
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.4" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json" Version="9.0.0-preview.1" />
19-
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.2" />
19+
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.4" />
2020
</ItemGroup>
2121

2222
</Project>

test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.2" />
15+
<PackageReference Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0-preview.4" />
1616
</ItemGroup>
1717

1818
</Project>

0 commit comments

Comments
 (0)