Skip to content

Commit fad2e76

Browse files
Merge pull request #197 from ExplicITConsulting/master
Reduce size and complexity, enhance cross-platform compatibility, update yamldotnet, update test platforms
2 parents e54508c + 0b4871d commit fad2e76

File tree

15 files changed

+148
-12235
lines changed

15 files changed

+148
-12235
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [windows-2019, windows-2022]
22+
os: [windows-latest]
2323

2424
steps:
2525
- uses: actions/checkout@v3
@@ -40,7 +40,7 @@ jobs:
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-2019, windows-2022]
43+
os: [macos-latest, ubuntu-latest, windows-latest]
4444

4545
steps:
4646
- uses: actions/checkout@v3

Tests/powershell-yaml.Tests.ps1

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,31 +1065,27 @@ reallyLongDecimal: 3.9999999999999990
10651065

10661066
Describe 'StringQuotingEmitter' {
10671067
BeforeAll {
1068-
$oldYamlPkgUrl = 'https://www.nuget.org/api/v2/package/YamlDotNet/11.2.1'
1069-
$pkgPath = Join-Path -Path $TestDrive -ChildPath 'YamlDotNet-11.2.1.nupkg'
1070-
$oldYamlPkgDirPath = Join-Path -Path $TestDrive -ChildPath 'YamlDotNet-11.2.1'
1068+
$oldYamlPkgUrl = 'https://www.nuget.org/api/v2/package/YamlDotNet/16.3.0'
1069+
$pkgPath = Join-Path -Path $TestDrive -ChildPath 'YamlDotNet-16.3.0.nupkg'
1070+
$oldYamlPkgDirPath = Join-Path -Path $TestDrive -ChildPath 'YamlDotNet-16.3.0'
10711071
$ProgressPreference = 'SilentlyContinue'
10721072
Invoke-WebRequest -Uri $oldYamlPkgUrl -UseBasicParsing -OutFile $pkgPath
10731073
New-Item -Path $oldYamlPkgDirPath -ItemType Directory
10741074
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'
10751075
[IO.Compression.ZipFile]::ExtractToDirectory($pkgPath, $oldYamlPkgDirPath)
10761076
}
10771077

1078-
$targetFrameworks = @('net45', 'netstandard1.3')
1079-
if ($PSVersionTable['PSEdition'] -eq 'Core')
1080-
{
1081-
$targetFrameworks = @('netstandard1.3', 'netstandard2.1')
1082-
}
1078+
$targetFrameworks = @('netstandard2.0')
10831079

10841080
It 'can be compiled on import with <_>/YamlDotNet.dll loaded' -ForEach $targetFrameworks {
10851081
$targetFramework = $_
10861082
$yamlDotnetAssemblyPath =
1087-
Join-Path -Path $TestDrive -ChildPath "YamlDotNet-11.2.1\lib\${targetFramework}\YamlDotNet.dll" -Resolve
1083+
Join-Path -Path $TestDrive -ChildPath "YamlDotNet-16.3.0\lib\${targetFramework}\YamlDotNet.dll" -Resolve
10881084
$modulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\powershell-yaml.psd1' -Resolve
10891085

10901086
{
10911087
# Do this in the background because YamlDotNet.dll is already loaded in this session and the way we
1092-
# found to reproduce this issue is by loading YamlDotNet 11.2.1 then importing powershell-yaml.
1088+
# found to reproduce this issue is by loading YamlDotNet 16.3.0 then importing powershell-yaml.
10931089
Start-Job {
10941090
$yamlDotnetAssemblyPath = $using:yamlDotnetAssemblyPath
10951091
$modulePath = $using:modulePath

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $here = Split-Path -Parent $MyInvocation.MyCommand.Path
1717

1818
dotnet build --configuration Release $here/src/
1919

20-
$destinations = @("netstandard2.1", "net47")
20+
$destinations = @("netstandard2.0")
2121

2222
foreach ($item in $destinations) {
2323
$src = Join-Path $here "src" "bin" "Release" $item "PowerShellYamlSerializer.dll"
-11 KB
Binary file not shown.

lib/net47/YamlDotNet.dll

-282 KB
Binary file not shown.

0 commit comments

Comments
 (0)