misc: update dependencies

This commit is contained in:
genteure 2023-01-14 23:00:40 +08:00
parent 3f28ce91ce
commit 2d1bd8fed8
16 changed files with 26 additions and 29 deletions

View File

@ -12,7 +12,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Fluid.Core" Version="2.2.15" /> <PackageReference Include="Fluid.Core" Version="2.3.1" />
<PackageReference Include="Flurl" Version="3.0.7" /> <PackageReference Include="Flurl" Version="3.0.7" />
<PackageReference Include="Jint" Version="3.0.0-beta-2045" /> <PackageReference Include="Jint" Version="3.0.0-beta-2045" />
<PackageReference Include="JsonSubTypes" Version="1.9.0" /> <PackageReference Include="JsonSubTypes" Version="1.9.0" />
@ -24,7 +24,7 @@
<PackageReference Include="Polly" Version="7.2.3" /> <PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="Polly.Caching.Memory" Version="3.0.2" /> <PackageReference Include="Polly.Caching.Memory" Version="3.0.2" />
<PackageReference Include="Serilog" Version="2.12.0" /> <PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="StructLinq" Version="0.27.1" /> <PackageReference Include="StructLinq" Version="0.28.1" />
<PackageReference Include="System.IO.Pipelines" Version="6.0.3" /> <PackageReference Include="System.IO.Pipelines" Version="6.0.3" />
</ItemGroup> </ItemGroup>

View File

@ -14,12 +14,12 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Nullable" Version="1.3.0"> <PackageReference Include="Nullable" Version="1.3.1">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Serilog" Version="2.12.0" /> <PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="StructLinq" Version="0.27.1" /> <PackageReference Include="StructLinq" Version="0.28.1" />
<PackageReference Include="System.IO.Pipelines" Version="6.0.3" /> <PackageReference Include="System.IO.Pipelines" Version="6.0.3" />
<PackageReference Include="System.Memory" Version="4.5.5" /> <PackageReference Include="System.Memory" Version="4.5.5" />
</ItemGroup> </ItemGroup>

View File

@ -360,10 +360,10 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Sentry"> <PackageReference Include="Sentry">
<Version>3.23.1</Version> <Version>3.26.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Sentry.Serilog"> <PackageReference Include="Sentry.Serilog">
<Version>3.23.1</Version> <Version>3.26.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Serilog.Enrichers.Process"> <PackageReference Include="Serilog.Enrichers.Process">
<Version>2.0.2</Version> <Version>2.0.2</Version>

View File

@ -10,9 +10,9 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="PublicApiGenerator" Version="10.3.0" /> <PackageReference Include="PublicApiGenerator" Version="10.3.0" />
<PackageReference Include="Spectre.Verify.Extensions" Version="16.3.2" /> <PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" />
<PackageReference Include="Verify.Xunit" Version="17.1.2" /> <PackageReference Include="Verify.Xunit" Version="19.6.0" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>

View File

@ -1,5 +1,4 @@
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("BililiveRecorder.Core.UnitTests")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("BililiveRecorder.Core.UnitTests")]
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
namespace BililiveRecorder.Core.Api namespace BililiveRecorder.Core.Api
{ {
public interface IHttpClientAccessor public interface IHttpClientAccessor

View File

@ -11,7 +11,7 @@ namespace BililiveRecorder.Core.UnitTests
[Fact] [Fact]
public Task HasNoChangesAsync() public Task HasNoChangesAsync()
{ {
var publicApi = typeof(Recorder).Assembly.GeneratePublicApi(); var publicApi = typeof(Recorder).Assembly.GeneratePublicApi(new ApiGeneratorOptions { ExcludeAttributes = new[] { "System.Runtime.Versioning.TargetFrameworkAttribute" } });
return Verifier.Verify(publicApi); return Verifier.Verify(publicApi);
} }
} }

View File

@ -2,6 +2,7 @@ using System.IO;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using DiffEngine; using DiffEngine;
using VerifyTests; using VerifyTests;
using VerifyXunit;
namespace BililiveRecorder.Core.UnitTests namespace BililiveRecorder.Core.UnitTests
{ {
@ -10,7 +11,7 @@ namespace BililiveRecorder.Core.UnitTests
[ModuleInitializer] [ModuleInitializer]
public static void Init() public static void Init()
{ {
VerifierSettings.DerivePathInfo(Expectations.Initialize); Verifier.DerivePathInfo(Expectations.Initialize);
VerifierSettings.IgnoreMembersWithType<Stream>(); VerifierSettings.IgnoreMembersWithType<Stream>();
DiffRunner.Disabled = false; DiffRunner.Disabled = false;
DiffTools.UseOrder(DiffTool.VisualStudioCode, DiffTool.Rider, DiffTool.WinMerge, DiffTool.VisualStudio); DiffTools.UseOrder(DiffTool.VisualStudioCode, DiffTool.Rider, DiffTool.WinMerge, DiffTool.VisualStudio);

View File

@ -11,9 +11,9 @@
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.2.1" /> <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="PublicApiGenerator" Version="10.3.0" /> <PackageReference Include="PublicApiGenerator" Version="10.3.0" />
<PackageReference Include="Spectre.Verify.Extensions" Version="16.3.2" /> <PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" />
<PackageReference Include="Verify.Xunit" Version="17.1.2" /> <PackageReference Include="Verify.Xunit" Version="19.6.0" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>

View File

@ -1,5 +1,4 @@
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")] namespace BililiveRecorder.DependencyInjection
namespace BililiveRecorder.DependencyInjection
{ {
public static class DependencyInjectionExtensions public static class DependencyInjectionExtensions
{ {

View File

@ -29,7 +29,7 @@ namespace BililiveRecorder.Flv.Tests.FlvTests
tags.Add(tag); tags.Add(tag);
} }
await Verifier.Verify(tags.SerializeXml()).UseExtension("xml").UseParameters(path); await Verifier.Verify(tags.SerializeXml(), extension: "xml").UseParameters(path);
} }
} }
} }

