Skip to content

Commit a4c7fb0

Browse files
committed
Update change-case to Funcky 3
1 parent 6dfc7d4 commit a4c7fb0

File tree

7 files changed

+24
-25
lines changed

7 files changed

+24
-25
lines changed

Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
3+
<PropertyGroup Label="Common Settings">
4+
<LangVersion>10.0</LangVersion>
5+
<Nullable>enable</Nullable>
6+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<IsPackable>false</IsPackable>
9+
</PropertyGroup>
310
<PropertyGroup Label="Shared NuGet Metadata">
411
<Authors>Messerli Informatik AG</Authors>
512
<PackageLicenseExpression>MIT OR Apache-2.0</PackageLicenseExpression>

Messerli.ChangeCase.Test/Messerli.ChangeCase.Test.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk; Microsoft.Build.CentralPackageVersions">
22
<PropertyGroup>
33
<TargetFramework>net5.0</TargetFramework>
4-
<Nullable>enable</Nullable>
5-
<IsPackable>false</IsPackable>
64
</PropertyGroup>
75
<ItemGroup>
86
<PackageReference Include="Microsoft.NET.Test.Sdk" />

Messerli.ChangeCase/Messerli.ChangeCase.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk; Microsoft.Build.CentralPackageVersions">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
4-
<LangVersion>9.0</LangVersion>
5-
<Nullable>enable</Nullable>
3+
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
64
<Product>Messerli.ChangeCase</Product>
5+
<IsPackable>true</IsPackable>
76
<Description>Transform a string between different casings.</Description>
87
<PackageTags>Utility Casing</PackageTags>
9-
<Version>1.1.0</Version>
8+
<Version>1.2.0</Version>
109
<IncludeSymbols>true</IncludeSymbols>
1110
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1211
</PropertyGroup>

Messerli.ChangeCase/StringCaseExtensions.Private.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using Funcky;
1+
using Funcky;
52
using Funcky.Extensions;
63
using Funcky.Monads;
74

@@ -30,7 +27,7 @@ private static ExtractElement SelectSplitStrategy(string identifier)
3027

3128
private static Option<SplitResult> SplitOnCasing(string identifier, int startIndex)
3229
=> startIndex >= identifier.Length
33-
? Option<SplitResult>.None()
30+
? Option<SplitResult>.None
3431
: ExtractByCasing(identifier, startIndex);
3532

3633
private static Option<SplitResult> ExtractByCasing(string identifier, int startIndex)
@@ -78,7 +75,7 @@ private static bool NextIsAbbreviation(string identifier, int startIndex)
7875

7976
private static Option<SplitResult> SplitOnSeparators(string identifier, int startIndex)
8077
=> startIndex > identifier.Length
81-
? Option<SplitResult>.None()
78+
? Option<SplitResult>.None
8279
: ExtractBySeparator(identifier, startIndex);
8380

8481
private static SplitResult ExtractBySeparator(string identifier, int startIndex)
@@ -105,7 +102,7 @@ private static string JoinStrings(this IEnumerable<string> strings, string separ
105102

106103
private static IEnumerable<string> SplitBy(this string text, ExtractElement extractNext)
107104
=> Sequence
108-
.Generate(new SplitResult(0, string.Empty), previous => extractNext(text, previous.NextStartIndex))
105+
.Successors(extractNext(text, 0), previous => extractNext(text, previous.NextStartIndex))
109106
.Select(r => r.Result);
110107

111108
private static int GetIndex(ValueWithIndex<char> value)

Messerli.ChangeCase/StringCaseExtensions.SplitResult.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using Funcky.Monads;
2-
3-
namespace Messerli.ChangeCase
1+
namespace Messerli.ChangeCase
42
{
53
public static partial class StringCaseExtensions
64
{

Packages.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<ItemGroup Label="Runtime Dependencies">
4-
<PackageReference Update="Funcky" Version="[2.4.0, 3)" />
4+
<PackageReference Update="Funcky" Version="[3.0.0, 4)" />
55
</ItemGroup>
66
<ItemGroup Label="Build Dependencies">
7-
<PackageReference Update="Messerli.CodeStyle" Version="2.0.1" />
7+
<PackageReference Update="Messerli.CodeStyle" Version="2.1.3" />
88
</ItemGroup>
99
<ItemGroup Label="Test Dependencies">
10-
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="15.9.0" />
11-
<PackageReference Update="xunit" Version="2.4.0" />
12-
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.0" />
13-
<PackageReference Update="Funcky.Xunit" Version="0.1.3" />
14-
<PackageReference Update="coverlet.collector" Version="3.0.2" />
10+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.3.1" />
11+
<PackageReference Update="xunit" Version="2.4.2" />
12+
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5" />
13+
<PackageReference Update="Funcky.Xunit" Version="2.0.0" />
14+
<PackageReference Update="coverlet.collector" Version="3.1.2" />
1515
</ItemGroup>
1616
</Project>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "5.0.100",
3+
"version": "6.0.400",
44
"rollForward": "feature"
55
},
66
"msbuild-sdks": {
7-
"Microsoft.Build.CentralPackageVersions" : "2.0.79"
7+
"Microsoft.Build.CentralPackageVersions" : "2.1.3"
88
}
99
}

0 commit comments

Comments
 (0)