Skip to content

Commit 3ff158a

Browse files
Bump csharpier from 0.28.2 to 0.30.2 (#312)
* Bump csharpier from 0.28.2 to 0.30.2 Bumps [csharpier](https://github.com/belav/csharpier) from 0.28.2 to 0.30.2. - [Release notes](https://github.com/belav/csharpier/releases) - [Changelog](https://github.com/belav/csharpier/blob/main/CHANGELOG.md) - [Commits](belav/csharpier@0.28.2...0.30.2) --- updated-dependencies: - dependency-name: csharpier dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * formatted files --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Raphael Guntersweiler <[email protected]>
1 parent 5135705 commit 3ff158a

File tree

26 files changed

+155
-144
lines changed

26 files changed

+155
-144
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"csharpier": {
6-
"version": "0.28.2",
6+
"version": "0.30.2",
77
"commands": [
88
"dotnet-csharpier"
99
]

src/FloppyBot.Aux.TwitchAlerts.Core/TwitchAlertListener.cs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ private static TwitchSubscriptionPlanTier GetTier(TwitchEvent twitchEvent)
8181
return twitchEvent switch
8282
{
8383
TwitchSubscriptionReceivedEvent subReceived => subReceived.SubscriptionPlanTier.Tier,
84-
TwitchReSubscriptionReceivedEvent reSubscriptionReceivedEvent
85-
=> reSubscriptionReceivedEvent.SubscriptionPlanTier.Tier,
84+
TwitchReSubscriptionReceivedEvent reSubscriptionReceivedEvent =>
85+
reSubscriptionReceivedEvent.SubscriptionPlanTier.Tier,
8686
TwitchSubscriptionGiftEvent subGiftEvent => subGiftEvent.SubscriptionPlanTier.Tier,
87-
TwitchSubscriptionCommunityGiftEvent subCommunityGiftEvent
88-
=> subCommunityGiftEvent.SubscriptionPlanTier.Tier,
87+
TwitchSubscriptionCommunityGiftEvent subCommunityGiftEvent => subCommunityGiftEvent
88+
.SubscriptionPlanTier
89+
.Tier,
8990
TwitchRaidEvent _ => TwitchSubscriptionPlanTier.Unknown,
9091
_ => throw new ArgumentOutOfRangeException(nameof(twitchEvent)),
9192
};
@@ -95,14 +96,14 @@ TwitchSubscriptionCommunityGiftEvent subCommunityGiftEvent
9596
{
9697
return type switch
9798
{
98-
TwitchEventTypes.SUBSCRIPTION
99-
=> JsonSerializer.Deserialize<TwitchSubscriptionReceivedEvent>(content),
100-
TwitchEventTypes.RE_SUBSCRIPTION
101-
=> JsonSerializer.Deserialize<TwitchReSubscriptionReceivedEvent>(content),
102-
TwitchEventTypes.SUBSCRIPTION_GIFT
103-
=> JsonSerializer.Deserialize<TwitchSubscriptionGiftEvent>(content),
104-
TwitchEventTypes.SUBSCRIPTION_GIFT_COMMUNITY
105-
=> JsonSerializer.Deserialize<TwitchSubscriptionCommunityGiftEvent>(content),
99+
TwitchEventTypes.SUBSCRIPTION =>
100+
JsonSerializer.Deserialize<TwitchSubscriptionReceivedEvent>(content),
101+
TwitchEventTypes.RE_SUBSCRIPTION =>
102+
JsonSerializer.Deserialize<TwitchReSubscriptionReceivedEvent>(content),
103+
TwitchEventTypes.SUBSCRIPTION_GIFT =>
104+
JsonSerializer.Deserialize<TwitchSubscriptionGiftEvent>(content),
105+
TwitchEventTypes.SUBSCRIPTION_GIFT_COMMUNITY =>
106+
JsonSerializer.Deserialize<TwitchSubscriptionCommunityGiftEvent>(content),
106107
TwitchEventTypes.RAID => JsonSerializer.Deserialize<TwitchRaidEvent>(content),
107108
_ => throw new ArgumentOutOfRangeException(nameof(type)),
108109
};

src/FloppyBot.Base.Testing/LoggingUtils.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ namespace FloppyBot.Base.Testing;
88

99
public static class LoggingUtils
1010
{
11-
public static readonly Lazy<ILogger> SerilogLogger =
12-
new(() => new LoggerConfiguration().ConfigureSerilogForTesting().CreateLogger());
11+
public static readonly Lazy<ILogger> SerilogLogger = new(
12+
() => new LoggerConfiguration().ConfigureSerilogForTesting().CreateLogger()
13+
);
1314

1415
private static readonly Lazy<ILoggerFactory> LoggerFactory = new(InitRealLogger);
1516
private static readonly Lazy<ILoggerFactory> NullLoggerFac = new(NullLoggerFactory.Instance);

src/FloppyBot.Chat.Agent/InterfaceRegistration.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ public static class InterfaceRegistration
1212
private static readonly Dictionary<
1313
string,
1414
Func<IServiceCollection, IServiceCollection>
15-
> InterfaceTypes =
16-
new()
17-
{
18-
{ MockChatInterface.IF_NAME, s => s.AddMockChatInterface() },
19-
{ TwitchChatInterface.IF_NAME, s => s.AddTwitchChatInterface() },
20-
{ DiscordChatInterface.IF_NAME, s => s.AddDiscordChatInterface() },
21-
};
15+
> InterfaceTypes = new()
16+
{
17+
{ MockChatInterface.IF_NAME, s => s.AddMockChatInterface() },
18+
{ TwitchChatInterface.IF_NAME, s => s.AddTwitchChatInterface() },
19+
{ DiscordChatInterface.IF_NAME, s => s.AddDiscordChatInterface() },
20+
};
2221

2322
public static IServiceCollection RegisterChatInterface(
2423
this IServiceCollection services,

src/FloppyBot.Chat.Discord/DiscordChatInterface.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,11 @@ CommandParameterAbstractType commandParameterAbstractType
152152
CommandParameterAbstractType.String => ApplicationCommandOptionType.String,
153153
CommandParameterAbstractType.Enum => ApplicationCommandOptionType.String,
154154
CommandParameterAbstractType.Number => ApplicationCommandOptionType.Number,
155-
_
156-
=> throw new ArgumentOutOfRangeException(
157-
nameof(commandParameterAbstractType),
158-
commandParameterAbstractType,
159-
"This value is not supported!"
160-
),
155+
_ => throw new ArgumentOutOfRangeException(
156+
nameof(commandParameterAbstractType),
157+
commandParameterAbstractType,
158+
"This value is not supported!"
159+
),
161160
};
162161
}
163162

src/FloppyBot.Chat.Twitch.Tests/TwitchChatInterfaceTests.cs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,16 @@ public class TwitchChatInterfaceTests
2727
private readonly ITwitchChannelOnlineMonitor _onlineMonitor =
2828
A.Fake<ITwitchChannelOnlineMonitor>();
2929

30-
private TwitchConfiguration _configuration =
31-
new(
32-
"atwitchbot",
33-
"sometoken",
34-
"atwitchchannel",
35-
"aclientid",
36-
"anaccesstoken",
37-
false,
38-
0,
39-
false
40-
);
30+
private TwitchConfiguration _configuration = new(
31+
"atwitchbot",
32+
"sometoken",
33+
"atwitchchannel",
34+
"aclientid",
35+
"anaccesstoken",
36+
false,
37+
0,
38+
false
39+
);
4140

4241
[TestMethod]
4342
public void BroadcasterHasAdminRights()
@@ -291,14 +290,14 @@ PrivilegeLevel expectedPrivilegeLevel
291290
{
292291
TwitchChatInterface chatInterface = CreateInterface();
293292

294-
var messages = new List<Entities.ChatMessage>();
293+
var messages = new List<ChatMessage>();
295294
chatInterface.MessageReceived += (_, chatMessage) => messages.Add(chatMessage);
296295

297296
_client.OnMessageReceived += Raise.With(messageReceivedArgs);
298297

299298
Assert.AreEqual(1, messages.Count);
300299
Assert.AreEqual(
301-
new Entities.ChatMessage(
300+
new ChatMessage(
302301
messages[0].Identifier,
303302
new ChatUser(
304303
new ChannelIdentifier(

src/FloppyBot.Chat.Twitch/Extensions/TwitchEntityExtensions.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ private static TwitchSubscriptionPlanTier ConvertToInternalEnum(this Subscriptio
3838
SubscriptionPlan.Tier1 => TwitchSubscriptionPlanTier.Tier1,
3939
SubscriptionPlan.Tier2 => TwitchSubscriptionPlanTier.Tier2,
4040
SubscriptionPlan.Tier3 => TwitchSubscriptionPlanTier.Tier3,
41-
_
42-
=> throw new ArgumentOutOfRangeException(
43-
nameof(plan),
44-
plan,
45-
"Subscription plan is not convertible"
46-
),
41+
_ => throw new ArgumentOutOfRangeException(
42+
nameof(plan),
43+
plan,
44+
"Subscription plan is not convertible"
45+
),
4746
};
4847
}
4948

src/FloppyBot.Commands.Aux.Currency/BackgroundServices/ChannelCurrencyMaintainer.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ private static TwitchEvent ParseTwitchEvent(ChatMessage chatMessage)
6161
{
6262
return chatMessage.EventName switch
6363
{
64-
TwitchEventTypes.USER_JOINED
65-
=> JsonSerializer.Deserialize<TwitchUserJoinedEvent>(chatMessage.Content)!,
66-
TwitchEventTypes.USER_LEFT
67-
=> JsonSerializer.Deserialize<TwitchUserLeftEvent>(chatMessage.Content)!,
68-
_ => throw new InvalidOperationException($"Unknown event type {chatMessage.EventName}")
64+
TwitchEventTypes.USER_JOINED => JsonSerializer.Deserialize<TwitchUserJoinedEvent>(
65+
chatMessage.Content
66+
)!,
67+
TwitchEventTypes.USER_LEFT => JsonSerializer.Deserialize<TwitchUserLeftEvent>(
68+
chatMessage.Content
69+
)!,
70+
_ => throw new InvalidOperationException($"Unknown event type {chatMessage.EventName}"),
6971
};
7072
}
7173

src/FloppyBot.Commands.Aux.Currency/Storage/Entities/ChannelCurrencyRecord.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ public ChannelCurrencySettings WithId(string newId)
4545
public record ChannelUserState(string Id, UserState State, DateTimeOffset LastStateChange)
4646
: IEntity<ChannelUserState>
4747
{
48-
private static readonly ChannelUserState Default =
49-
new(null!, UserState.Offline, DateTimeOffset.MaxValue);
48+
private static readonly ChannelUserState Default = new(
49+
null!,
50+
UserState.Offline,
51+
DateTimeOffset.MaxValue
52+
);
5053

5154
public static ChannelUserState ForUserInChannel(string userId, string channelId)
5255
{

src/FloppyBot.Commands.Aux.Timer/TimeExpressionParser.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ namespace FloppyBot.Commands.Aux.Timer;
55
public static class TimeExpressionParser
66
{
77
// 12d23h45m12s
8-
private static readonly Regex TimeParsingRegex =
9-
new("^((\\d?\\d)d)?((\\d?\\d)h)?(([0-5]?\\d)m)?(([0-5]?\\d)s)?$", RegexOptions.Compiled);
8+
private static readonly Regex TimeParsingRegex = new(
9+
"^((\\d?\\d)d)?((\\d?\\d)h)?(([0-5]?\\d)m)?(([0-5]?\\d)s)?$",
10+
RegexOptions.Compiled
11+
);
1012

1113
public static TimeSpan? ParseTimeExpression(string expression)
1214
{

0 commit comments

Comments
 (0)