Skip to content

Commit

Permalink
chore: update nuget packages (#911)
Browse files Browse the repository at this point in the history
* chore: update nuget packages

* pr-fix: remove guard.net package and references from project templates
  • Loading branch information
stijnmoreels authored Sep 20, 2024
1 parent 40371de commit 5a3e60a
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Sinks.ApplicationInsights" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Security.AzureFunctions" Version="2.0.0" />
<PackageReference Include="Arcus.Security.Providers.AzureKeyVault" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.EventHubs" Version="6.3.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.23.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.EventHubs" Version="6.3.6" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.4" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Serilog" Version="4.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog" Version="4.0.1" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Arcus.Messaging.Abstractions.EventHubs;
using Arcus.Messaging.Abstractions.EventHubs.MessageHandling;
using Arcus.Templates.AzureFunctions.EventHubs.Model;
using GuardNet;
using Microsoft.Extensions.Logging;

namespace Arcus.Templates.AzureFunctions.EventHubs
Expand All @@ -24,7 +23,7 @@ public class SensorReadingAzureEventHubsMessageHandler : IAzureEventHubsMessageH
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> is <c>null</c>.</exception>
public SensorReadingAzureEventHubsMessageHandler(ILogger<SensorReadingAzureEventHubsMessageHandler> logger)
{
Guard.NotNull(logger, nameof(logger), "Requires an logger instance to write informational messages during the sensor reading processing");
ArgumentNullException.ThrowIfNull(logger);
_logger = logger;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Arcus.Messaging.Abstractions.EventHubs;
using Arcus.Messaging.Abstractions.EventHubs.MessageHandling;
using Azure.Messaging.EventHubs;
using GuardNet;
using Microsoft.ApplicationInsights;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -25,7 +24,7 @@ public class SensorReadingFunction
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="messageRouter"/> is <c>null</c>.</exception>
public SensorReadingFunction(IAzureEventHubsMessageRouter messageRouter)
{
Guard.NotNull(messageRouter, nameof(messageRouter), "Requires a message router instance to route incoming Azure EventHubs events through the sensor-reading processing");
ArgumentNullException.ThrowIfNull(messageRouter);
_messageRouter = messageRouter;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<PackageReference Include="Arcus.Security.Providers.AzureKeyVault" Version="2.0.0" />
<PackageReference Include="Arcus.WebApi.Hosting.AzureFunctions" Version="2.0.0" />
<PackageReference Include="Arcus.WebApi.Logging.AzureFunctions" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.23.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.OpenApi" Version="1.5.1" Condition="'$(OpenApi)' == 'true'" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.4" />
Expand Down
5 changes: 2 additions & 3 deletions src/Arcus.Templates.AzureFunctions.Http/HealthFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading.Tasks;
using Arcus.Templates.AzureFunctions.Http.Model;
using Azure.Core.Serialization;
using GuardNet;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
#if OpenApi
Expand Down Expand Up @@ -34,8 +33,8 @@ public class HealthFunction
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="healthCheckService"/> or the <paramref name="jsonSerializer"/> is <c>null</c>.</exception>
public HealthFunction(HealthCheckService healthCheckService, JsonObjectSerializer jsonSerializer)
{
Guard.NotNull(healthCheckService, nameof(healthCheckService), "Requires a health check service to check the current health of the running Azure Function");
Guard.NotNull(jsonSerializer, nameof(jsonSerializer), "Requires a JSON serializer to write JSON contents to the HTTP response");
ArgumentNullException.ThrowIfNull(healthCheckService);
ArgumentNullException.ThrowIfNull(jsonSerializer);

_healthCheckService = healthCheckService;
_jsonSerializer = jsonSerializer;
Expand Down
3 changes: 1 addition & 2 deletions src/Arcus.Templates.AzureFunctions.Http/OrderFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Net;
using System.Threading.Tasks;
using Arcus.Security.Core;
using GuardNet;
using Microsoft.Extensions.Logging;
using Arcus.Templates.AzureFunctions.Http.Model;
using Microsoft.Azure.Functions.Worker;
Expand All @@ -29,7 +28,7 @@ public class OrderFunction
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="secretProvider"/> is <c>null</c>.</exception>
public OrderFunction(ISecretProvider secretProvider)
{
Guard.NotNull(secretProvider, nameof(secretProvider), "Requires a secret provider instance");
ArgumentNullException.ThrowIfNull(secretProvider);
_secretProvider = secretProvider;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Sinks.ApplicationInsights" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Security.AzureFunctions" Version="2.0.0" />
<PackageReference Include="Arcus.Security.Providers.AzureKeyVault" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.20.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.23.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.4" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Serilog" Version="4.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog" Version="4.0.1" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Arcus.Messaging.Abstractions.ServiceBus.MessageHandling;
using Arcus.Templates.AzureFunctions.ServiceBus.Queue.Model;
using Azure.Messaging.ServiceBus;
using GuardNet;
using System.Text.Json;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Logging;
Expand All @@ -29,7 +28,7 @@ public class OrderFunction
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="messageRouter"/> is <c>null</c>.</exception>
public OrderFunction(IAzureServiceBusMessageRouter messageRouter)
{
Guard.NotNull(messageRouter, nameof(messageRouter), "Requires a message router instance to route the incoming Azure Service Bus topic message through the order processing");
ArgumentNullException.ThrowIfNull(messageRouter);

_messageRouter = messageRouter;
_jobId = Guid.NewGuid().ToString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Arcus.Messaging.Abstractions.ServiceBus;
using Arcus.Messaging.Abstractions.ServiceBus.MessageHandling;
using Arcus.Templates.AzureFunctions.ServiceBus.Queue.Model;
using GuardNet;
using Microsoft.Extensions.Logging;

namespace Arcus.Templates.AzureFunctions.ServiceBus.Queue
Expand All @@ -24,7 +23,7 @@ public class OrdersAzureServiceBusMessageHandler : IAzureServiceBusMessageHandle
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> is <c>null</c>.</exception>
public OrdersAzureServiceBusMessageHandler(ILogger<OrdersAzureServiceBusMessageHandler> logger)
{
Guard.NotNull(logger, nameof(logger), "Requires an logger instance to write informational messages during the order processing");
ArgumentNullException.ThrowIfNull(logger);
_logger = logger;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Sinks.ApplicationInsights" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Security.AzureFunctions" Version="2.0.0" />
<PackageReference Include="Arcus.Security.Providers.AzureKeyVault" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.20.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.23.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.4" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Serilog" Version="4.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog" Version="4.0.1" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Arcus.Messaging.Abstractions.ServiceBus.MessageHandling;
using Arcus.Templates.AzureFunctions.ServiceBus.Topic.Model;
using Azure.Messaging.ServiceBus;
using GuardNet;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Logging;

Expand All @@ -29,8 +28,8 @@ public class OrderFunction
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="messageRouter"/> is <c>null</c>.</exception>
public OrderFunction(IAzureServiceBusMessageRouter messageRouter)
{
Guard.NotNull(messageRouter, nameof(messageRouter), "Requires a message router instance to route the incoming Azure Service Bus topic message through the order processing");
ArgumentNullException.ThrowIfNull(messageRouter);

_messageRouter = messageRouter;
_jobId = Guid.NewGuid().ToString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Arcus.Messaging.Abstractions.ServiceBus;
using Arcus.Messaging.Abstractions.ServiceBus.MessageHandling;
using Arcus.Templates.AzureFunctions.ServiceBus.Topic.Model;
using GuardNet;
using Microsoft.Extensions.Logging;

namespace Arcus.Templates.AzureFunctions.ServiceBus.Topic
Expand All @@ -24,7 +23,7 @@ public class OrdersAzureServiceBusMessageHandler : IAzureServiceBusMessageHandle
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> is <c>null</c>.</exception>
public OrdersAzureServiceBusMessageHandler(ILogger<OrdersAzureServiceBusMessageHandler> logger)
{
Guard.NotNull(logger, nameof(logger), "Requires an logger instance to write informational messages during the order processing");
ArgumentNullException.ThrowIfNull(logger);
_logger = logger;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Filters" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Sinks.ApplicationInsights" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Security.Providers.AzureKeyVault" Version="2.0.0" />
<PackageReference Include="Guard.NET" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog" Version="4.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog" Version="4.0.1" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Arcus.Messaging.Abstractions.EventHubs;
using Arcus.Messaging.Abstractions.EventHubs.MessageHandling;
using Arcus.Templates.EventHubs.Model;
using GuardNet;
using Microsoft.Extensions.Logging;

namespace Arcus.Templates.EventHubs
Expand All @@ -24,7 +23,7 @@ public class SensorReadingAzureEventHubsMessageHandler : IAzureEventHubsMessageH
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> is <c>null</c>.</exception>
public SensorReadingAzureEventHubsMessageHandler(ILogger<SensorReadingAzureEventHubsMessageHandler> logger)
{
Guard.NotNull(logger, nameof(logger), "Requires an logger instance to write informational messages during the sensor reading processing");
ArgumentNullException.ThrowIfNull(logger);
_logger = logger;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Filters" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Sinks.ApplicationInsights" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Security.Providers.AzureKeyVault" Version="2.0.0" />
<PackageReference Include="Guard.NET" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog" Version="4.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog" Version="4.0.1" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Filters" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Sinks.ApplicationInsights" Version="3.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Arcus.Security.Providers.AzureKeyVault" Version="2.0.0" />
<PackageReference Include="Guard.NET" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog" Version="4.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog" Version="4.0.1" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" Condition="'$(Serilog_AppInsights)' == 'true'" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
<PackageReference Include="Arcus.Messaging.Pumps.ServiceBus" Version="2.0.0" />
<PackageReference Include="Arcus.Messaging.Pumps.EventHubs" Version="2.0.0" />
<PackageReference Include="Arcus.Testing.Core" Version="1.0.3" />
<PackageReference Include="Bogus" Version="35.5.1" />
<PackageReference Include="Bogus" Version="35.6.1" />
<PackageReference Include="BouncyCastle.NetCoreSdk" Version="1.9.7" />
<PackageReference Include="Flurl.Http" Version="4.0.2" />
<PackageReference Include="Microsoft.Azure.ApplicationInsights.Query" Version="1.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.6.15" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.6.21" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
5 changes: 2 additions & 3 deletions src/Arcus.Templates.WebApi/Arcus.Templates.WebApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@
<PackageReference Include="Arcus.WebApi.Hosting" Version="2.0.0" />
<PackageReference Include="Arcus.WebApi.Logging" Version="2.0.0" />
<PackageReference Include="Arcus.WebApi.Security" Version="2.0.0" Condition="'$(Auth)' == 'true'" />
<PackageReference Include="Guard.NET" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" Condition="'$(JwtAuth)' == 'true'" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" Condition="'$(OpenApi)' == 'true'" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" Condition="'$(Serilog_AppInsights)' == 'true'" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" Condition="'$(OpenApi)' == 'true'" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" Condition="'$(OpenApi)' == 'true' and '$(Correlation)' == 'true'" />
</ItemGroup>

Expand Down
8 changes: 3 additions & 5 deletions src/Arcus.Templates.WebApi/Controllers/HealthController.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Arcus.Templates.WebApi.Models;
using Arcus.WebApi.Logging;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using GuardNet;
#if OpenApi
using Arcus.Templates.WebApi.ExampleProviders;
using Swashbuckle.AspNetCore.Filters;
Expand All @@ -27,9 +27,7 @@ public class HealthController : ControllerBase
/// <param name="healthCheckService">The service to provide the health of the API application.</param>
public HealthController(HealthCheckService healthCheckService)
{
Guard.NotNull(healthCheckService, nameof(healthCheckService));

_healthCheckService = healthCheckService;
_healthCheckService = healthCheckService ?? throw new ArgumentNullException(nameof(healthCheckService));
}

/// <summary>
Expand Down
Loading

0 comments on commit 5a3e60a

Please sign in to comment.