From 34f7ea6456bb4d954dc7b4f1d118b37fe52535a0 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Tue, 11 Aug 2026 21:05:42 -0400 Subject: [PATCH 1/7] Mark ScottPlot 5.1.59 support as completed in Todo.md --- Todo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Todo.md b/Todo.md index eef8804..98fbe79 100644 --- a/Todo.md +++ b/Todo.md @@ -1 +1 @@ -- [] Add support for ScottPlot 5.1.59 +- [Done] Add support for ScottPlot 5.1.59 From bb28a5e6209259af58c1f084df5c8f262e5fb165 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Tue, 27 Oct 2026 16:58:16 -0400 Subject: [PATCH 2/7] Add SkiaSharp.NativeAssets.macOS package reference --- Sources/AsBuiltReportChart.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/AsBuiltReportChart.csproj b/Sources/AsBuiltReportChart.csproj index ada18d0..ad445c1 100644 --- a/Sources/AsBuiltReportChart.csproj +++ b/Sources/AsBuiltReportChart.csproj @@ -12,6 +12,7 @@ + From ec72d7f90172dacde883732c83159c259877b447 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Wed, 11 Nov 2026 12:30:12 -0400 Subject: [PATCH 3/7] Update module version to 0.3.5 and enhance workflows with latest action versions --- .github/workflows/Pester.yml | 6 +----- .github/workflows/Release.yml | 2 +- .github/workflows/Stale.yml | 2 +- AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 | 2 +- CHANGELOG.md | 13 +++++++++++++ Sources/AsBuiltReportChart.csproj | 2 +- Tests/Invoke-Tests.ps1 | 4 ++-- 7 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index b392b58..52d5504 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -39,7 +39,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v7 - name: Setup .NET - uses: actions/setup-dotnet@v5 + uses: actions/setup-dotnet@v6 with: dotnet-version: "8.0.x" - name: Restore dependencies @@ -75,10 +75,6 @@ jobs: run: | Set-PSRepository -Name PSGallery -InstallationPolicy Trusted - - name: Install Pester - run: | - Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - - name: Run Pester Tests run: | $CodeCoverageParam = @{} diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 64d7daf..f7448cc 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v7 - name: Setup .NET - uses: actions/setup-dotnet@v5 + uses: actions/setup-dotnet@v6 with: dotnet-version: "8.0.x" - name: Restore dependencies diff --git a/.github/workflows/Stale.yml b/.github/workflows/Stale.yml index be3ca59..54dac57 100644 --- a/.github/workflows/Stale.yml +++ b/.github/workflows/Stale.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v9 + - uses: actions/stale@v11 with: stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions." days-before-stale: 60 diff --git a/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 b/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 index af8b0b7..0d300dc 100644 --- a/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 +++ b/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 @@ -12,7 +12,7 @@ RootModule = 'AsBuiltReport.Chart.psm1' # Version number of this module. - ModuleVersion = '0.3.4' + ModuleVersion = '0.3.5' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c2f3df..f420ff9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.5] - Unreleased + +### Added + +- Add SkiaSharp.NativeAssets.macOS dependency to the module to support macOS platform + +### Changed + +- Update module v0.3.5 +- Update Pester workflow to use the latest version of the Pester module +- Update workflows to use the latest action version + + ## [0.3.4] - 2026-06-25 ### Changed diff --git a/Sources/AsBuiltReportChart.csproj b/Sources/AsBuiltReportChart.csproj index ad445c1..77d5f89 100644 --- a/Sources/AsBuiltReportChart.csproj +++ b/Sources/AsBuiltReportChart.csproj @@ -3,7 +3,7 @@ netstandard2.0 - 0.3.4 + 0.3.5 diff --git a/Tests/Invoke-Tests.ps1 b/Tests/Invoke-Tests.ps1 index 7996873..5e60577 100644 --- a/Tests/Invoke-Tests.ps1 +++ b/Tests/Invoke-Tests.ps1 @@ -57,7 +57,7 @@ if ($PSVersion.Major -lt 7) { Write-Host "`nInstalling required modules..." -ForegroundColor Yellow $RequiredModules = @( - @{ Name = 'Pester'; MinimumVersion = '5.0.0' } + @{ Name = 'Pester'; MinimumVersion = '6.2.0' } ) foreach ($Module in $RequiredModules) { @@ -75,7 +75,7 @@ foreach ($Module in $RequiredModules) { } # Import Pester -Import-Module Pester -MinimumVersion 5.0.0 -Force +Import-Module Pester -MinimumVersion 6.2.0 -Force # Configure Pester $PesterConfiguration = New-PesterConfiguration From 169954d48ebcbc1e71d3bcdc9cbe1c58c62fa953 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Wed, 11 Nov 2026 13:10:37 -0400 Subject: [PATCH 4/7] Add support for macOS intel in the Pester workflow to test the module on macOS intel platform --- .github/workflows/Pester.yml | 14 +++++++++++--- CHANGELOG.md | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 52d5504..8eeb675 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest, macos-latest, macos-26-intel] shell: [pwsh] include: - os: windows-latest @@ -30,6 +30,8 @@ jobs: shell: powershell - os: macos-latest shell: powershell + - os: macos-26-intel + shell: powershell defaults: run: @@ -44,12 +46,18 @@ jobs: dotnet-version: "8.0.x" - name: Restore dependencies run: dotnet restore ./Sources - - name: Build the library for MacOS + - name: Build the library for MacOS ARM64 run: dotnet publish ./Sources -c Release -r osx-arm64 if: matrix.os == 'macos-latest' - - name: Copy the library for MacOS + - name: Copy the library for MacOS ARM64 run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-arm64 -Recurse if: matrix.os == 'macos-latest' + - name: Build the library for MacOS Intel + run: dotnet publish ./Sources -c Release -r osx-x64 + if: matrix.os == 'macos-26-intel' + - name: Copy the library for MacOS Intel + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/osx-x64/publish/* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-x64 -Recurse + if: matrix.os == 'macos-26-intel' - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 if: matrix.os == 'ubuntu-latest' diff --git a/CHANGELOG.md b/CHANGELOG.md index f420ff9..a4788f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add SkiaSharp.NativeAssets.macOS dependency to the module to support macOS platform +- Add support for macOS intel in the Pester workflow to test the module on macOS intel platform ### Changed From 8beefccbaf67a7ee315d5f9649f05b03e921e303 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Wed, 11 Nov 2026 13:15:10 -0400 Subject: [PATCH 5/7] Remove unnecessary blank line in CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4788f9..2a61706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update Pester workflow to use the latest version of the Pester module - Update workflows to use the latest action version - ## [0.3.4] - 2026-06-25 ### Changed From 3f185594035ac391b57c7fe6183ede73099a7658 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Wed, 11 Nov 2026 13:22:39 -0400 Subject: [PATCH 6/7] Refactor Pester workflow triggers to simplify branch specifications --- .github/workflows/Pester.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 8eeb675..cc90004 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -2,15 +2,9 @@ name: Pester Tests on: push: - branches: - - main - - dev - - master + branches: ["dev", "main"] pull_request: - branches: - - main - - dev - - master + branches: ["dev"] workflow_dispatch: jobs: From ac9b58ecb8eb855cf59e6a52f7d94040b3f54102 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Wed, 11 Nov 2026 13:46:33 -0400 Subject: [PATCH 7/7] Enhance Get-ChartAssemblyPath function for better architecture handling and add test for missing OutputFolderPath in New-PieChart --- AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 | 69 ++++++++++++------- CHANGELOG.md | 2 + Sources/Chart.cs | 3 +- Tests/AsBuiltReport.Chart.Functions.Tests.ps1 | 4 ++ 4 files changed, 53 insertions(+), 25 deletions(-) diff --git a/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 b/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 index 1aa45ab..a8b62e2 100644 --- a/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 +++ b/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 @@ -1,30 +1,51 @@ -# Get assemblies files and import them -switch ($PSVersionTable.PSEdition) { - 'Core' { - if ($IsMacOS) { - $architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture - if ($architecture -eq "Arm64" -or $architecture -eq "Arm") { - Write-Verbose "Architecture: ARM (Apple Silicon)" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) +function Get-ChartAssemblyPath { + $separator = [System.IO.Path]::DirectorySeparatorChar + $assemblyRoot = "$PSScriptRoot{0}Src{0}Assemblies" -f $separator - } elseif ($architecture -eq "X64" -or $architecture -eq "X86") { - Write-Verbose "Architecture: x86 (Intel)" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + switch ($PSVersionTable.PSEdition) { + 'Core' { + if ($IsMacOS) { + $architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture - } else { - Write-Verbose "Architecture: Unknown or other architecture" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + if ($architecture -in @('Arm64', 'Arm')) { + Write-Verbose 'Architecture: ARM (Apple Silicon)' + $path = "$assemblyRoot{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f $separator + } + elseif ($architecture -in @('X64', 'X86')) { + Write-Verbose 'Architecture: x86 (Intel)' + $path = "$assemblyRoot{0}Core{0}mac-osx{0}osx-x64{0}AsBuiltReportChart.dll" -f $separator + } + else { + throw "Unsupported macOS architecture '$architecture'. Supported architectures: Arm64, X64, X86." + } + } + elseif ($IsLinux) { + Write-Verbose 'Architecture: Linux x64' + $path = "$assemblyRoot{0}Core{0}linux-x64{0}AsBuiltReportChart.dll" -f $separator + } + elseif ($IsWindows) { + Write-Verbose 'Architecture: Windows x64' + $path = "$assemblyRoot{0}Core{0}windows-x64{0}AsBuiltReportChart.dll" -f $separator + } + else { + throw 'Unable to determine a supported platform for the Core PowerShell edition.' } - } elseif ($IsLinux) { - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}linux-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) - } elseif ($IsWindows) { - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}windows-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + } + 'Desktop' { + Write-Verbose 'Architecture: Windows x64 (PowerShell 5.1)' + $path = "$assemblyRoot{0}Desktop{0}windows-x64{0}AsBuiltReportChart.dll" -f $separator + } + default { + throw "Unsupported PowerShell edition '$($PSVersionTable.PSEdition)'. Supported editions: Core, Desktop." } } - 'Desktop' { - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Desktop{0}windows-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) - } - default { - Write-Verbose -Message 'Unable to find compatible assemblies.' + + if (-not (Test-Path -LiteralPath $path)) { + throw "Unable to locate the AsBuiltReportChart assembly for this environment: $path" } -} \ No newline at end of file + + return $path +} + +$assemblyPath = Get-ChartAssemblyPath +Import-Module -Name $assemblyPath -Force \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a61706..c77acd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add SkiaSharp.NativeAssets.macOS dependency to the module to support macOS platform - Add support for macOS intel in the Pester workflow to test the module on macOS intel platform +- Add Pester test for missing OutputFolderPath in New-PieChart ### Changed - Update module v0.3.5 - Update Pester workflow to use the latest version of the Pester module - Update workflows to use the latest action version +- Enhance Get-ChartAssemblyPath function for better architecture handling ## [0.3.4] - 2026-06-25 diff --git a/Sources/Chart.cs b/Sources/Chart.cs index 318caa5..01e7b15 100644 --- a/Sources/Chart.cs +++ b/Sources/Chart.cs @@ -445,7 +445,7 @@ internal static void Reset() LabelBold = false; LabelYAxis = "Count"; LabelXAxis = "Values"; - _labelDistance = 0.6; + LabelDistance = 0.6; AreaOrientation = Orientations.Vertical; _areaExplodeFraction = 0; EnableLegend = false; @@ -482,6 +482,7 @@ internal static void Reset() WatermarkColor = BasicColors.Gray; _watermarkOpacity = 0.3; DonutFraction = 0.5; + DonutCenterText = null; HideValues = false; SpokesLength = 10; } diff --git a/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 b/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 index 3264829..f77bdc1 100644 --- a/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 +++ b/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 @@ -45,6 +45,10 @@ Describe 'AsBuiltReport.Chart Exported Functions' { It 'Should throw error for mismatched Values and Labels' { { New-PieChart -Title 'Test' -Values @(1, 2) -Labels @('A') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." } + It 'Should throw when OutputFolderPath does not exist' { + $missingPath = Join-Path -Path $TestDrive -ChildPath 'missing-folder' + { New-PieChart -Title 'Test' -Values @(1, 2) -Labels @('A', 'B') -Format 'png' -OutputFolderPath $missingPath } | Should -Throw + } } Context 'New-DonutChart' {