Skip to content

Commit

Permalink
Update SDK and nuget packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihlus committed Nov 20, 2023
1 parent 073a313 commit d539773
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 37 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Build
run: |
Expand Down
38 changes: 19 additions & 19 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@
<PackageVersion Include="CommunityToolkit.HighPerformance" Version="8.2.2" />
<PackageVersion Include="FuzzySharp" Version="2.0.2" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="7.0.14" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="7.0.14" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.0" />
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="NGettext" Version="0.6.7" />
<PackageVersion Include="OneOf" Version="3.0.263" />
<PackageVersion Include="Polly" Version="7.2.4" />
<PackageVersion Include="Polly" Version="8.2.0" />
<PackageVersion Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
<PackageVersion Include="Remora.Commands" Version="10.0.4" />
<PackageVersion Include="Remora.Extensions.Options.Immutable" Version="1.0.6" />
<PackageVersion Include="Remora.Rest" Version="3.3.1" />
<PackageVersion Include="Remora.Rest.Core" Version="2.2.0" />
<PackageVersion Include="Remora.Rest.Xunit" Version="3.0.1" />
<PackageVersion Include="Remora.Results" Version="7.4.0" />
<PackageVersion Include="Remora.Results.Analyzers" Version="1.0.1" PrivateAssets="all" />
<PackageVersion Include="Remora.Commands" Version="10.0.5" />
<PackageVersion Include="Remora.Extensions.Options.Immutable" Version="1.0.8" />
<PackageVersion Include="Remora.Rest" Version="3.3.2" />
<PackageVersion Include="Remora.Rest.Core" Version="2.2.1" />
<PackageVersion Include="Remora.Rest.Xunit" Version="3.0.3" />
<PackageVersion Include="Remora.Results" Version="7.4.1" />
<PackageVersion Include="Remora.Results.Analyzers" Version="1.0.2" PrivateAssets="all" />
<PackageVersion Include="RichardSzalay.MockHttp" Version="7.0.0" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Text.Json" Version="7.0.4" />
<PackageVersion Include="System.Threading.Channels" Version="7.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.0" />
<PackageVersion Include="System.Threading.Channels" Version="8.0.0" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Remora.Discord.Commands/Parsers/EmojiParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private static bool TryParseEmoji(string input, [NotNullWhen(true)] out IEmoji?
return false;
}

emoji = new Emoji(emojiID, inputParts[^2], IsAnimated: inputParts is["a", _, _]);
emoji = new Emoji(emojiID, inputParts[^2], IsAnimated: inputParts is ["a", _, _]);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void CanUnpackUserCommand()
command.UnpackInteraction(out var commandPath, out var parameters);

Assert.Equal(new[] { "user" }, commandPath);
Assert.Equal(1, parameters.Count);
Assert.Single(parameters);
Assert.True(parameters.ContainsKey("user"));
Assert.Equal("1", parameters["user"][0]);
}
Expand All @@ -289,7 +289,7 @@ public void CanUnpackMessageCommand()
command.UnpackInteraction(out var commandPath, out var parameters);