View File

@ -34,7 +34,7 @@ namespace BililiveRecorder.Flv.Tests.FlvTests
await writer.WriteTag(tag); await writer.WriteTag(tag);
} }
await Verifier.Verify(msprovider.Stream).UseExtension("flv").UseParameters(path); await Verifier.Verify(msprovider.Stream, extension: "flv").UseParameters(path);
} }
public class MemoryStreamFlvTargetProvider : IFlvWriterTargetProvider public class MemoryStreamFlvTargetProvider : IFlvWriterTargetProvider
@ -47,10 +47,7 @@ namespace BililiveRecorder.Flv.Tests.FlvTests
public (Stream stream, object? state) CreateOutputStream() public (Stream stream, object? state) CreateOutputStream()
{ {
if (!this.flag) this.flag = !this.flag ? true : throw new System.InvalidOperationException();
this.flag = true;
else
throw new System.InvalidOperationException();
return (this.Stream, null); return (this.Stream, null);
} }

View File

@ -11,7 +11,7 @@ namespace BililiveRecorder.Flv.Tests
[Fact] [Fact]
public Task HasNoChangesAsync() public Task HasNoChangesAsync()
{ {
var publicApi = typeof(Tag).Assembly.GeneratePublicApi(); var publicApi = typeof(Tag).Assembly.GeneratePublicApi(new ApiGeneratorOptions { ExcludeAttributes = new[] { "System.Runtime.Versioning.TargetFrameworkAttribute" } });
return Verifier.Verify(publicApi); return Verifier.Verify(publicApi);
} }
} }

View File

@ -24,7 +24,7 @@ namespace BililiveRecorder.Flv.Tests.RuleTests
Assert.Equal(expectEndTag, rule.EndTagDetected); Assert.Equal(expectEndTag, rule.EndTagDetected);
} }
private static IEnumerable<object[]> EndTagTestData() public static IEnumerable<object[]> EndTagTestData()
{ {
yield return new object[] { true, new PipelineEndAction(new Tag()) }; yield return new object[] { true, new PipelineEndAction(new Tag()) };
yield return new object[] { false, new PipelineScriptAction(new Tag()) }; yield return new object[] { false, new PipelineScriptAction(new Tag()) };

View File

@ -46,7 +46,7 @@ namespace BililiveRecorder.Flv.Tests.RuleTests
await AssertTagsByRerunPipeline(outputTags).ConfigureAwait(false); await AssertTagsByRerunPipeline(outputTags).ConfigureAwait(false);
var xmlStr = outputTags.SerializeXml(); var xmlStr = outputTags.SerializeXml();
await Verifier.Verify(xmlStr).UseExtension("xml").UseParameters(path); await Verifier.Verify(xmlStr, extension: "xml").UseParameters(path);
} }
[Theory()] [Theory()]
@ -90,7 +90,7 @@ namespace BililiveRecorder.Flv.Tests.RuleTests
await AssertTagsByRerunPipeline(outputTags).ConfigureAwait(false); await AssertTagsByRerunPipeline(outputTags).ConfigureAwait(false);
var xmlStr = outputTags.SerializeXml(); var xmlStr = outputTags.SerializeXml();
await Verifier.Verify(xmlStr).UseExtension("xml").UseParameters(path); await Verifier.Verify(xmlStr, extension: "xml").UseParameters(path);
} }
} }
} }

View File

@ -4,6 +4,7 @@ using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using DiffEngine; using DiffEngine;
using VerifyTests; using VerifyTests;
using VerifyXunit;
namespace BililiveRecorder.Flv.Tests namespace BililiveRecorder.Flv.Tests
{ {
@ -12,7 +13,7 @@ namespace BililiveRecorder.Flv.Tests
[ModuleInitializer] [ModuleInitializer]
public static void Init() public static void Init()
{ {
VerifierSettings.DerivePathInfo((string sourceFile, string projectDirectory, Type type, MethodInfo method) => Verifier.DerivePathInfo((string sourceFile, string projectDirectory, Type type, MethodInfo method) =>
{ {
if (type != typeof(PublicApi) && type != typeof(TestData)) if (type != typeof(PublicApi) && type != typeof(TestData))
projectDirectory = Path.Combine(projectDirectory, "..", "data", "flv"); projectDirectory = Path.Combine(projectDirectory, "..", "data", "flv");

@ -1 +1 @@
Subproject commit 1f8f6ad831115320d01d8954221532207e355707 Subproject commit 28aa6c68ae6abf3242e42db703ef1676ecbb22fd