Skip to content

Commit

Permalink
v4.4.2 (#78)
Browse files Browse the repository at this point in the history
* v4.4.2
- *Fixed*: Updated all package depenedencies to latest; resolve [Microsoft Security Advisory CVE-2024-43485](GHSA-8g4q-xg66-9fp4).

* Fix log.
  • Loading branch information
chullybun authored Oct 10, 2024
1 parent c302260 commit e48f8d9
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Represents the **NuGet** versions.

## v4.4.2
- *Fixed*: Updated `System.Text.Json` package depenedency to latest; resolve [Microsoft Security Advisory CVE-2024-43485](https://github.com/advisories/GHSA-8g4q-xg66-9fp4).

## v4.4.1
- *Fixed:* Updated all package depenedencies to latest.

Expand Down
9 changes: 5 additions & 4 deletions Common.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>4.4.1</Version>
<Version>4.4.2</Version>
<LangVersion>preview</LangVersion>
<Authors>Avanade</Authors>
<Company>Avanade</Company>
Expand All @@ -20,14 +20,15 @@
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<Nullable>enable</Nullable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSymbols>true</IncludeSymbols>
<EmbedAllSources>true</EmbedAllSources>
<IsPackable>true</IsPackable>
<IsPackable>true</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<IsTestProject>false</IsTestProject>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\images\Logo256x256.png" Link="Logo256x256.png">
Expand Down
8 changes: 4 additions & 4 deletions src/UnitTestEx/Functions/FunctionTesterBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private IHost GetHost()
.ConfigureHostConfiguration(cb =>
{
cb.SetBasePath(Environment.CurrentDirectory)
.AddInMemoryCollection(new KeyValuePair<string, string?>[] { new("AzureWebJobsConfigurationSection", "AzureFunctionsJobHost") })
.AddInMemoryCollection([new("AzureWebJobsConfigurationSection", "AzureFunctionsJobHost")])
.AddJsonFile(GetLocalSettingsJson(), optional: true)
.AddJsonFile("appsettings.json", optional: true)
.AddJsonFile($"appsettings.{TestSetUp.Environment.ToLowerInvariant()}.json", optional: true);
Expand All @@ -162,14 +162,14 @@ private IHost GetHost()
if ((!_includeUserSecrets.HasValue && TestSetUp.FunctionTesterIncludeUserSecrets) || (_includeUserSecrets.HasValue && _includeUserSecrets.Value))
cb.AddUserSecrets<TEntryPoint>();
cb.AddEnvironmentVariables();
if ((!_includeUnitTestConfiguration.HasValue && TestSetUp.FunctionTesterIncludeUnitTestConfiguration) || (_includeUnitTestConfiguration.HasValue && _includeUnitTestConfiguration.Value))
cb.AddJsonFile("appsettings.unittest.json", optional: true);
if (_additionalConfiguration != null)
cb.AddInMemoryCollection(_additionalConfiguration);
cb.AddEnvironmentVariables();
})
.ConfigureServices(sc =>
{
Expand Down
6 changes: 3 additions & 3 deletions src/UnitTestEx/UnitTestEx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.32" />
<PackageReference Include="System.Memory.Data" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="6.0.9" />
<PackageReference Include="System.Text.Json" Version="6.0.10" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.20" />
<PackageReference Include="System.Memory.Data" Version="7.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.7" />
<PackageReference Include="System.Memory.Data" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<Import Project="..\..\Common.targets" />
Expand Down
1 change: 0 additions & 1 deletion tests/UnitTestEx.Function/ProductFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Net;
Expand Down
1 change: 1 addition & 0 deletions tests/UnitTestEx.Function/UnitTestEx.Function.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<UserSecretsId>fff1f13f-b465-40c0-bf17-1f705f473c9e</UserSecretsId>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
Expand Down
2 changes: 1 addition & 1 deletion tests/UnitTestEx.IsolatedFunction/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

var startup = new Startup();
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults()
.ConfigureFunctionsWebApplication()
.ConfigureServices((hbc, sc) => startup.ConfigureServices(sc))
.Build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.2" />
<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.Http.AspNetCore" Version="1.3.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.20.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.3.2" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.3.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.4" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.18.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions tests/UnitTestEx.MSTest.Test/UnitTestEx.MSTest.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<PreserveCompilationContext>true</PreserveCompilationContext>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/UnitTestEx.NUnit.Test/ServiceBusFunctionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void Configuration()
public void Configuration_Overrride()
{
// Demonstrates how to override the configuration settings for a test.
using var test = FunctionTester.Create<Startup>(additionalConfiguration: new Dictionary<string, string>(new KeyValuePair<string, string>[] { new("SpecialKey", "NotSoSpecial") }));
using var test = FunctionTester.Create<Startup>(additionalConfiguration: [new("SpecialKey", "NotSoSpecial")]);
var cv = test.Configuration.GetValue<string>("SpecialKey");
Assert.That(cv, Is.EqualTo("NotSoSpecial"));
}
Expand Down
1 change: 1 addition & 0 deletions tests/UnitTestEx.NUnit.Test/UnitTestEx.NUnit.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>preview</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit e48f8d9

Please sign in to comment.