Assert.Equal(new[] { "message" }, commandPath);
Assert.Equal(1, parameters.Count);
Assert.Single(parameters);
Assert.True(parameters.ContainsKey("message"));
Assert.Equal("1", parameters["message"][0]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public MockedTransportSequenceBuilder ExpectConnection(Uri? connectionUri = null
if (connectionUri != u)
{
throw new EqualException(connectionUri, u);
throw EqualException.ForMismatchedValues(connectionUri, u);
}
return EventMatch.Pass;
Expand Down Expand Up @@ -106,7 +106,7 @@ public MockedTransportSequenceBuilder Expect<TExpected>(Func<TExpected?, bool>?
? p.GetType().GetGenericArguments()[0].Name
: p.GetType().Name;
throw new IsTypeException(typeof(TExpected).Name, actualTypename);
throw IsTypeException.ForMismatchedType(typeof(TExpected).Name, actualTypename);
}
if (expectation is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public async Task<Result> ConnectAsync(Uri endpoint, CancellationToken ct = defa
}
case EventMatch.Fail:
{
throw new TrueException("An event in a sequence failed.", null);
throw TrueException.ForNonTrueValue("An event in a sequence failed.", null);
}
case EventMatch.Ignore:
{
Expand Down Expand Up @@ -148,7 +148,7 @@ public async Task<Result> ConnectAsync(Uri endpoint, CancellationToken ct = defa
}
case EventMatch.Fail:
{
throw new TrueException("An event in a continuous sequence failed.", null);
throw TrueException.ForNonTrueValue("An event in a continuous sequence failed.", null);
}
case EventMatch.Ignore:
{
Expand All @@ -165,7 +165,7 @@ public async Task<Result> ConnectAsync(Uri endpoint, CancellationToken ct = defa
var remainingSequences = _sequences.Except(_finishedSequences).ToList();
if (remainingSequences.Count == 0)
{
_finisher.Cancel();
await _finisher.CancelAsync();
}

if (!sequenceAdvanced)
Expand Down Expand Up @@ -215,7 +215,7 @@ public async ValueTask<Result> SendPayloadAsync(IPayload payload, CancellationTo
}
case EventMatch.Fail:
{
throw new TrueException("An event in a sequence failed.", null);
throw TrueException.ForNonTrueValue("An event in a sequence failed.", null);
}
case EventMatch.Ignore:
{
Expand Down Expand Up @@ -255,7 +255,7 @@ public async ValueTask<Result> SendPayloadAsync(IPayload payload, CancellationTo
}
case EventMatch.Fail:
{
throw new TrueException("An event in a continuous sequence failed.", null);
throw TrueException.ForNonTrueValue("An event in a continuous sequence failed.", null);
}
case EventMatch.Ignore:
{
Expand All @@ -272,13 +272,13 @@ public async ValueTask<Result> SendPayloadAsync(IPayload payload, CancellationTo

if (!hadExpectedEvent && !_serviceOptions.IgnoreUnexpected)
{
throw new IsTypeException("[sequence]", payload.GetType().ToString());
throw IsTypeException.ForMismatchedType("[sequence]", payload.GetType().ToString());
}

var remainingSequences = _sequences.Except(_finishedSequences).ToList();
if (remainingSequences.Count == 0)
{
_finisher.Cancel();
await _finisher.CancelAsync();
}

if (!sequenceAdvanced)
Expand Down Expand Up @@ -362,7 +362,7 @@ public async ValueTask<Result<IPayload>> ReceivePayloadAsync(CancellationToken c
var remainingSequences = _sequences.Except(_finishedSequences).ToList();
if (remainingSequences.Count == 0)
{
_finisher.Cancel();
await _finisher.CancelAsync();
}

if (!sequenceAdvanced)
Expand Down Expand Up @@ -421,7 +421,7 @@ public async Task<Result> DisconnectAsync
}
case EventMatch.Fail:
{
throw new TrueException("An event in a sequence failed.", null);
throw TrueException.ForNonTrueValue("An event in a sequence failed.", null);
}
case EventMatch.Ignore:
{
Expand Down Expand Up @@ -456,7 +456,7 @@ public async Task<Result> DisconnectAsync
}
case EventMatch.Fail:
{
throw new TrueException("An event in a continuous sequence failed.", null);
throw TrueException.ForNonTrueValue("An event in a continuous sequence failed.", null);
}
case EventMatch.Ignore:
{
Expand All @@ -473,7 +473,7 @@ public async Task<Result> DisconnectAsync
var remainingSequences = _sequences.Except(_finishedSequences).ToList();
if (remainingSequences.Count == 0)
{
_finisher.Cancel();
await _finisher.CancelAsync();
}

if (!sequenceAdvanced)
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"msbuild-sdks": {
"Remora.Sdk": "2.1.1",
"Remora.Tests.Sdk": "2.0.5"
"Remora.Sdk": "3.0.1",
"Remora.Tests.Sdk": "3.0.1"
}
}

0 comments on commit d539773

Please sign in to comment.