From e952c041ae62d0942a23c87de073834eb3f24686 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 1 Jun 2025 23:20:40 +0200 Subject: [PATCH 01/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Remove=20initia?= =?UTF-8?q?lization=20step=20and=20dependency=20on=20`Utilities`=20from=20?= =?UTF-8?q?workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Action-Test.yml | 9 --------- scripts/main.ps1 | 2 -- 2 files changed, 11 deletions(-) diff --git a/.github/workflows/Action-Test.yml b/.github/workflows/Action-Test.yml index a334e86..9b42610 100644 --- a/.github/workflows/Action-Test.yml +++ b/.github/workflows/Action-Test.yml @@ -25,9 +25,6 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Initialize environment - uses: PSModule/Initialize-PSModule@v1 - - name: Action-Test uses: ./ with: @@ -42,9 +39,6 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Initialize environment - uses: PSModule/Initialize-PSModule@v1 - - name: Action-Test uses: ./ with: @@ -59,9 +53,6 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Initialize environment - uses: PSModule/Initialize-PSModule@v1 - - name: Action-Test uses: ./ with: diff --git a/scripts/main.ps1 b/scripts/main.ps1 index c760ab9..af18b66 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -5,8 +5,6 @@ [CmdletBinding()] param() -#Requires -Modules Utilities - $path = (Join-Path -Path $PSScriptRoot -ChildPath 'helpers') | Get-Item | Resolve-Path -Relative LogGroup "Loading helper scripts from [$path]" { Get-ChildItem -Path $path -Filter '*.ps1' -Recurse | Resolve-Path -Relative | ForEach-Object { From f27da9006db1c4a2617fdbe8ba328edcec9de8ed Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 1 Jun 2025 23:24:17 +0200 Subject: [PATCH 02/11] Remove reliance on Utilities --- scripts/helpers/Build-PSModule.ps1 | 2 -- scripts/helpers/Build/Build-PSModuleManifest.ps1 | 2 -- scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 | 1 - scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 | 1 - .../helpers/Build/Update-PSModuleManifestAliasesToExport.ps1 | 2 -- 5 files changed, 8 deletions(-) diff --git a/scripts/helpers/Build-PSModule.ps1 b/scripts/helpers/Build-PSModule.ps1 index ea85459..29a4d8e 100644 --- a/scripts/helpers/Build-PSModule.ps1 +++ b/scripts/helpers/Build-PSModule.ps1 @@ -8,8 +8,6 @@ #> [OutputType([void])] [CmdletBinding()] - #Requires -Modules @{ ModuleName = 'GitHub'; ModuleVersion = '0.13.2' } - #Requires -Modules @{ ModuleName = 'Utilities'; ModuleVersion = '0.3.0' } [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSReviewUnusedParameter', '', Scope = 'Function', Justification = 'LogGroup - Scoping affects the variables line of sight.' diff --git a/scripts/helpers/Build/Build-PSModuleManifest.ps1 b/scripts/helpers/Build/Build-PSModuleManifest.ps1 index 6226019..0143207 100644 --- a/scripts/helpers/Build/Build-PSModuleManifest.ps1 +++ b/scripts/helpers/Build/Build-PSModuleManifest.ps1 @@ -11,8 +11,6 @@ Build-PSModuleManifest -SourceFolderPath 'C:\MyModule\src\MyModule' -OutputFolderPath 'C:\MyModule\build\MyModule' #> [CmdletBinding()] - #Requires -Modules @{ ModuleName = 'GitHub'; ModuleVersion = '0.13.2' } - #Requires -Modules @{ ModuleName = 'Utilities'; ModuleVersion = '0.3.0' } [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSAvoidLongLines', '', Scope = 'Function', Justification = 'Easier to read the multi ternery operators in a single line.' diff --git a/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 b/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 index 5c8a990..6ad9a8f 100644 --- a/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 @@ -10,7 +10,6 @@ Get-PSModuleAliasesToExport -SourceFolderPath 'C:\MyModule\src\MyModule' #> [CmdletBinding()] - #Requires -Modules @{ ModuleName = 'Utilities'; ModuleVersion = '0.3.0' } [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.' diff --git a/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 b/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 index 2e07f8c..68f8554 100644 --- a/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 @@ -10,7 +10,6 @@ Get-PSModuleCmdletsToExport -SourceFolderPath 'C:\MyModule\src\MyModule' #> [CmdletBinding()] - #Requires -Modules @{ ModuleName = 'Utilities'; ModuleVersion = '0.3.0' } [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.' diff --git a/scripts/helpers/Build/Update-PSModuleManifestAliasesToExport.ps1 b/scripts/helpers/Build/Update-PSModuleManifestAliasesToExport.ps1 index 887b73c..65608df 100644 --- a/scripts/helpers/Build/Update-PSModuleManifestAliasesToExport.ps1 +++ b/scripts/helpers/Build/Update-PSModuleManifestAliasesToExport.ps1 @@ -15,8 +15,6 @@ 'PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.' )] - #Requires -Modules @{ ModuleName = 'GitHub'; ModuleVersion = '0.13.2' } - #Requires -Modules @{ ModuleName = 'Utilities'; ModuleVersion = '0.3.0' } [CmdletBinding()] param( # Name of the module. From a63d515a7c75228b6bcc6756c7b469cb5b7d3c57 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 1 Jun 2025 23:29:39 +0200 Subject: [PATCH 03/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20Instal?= =?UTF-8?q?l-PSModuleHelpers=20action=20to=20use=20removeInit=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 62ee028..115bdf2 100644 --- a/action.yml +++ b/action.yml @@ -37,7 +37,7 @@ runs: using: composite steps: - name: Install-PSModuleHelpers - uses: PSModule/Install-PSModuleHelpers@v1 + uses: PSModule/Install-PSModuleHelpers@removeInit - name: Run Build-PSModule uses: PSModule/GitHub-Script@v1 From 791356dc967210db7a24338036f8a3f12f42c178 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 1 Jun 2025 23:40:38 +0200 Subject: [PATCH 04/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Refactor=20auth?= =?UTF-8?q?or=20and=20company=20name=20assignment=20logic=20in=20module=20?= =?UTF-8?q?manifest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/helpers/Build/Build-PSModuleManifest.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/helpers/Build/Build-PSModuleManifest.ps1 b/scripts/helpers/Build/Build-PSModuleManifest.ps1 index 0143207..e3ae0f2 100644 --- a/scripts/helpers/Build/Build-PSModuleManifest.ps1 +++ b/scripts/helpers/Build/Build-PSModuleManifest.ps1 @@ -58,10 +58,10 @@ $manifest.ModuleVersion = '999.0.0' Write-Host "[ModuleVersion] - [$($manifest.ModuleVersion)]" - $manifest.Author = $manifest.Keys -contains 'Author' ? ($manifest.Author | IsNotNullOrEmpty) ? $manifest.Author : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER + $manifest.Author = $manifest.Keys -contains 'Author' ? (-not [string]::IsNullOrEmpty($manifest.Author)) ? $manifest.Author : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER Write-Host "[Author] - [$($manifest.Author)]" - $manifest.CompanyName = $manifest.Keys -contains 'CompanyName' ? ($manifest.CompanyName | IsNotNullOrEmpty) ? $manifest.CompanyName : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER + $manifest.CompanyName = $manifest.Keys -contains 'CompanyName' ? (-not [string]::IsNullOrEmpty($manifest.CompanyName)) ? $manifest.CompanyName : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER Write-Host "[CompanyName] - [$($manifest.CompanyName)]" $year = Get-Date -Format 'yyyy' @@ -71,7 +71,7 @@ Write-Host "[Copyright] - [$($manifest.Copyright)]" $repoDescription = gh repo view --json description | ConvertFrom-Json | Select-Object -ExpandProperty description - $manifest.Description = $manifest.Keys -contains 'Description' ? ($manifest.Description | IsNotNullOrEmpty) ? $manifest.Description : $repoDescription : $repoDescription + $manifest.Description = $manifest.Keys -contains 'Description' ? (-not [string]::IsNullOrEmpty($manifest.Description)) ? $manifest.Description : $repoDescription : $repoDescription Write-Host "[Description] - [$($manifest.Description)]" $manifest.PowerShellHostName = $manifest.Keys -contains 'PowerShellHostName' ? -not [string]::IsNullOrEmpty($manifest.PowerShellHostName) ? $manifest.PowerShellHostName : $null : $null From 98d85d891819a128dea2b2e9853f256f72362961 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 1 Jun 2025 23:50:04 +0200 Subject: [PATCH 05/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Fix=20usage=20o?= =?UTF-8?q?f=20IsNullOrEmpty=20method=20in=20Get-PSModuleAliasesToExport?= =?UTF-8?q?=20and=20Get-PSModuleCmdletsToExport=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 | 2 +- scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 b/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 index 6ad9a8f..ef2e2ce 100644 --- a/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 @@ -29,7 +29,7 @@ $manifest = Get-ModuleManifest -Path $manifestFilePath -Verbose:$false Write-Host "[$manifestPropertyName]" - $aliasesToExport = (($manifest.AliasesToExport).count -eq 0) -or ($manifest.AliasesToExport | IsNullOrEmpty) ? '*' : $manifest.AliasesToExport + $aliasesToExport = (($manifest.AliasesToExport).count -eq 0) -or [string]::IsNullOrEmpty($manifest.AliasesToExport) ? '*' : $manifest.AliasesToExport $aliasesToExport | ForEach-Object { Write-Host "[$manifestPropertyName] - [$_]" } diff --git a/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 b/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 index 68f8554..bcd0679 100644 --- a/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 @@ -29,7 +29,7 @@ $manifest = Get-ModuleManifest -Path $manifestFilePath -Verbose:$false Write-Host "[$manifestPropertyName]" - $cmdletsToExport = (($manifest.CmdletsToExport).count -eq 0) -or ($manifest.CmdletsToExport | IsNullOrEmpty) ? '' : $manifest.CmdletsToExport + $cmdletsToExport = (($manifest.CmdletsToExport).count -eq 0) -or [string]::IsNullOrEmpty($manifest.CmdletsToExport) ? '' : $manifest.CmdletsToExport $cmdletsToExport | ForEach-Object { Write-Host "[$manifestPropertyName] - [$_]" } From 957b1edab467af7f6d30712acf7b7e922b272b23 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 1 Jun 2025 23:57:38 +0200 Subject: [PATCH 06/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Remove=20unnece?= =?UTF-8?q?ssary=20module=20requirements=20from=20Build-PSModuleBase=20and?= =?UTF-8?q?=20Build-PSModuleRootModule=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/helpers/Build/Build-PSModuleBase.ps1 | 1 - scripts/helpers/Build/Build-PSModuleRootModule.ps1 | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/helpers/Build/Build-PSModuleBase.ps1 b/scripts/helpers/Build/Build-PSModuleBase.ps1 index a0b2c3d..4a0b903 100644 --- a/scripts/helpers/Build/Build-PSModuleBase.ps1 +++ b/scripts/helpers/Build/Build-PSModuleBase.ps1 @@ -11,7 +11,6 @@ Build-PSModuleBase -SourceFolderPath 'C:\MyModule\src\MyModule' -OutputFolderPath 'C:\MyModule\build\MyModule' #> [CmdletBinding()] - #Requires -Modules @{ ModuleName = 'GitHub'; ModuleVersion = '0.13.2' } [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSReviewUnusedParameter', '', Scope = 'Function', Justification = 'LogGroup - Scoping affects the variables line of sight.' diff --git a/scripts/helpers/Build/Build-PSModuleRootModule.ps1 b/scripts/helpers/Build/Build-PSModuleRootModule.ps1 index adef93a..b3b9ff1 100644 --- a/scripts/helpers/Build/Build-PSModuleRootModule.ps1 +++ b/scripts/helpers/Build/Build-PSModuleRootModule.ps1 @@ -1,7 +1,4 @@ -#Requires -Modules @{ ModuleName = 'GitHub'; ModuleVersion = '0.13.2' } -#Requires -Modules @{ ModuleName = 'Hashtable'; ModuleVersion = '1.1.1' } - -function Build-PSModuleRootModule { +function Build-PSModuleRootModule { <# .SYNOPSIS Compiles the module root module files. From 792280922228c226cbe9917bbb5a7ac6a16403e4 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 2 Jun 2025 00:36:30 +0200 Subject: [PATCH 07/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Improve=20code?= =?UTF-8?q?=20readability=20by=20formatting=20SuppressMessage=20attributes?= =?UTF-8?q?=20in=20Get-PSModuleAliasesToExport=20and=20Get-PSModuleClasses?= =?UTF-8?q?ToExport=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 | 4 ++++ scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 b/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 index ef2e2ce..91db2f1 100644 --- a/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 @@ -14,6 +14,10 @@ 'PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.' )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSAvoidLongLines', '', Scope = 'Function', + Justification = 'Contains long links.' + )] param( # Path to the folder where the module source code is located. [Parameter(Mandatory)] diff --git a/scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 b/scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 index b01219a..ee3c3b3 100644 --- a/scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 @@ -17,7 +17,10 @@ .NOTES Inspired by [about_Classes | Exporting classes with type accelerators](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_classes?view=powershell-7.4#exporting-classes-with-type-accelerators) #> - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidLongLines', '', Justification = 'Contains long links.')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSAvoidLongLines', '', Scope = 'Function', + Justification = 'Contains long links.' + )] [CmdletBinding()] param ( # The path to the module root folder. From 520f1815b917ff661e43c925c6aa591f9e1c986d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 2 Jun 2025 00:39:47 +0200 Subject: [PATCH 08/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Add=20SuppressM?= =?UTF-8?q?essage=20attribute=20for=20long=20lines=20in=20Get-PSModuleCmdl?= =?UTF-8?q?etsToExport=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 b/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 index bcd0679..7f10825 100644 --- a/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 @@ -14,6 +14,10 @@ 'PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.' )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSAvoidLongLines', '', Scope = 'Function', + Justification = 'Contains long links.' + )] param( # Path to the folder where the module source code is located. [Parameter(Mandatory)] From 5f029da47f31d89d0ce82744155993df2f099b7d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 2 Jun 2025 00:44:04 +0200 Subject: [PATCH 09/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Refactor=20Supp?= =?UTF-8?q?ressMessage=20attributes=20for=20consistency=20and=20readabilit?= =?UTF-8?q?y=20in=20module=20export=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 | 10 ++-------- scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 | 5 +---- scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 | 10 ++-------- .../helpers/Build/Get-PSModuleFunctionsToExport.ps1 | 6 ++---- 4 files changed, 7 insertions(+), 24 deletions(-) diff --git a/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 b/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 index 91db2f1..adc21d1 100644 --- a/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1 @@ -10,14 +10,8 @@ Get-PSModuleAliasesToExport -SourceFolderPath 'C:\MyModule\src\MyModule' #> [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSAvoidUsingWriteHost', '', Scope = 'Function', - Justification = 'Want to just write to the console, not the pipeline.' - )] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSAvoidLongLines', '', Scope = 'Function', - Justification = 'Contains long links.' - )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidLongLines', '', Scope = 'Function', Justification = 'Contains long links.')] param( # Path to the folder where the module source code is located. [Parameter(Mandatory)] diff --git a/scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 b/scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 index ee3c3b3..4b541f6 100644 --- a/scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleClassesToExport.ps1 @@ -17,10 +17,7 @@ .NOTES Inspired by [about_Classes | Exporting classes with type accelerators](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_classes?view=powershell-7.4#exporting-classes-with-type-accelerators) #> - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSAvoidLongLines', '', Scope = 'Function', - Justification = 'Contains long links.' - )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidLongLines', '', Scope = 'Function', Justification = 'Contains long links.')] [CmdletBinding()] param ( # The path to the module root folder. diff --git a/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 b/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 index 7f10825..1ac20e6 100644 --- a/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1 @@ -10,14 +10,8 @@ Get-PSModuleCmdletsToExport -SourceFolderPath 'C:\MyModule\src\MyModule' #> [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSAvoidUsingWriteHost', '', Scope = 'Function', - Justification = 'Want to just write to the console, not the pipeline.' - )] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSAvoidLongLines', '', Scope = 'Function', - Justification = 'Contains long links.' - )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidLongLines', '', Scope = 'Function', Justification = 'Contains long links.')] param( # Path to the folder where the module source code is located. [Parameter(Mandatory)] diff --git a/scripts/helpers/Build/Get-PSModuleFunctionsToExport.ps1 b/scripts/helpers/Build/Get-PSModuleFunctionsToExport.ps1 index 03671c8..3d64494 100644 --- a/scripts/helpers/Build/Get-PSModuleFunctionsToExport.ps1 +++ b/scripts/helpers/Build/Get-PSModuleFunctionsToExport.ps1 @@ -10,10 +10,8 @@ Get-PSModuleFunctionsToExport -SourceFolderPath 'C:\MyModule\src\MyModule' #> [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSAvoidUsingWriteHost', '', Scope = 'Function', - Justification = 'Want to just write to the console, not the pipeline.' - )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidLongLines', '', Scope = 'Function', Justification = 'Contains long links.')] [OutputType([array])] param( # Path to the folder where the module source code is located. From 205e233e5283c2e42fbd4d488ad7b29f2a2e2c4b Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 2 Jun 2025 00:48:03 +0200 Subject: [PATCH 10/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Simplify=20igno?= =?UTF-8?q?re=20patterns=20in=20jscpd=20configuration=20by=20excluding=20a?= =?UTF-8?q?ll=20scripts=20in=20helpers=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/linters/.jscpd.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json index 7cc00e6..f734bf1 100644 --- a/.github/linters/.jscpd.json +++ b/.github/linters/.jscpd.json @@ -6,9 +6,7 @@ "ignore": [ "**/tests/**", "**/.github/workflows/Action-Test.yml", - "**/scripts/helpers/Build/Build-PSModuleManifest.ps1", - "**/scripts/helpers/Build/Build-PSModuleRootModule.ps1", - "**/scripts/helpers/Build/PSScriptAnalyzer.Tests.psd1" + "**/scripts/helpers/**" ], "absolute": true } From 7249f064592b15e14113c5142d424a5f507de12e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 2 Jun 2025 01:28:29 +0200 Subject: [PATCH 11/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20Instal?= =?UTF-8?q?l-PSModuleHelpers=20action=20to=20use=20version=20v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 115bdf2..62ee028 100644 --- a/action.yml +++ b/action.yml @@ -37,7 +37,7 @@ runs: using: composite steps: - name: Install-PSModuleHelpers - uses: PSModule/Install-PSModuleHelpers@removeInit + uses: PSModule/Install-PSModuleHelpers@v1 - name: Run Build-PSModule uses: PSModule/GitHub-Script@v1