Skip to content

Commit efea469

Browse files
authored
Merge pull request #19 from adrianiftode/fixes/vulnerable-dependencies
Update packages with security vulenrabilities
2 parents 521ab10 + 3173712 commit efea469

File tree

5 files changed

+58
-48
lines changed

5 files changed

+58
-48
lines changed

appveyor.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
version: 1.1.{build}
2-
image: Visual Studio 2019
1+
version: 1.2.{build}
2+
image: Visual Studio 2022
33
branches:
44
only:
55
- master
6+
- /\d+\.\d+\.\d+/
67
pull_requests:
7-
do_not_increment_build_number: true
8+
do_not_increment_build_number: false
9+
skip_branch_with_pr: true
810
configuration: Release
911
shallow_clone: true
1012

@@ -18,6 +20,23 @@ skip_commits:
1820

1921
init:
2022
- cmd: dotnet --version
23+
- ps: |
24+
if ($env:APPVEYOR_REPO_TAG -eq "true")
25+
{
26+
try
27+
{
28+
Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME"
29+
}
30+
catch
31+
{
32+
Write-Output "Update-AppveyorBuild Fail to change version to TAG: '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Red
33+
Write-Output "Exception Error: $PSItem.Exception.Message" -ForegroundColor Red
34+
Write-Output "Exception Error: $PSItem.Exception.GetType().Name" -ForegroundColor Red
35+
}
36+
}
37+
- ps: |
38+
Write-Host "APPVEYOR_BUILD_VERSION='$env:APPVEYOR_BUILD_VERSION'" -ForegroundColor Yellow
39+
Write-Host "APPVEYOR_REPO_TAG_NAME= '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Yellow
2140
- ps: 'if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { & dotnet tool install -g dotnet-sonarscanner }'
2241
- cmd: dotnet tool install -g minicover
2342

@@ -36,22 +55,22 @@ nuget:
3655
before_build:
3756
- dotnet restore
3857
build_script:
39-
# Ensure Java 11, required by Sonar
40-
- set JAVA_HOME=C:\Program Files\Java\jdk11
58+
# Ensure Java 15, required by Sonar
59+
- set JAVA_HOME=C:\Program Files\Java\jdk19
60+
- if not exist "%JAVA_HOME%\bin\java.exe" (echo "%JAVA_HOME%\bin\java.exe does not exist" && exit 1)
4161
- set PATH=%JAVA_HOME%\bin;%PATH%
42-
# Begin SonarScanner
43-
- ps: 'if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { & dotnet sonarscanner begin /k:"Moq.ILogger" /o:adrianiftode-github /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$env:SONAR_TOKEN" /v:"$env:APPVEYOR_BUILD_NUMBER" /d:sonar.cs.opencover.reportsPaths="opencovercoverage.xml" /d:sonar.coverage.exclusions=test/**}'
44-
- dotnet build
62+
- ps: 'if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { & dotnet sonarscanner begin /k:"adrianiftode_FluentAssertions.Web" /o:adrianiftode-github /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$env:SONAR_TOKEN" /v:"$env:APPVEYOR_BUILD_NUMBER" /d:sonar.cs.opencover.reportsPaths="opencovercoverage.xml" /d:sonar.coverage.exclusions=test/**}'
63+
- dotnet build -c %CONFIGURATION% /p:Version=%APPVEYOR_BUILD_VERSION%
4564
- minicover instrument
4665
test_script:
47-
- dotnet test --no-restore --no-build
66+
- dotnet test --no-restore --no-build --nologo --verbosity:q
4867
after_test:
4968
- minicover uninstrument
5069
- minicover opencoverreport
5170
# will fail when the test coverage is lower than the threshold
5271
- minicover report --threshold 90
5372
- ps: 'if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { & dotnet sonarscanner end /d:sonar.login="$env:SONAR_TOKEN" }'
54-
- dotnet pack --no-restore --include-symbols -c %CONFIGURATION%
73+
- dotnet pack --no-build --include-symbols -c %CONFIGURATION% /p:PackageVersion=%APPVEYOR_BUILD_VERSION%
5574

5675
artifacts:
5776
- path: '**\*.nupkg'
@@ -60,8 +79,16 @@ artifacts:
6079
deploy:
6180
- provider: NuGet
6281
api_key:
63-
secure: O+eAN9xt6vbmeNTfpqoQ5c64xbzUCXrZXhJU6/3Vw9BvSn747F9PH5tFtuxEqLTA
82+
secure: DbQndcBhytd1c9OjkuTZDytpWBemxjl0eskUAhXO6y4L0TdjH2H6SubzOnWCH7bD
6483
skip_symbols: true
6584
artifact: /.*\.nupkg/
66-
on:
67-
branch: master
85+
on:
86+
appveyor_repo_tag: true
87+
88+
- provider: GitHub
89+
release: $(APPVEYOR_BUILD_VERSION)
90+
auth_token:
91+
secure: WXU/Xj3ntIZVx89KDAa/V9FszL7l3pOFpFdWVEsKggcn7bGviwOOpm9RSxZ7q+biREJXWL+1hYhcXQltmQDbaX7ga5jNMGyFFWpIWSDpb8x+1Aeg10fZX1SEWQ0t6VUr
92+
artifact: /.*\.nupkg/
93+
on:
94+
appveyor_repo_tag: true

src/Moq.ILogger/Moq.ILogger.csproj

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,18 @@
1212
<Authors>Adrian Iftode</Authors>
1313
<PackageDescription>Enables the Moq's Verify API over the *ILogger* extensions (LogInformation, LogError, etc).</PackageDescription>
1414
<PackageTags>Moq;ILogger;ILoggerExtensions;unit;unittest;logging</PackageTags>
15-
<VersionPrefix>1.1.0</VersionPrefix>
15+
<VersionPrefix>1.2.0</VersionPrefix>
1616
<PackageProjectUrl>https://github.com/adrianiftode/Moq.ILogger</PackageProjectUrl>
1717
<RepositoryUrl>https://github.com/adrianiftode/Moq.ILogger</RepositoryUrl>
1818
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1919
<GenerateDocumentationFile>True</GenerateDocumentationFile>
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="Moq" Version="4.13.0" />
23+
<PackageReference Include="Moq" Version="4.18.0" />
2424
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions">
2525
<Version>2.0.0</Version>
2626
</PackageReference>
2727
</ItemGroup>
2828

29-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
30-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
31-
</ItemGroup>
32-
33-
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
34-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
35-
</ItemGroup>
36-
37-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
38-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0" />
39-
</ItemGroup>
40-
4129
</Project>

tests/Moq.ILogger.Tests/Moq.ILogger.Tests.csproj

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net461;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net461;net9.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<LangVersion>Latest</LangVersion>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="FluentAssertions" Version="5.10.3" />
11-
<PackageReference Include="Moq" Version="4.13.0" />
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
13-
<PackageReference Include="xunit" Version="2.4.1" />
10+
<PackageReference Include="FluentAssertions" Version="7.2.0" />
11+
<PackageReference Include="Moq" Version="4.18.0" />
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
13+
<PackageReference Include="xunit" Version="2.9.3" />
14+
15+
</ItemGroup>
16+
17+
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
1418
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
1519
<PrivateAssets>all</PrivateAssets>
1620
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1721
</PackageReference>
1822
</ItemGroup>
1923

24+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
25+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
26+
<PrivateAssets>all</PrivateAssets>
27+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
28+
</PackageReference>
29+
</ItemGroup>
30+
2031
<ItemGroup>
2132
<ProjectReference Include="..\..\src\Moq.ILogger\Moq.ILogger.csproj" />
2233
</ItemGroup>

tests/Moq.ILogger.Tests/VerifyLogExceptionTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,5 @@ public void Ctor_WhenInnerException_DoesNotThrow()
3030

3131
act.Should().NotThrow();
3232
}
33-
34-
[Fact]
35-
public void Exception_ShouldBeBinarySerializable()
36-
{
37-
var sut = new VerifyLogException("Some message", new Exception());
38-
39-
sut.Should().BeBinarySerializable();
40-
}
4133
}
4234
}

tests/Moq.ILogger.Tests/VerifyLogUnexpectedExceptionTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,5 @@ public void Ctor_WhenInnerException_DoesNotThrow()
3030

3131
act.Should().NotThrow();
3232
}
33-
34-
[Fact]
35-
public void Exception_ShouldBeBinarySerializable()
36-
{
37-
var sut = new VerifyLogUnexpectedException("Some message", new Exception());
38-
39-
sut.Should().BeBinarySerializable();
40-
}
4133
}
4234
}

0 commit comments

Comments
 (0)