Quality review: bump Process-PSModule to v6.1.16 - #91
Quality review: bump Process-PSModule to v6.1.16#91Marius Storhaug (MariusStorhaug) wants to merge 15 commits into
Conversation
Bumps the reusable workflow from v5.5.0 to v6.1.16. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
README.md referenced a contribution guide that did not exist. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Updates the checkout action used by the Update-FontsData workflow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replaces exact RequiredVersion pins with ModuleVersion + MaximumVersion and bumps to the latest compatible Fonts and Admin releases. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adds default mocks for Copy-Item and Move-Item so the cache-write path no longer fails with a Pester mock exception after the cache-read throw. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR performs a “quality review” update across the NerdFonts PowerShell module repository, focusing on dependency/workflow bumps and small maintenance fixes (documentation + tests) to keep CI and module behavior aligned with upstream PSModule framework changes.
Changes:
- Bump
PSModule/Process-PSModulereusable workflow fromv5.5.0tov6.1.16and updateactions/checkouttov7.0.1inUpdate-FontsData.yml. - Loosen
#Requires -Modulesconstraints forFontsandAdmininInstall-NerdFont.ps1by switching from fixedRequiredVersionto a version range. - Add
CONTRIBUTING.mdand adjust the cache-fallback Pester test mocks to avoid unintended mock failures on the cache-write path.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/NerdFonts.Tests.ps1 |
Adds default mocks for cache-write path in the cache-fallback test (but mock precedence likely needs adjustment). |
src/functions/public/Install-NerdFont.ps1 |
Updates module dependency requirements to a looser version range for Fonts and Admin. |
CONTRIBUTING.md |
Adds contribution guidelines to match existing README references. |
.github/workflows/Update-FontsData.yml |
Bumps pinned actions/checkout to v7.0.1. |
.github/workflows/Process-PSModule.yml |
Bumps pinned PSModule/Process-PSModule reusable workflow to v6.1.16. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Process-PSModule v6 expects specific secrets rather than broad inherit. This repository only requires the PowerShell Gallery API key. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
MaximumVersion accepts a wildcard-compatible version string, so use the major-version ceiling directly rather than 1.999.999. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Switches dependency MaximumVersion to wildcard style (1.*) matching the Pester #Requires pattern. - Replaces mock-based cache-read failure with a real locked cache file so the fallback path exercises actual Copy-Item behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (2)
tests/NerdFonts.Tests.ps1:283
- These comments describe the issue as the "cache-read filter" no longer matching, but the underlying problem is that the cache-write
Copy-Item/Move-Itemcalls don’t match the filtered mock. Rewording will make the intent clearer for future maintenance.
[System.IO.FileAccess]::Read,
[System.IO.FileShare]::None
CONTRIBUTING.md:12
- The documentation link in this new CONTRIBUTING guide points at
msxorg.github.io/docs/Frameworks/Process-PSModule/, but the repo’s existing Process-PSModule reference points contributors to the GitHub README configuration docs. Using the same canonical link here avoids sending contributors to a potentially stale/incorrect URL.
2. Familiarize yourself with the PSModule framework documentation at
<https://msxorg.github.io/docs/Frameworks/Process-PSModule/>.
Adds a BeforeAll block that builds a dynamic module from the repository source tree so local Pester runs exercise the current code, not an installed gallery version. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Process-PSModule already builds and installs the module before running tests, so the tests should exercise the built/installed module rather than loading source files directly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (2)
tests/NerdFonts.Tests.ps1:32
- The dynamic module loader relies on
Get-ChildItemordering when dot-sourcing files. File enumeration order can vary across platforms/filesystems, which can make the test harness brittle as additional source files are added. Sort the discovered file lists before dot-sourcing to ensure deterministic module initialization.
}
It 'Returns a specific font' {
$font = Get-NerdFont -Name 'Tinos'
Write-Verbose ($font | Out-String) -Verbose
CONTRIBUTING.md:36
Import-Module ./srcwill fail becausesrc/does not contain a module manifest (.psd1) or script module (.psm1). Since the tests now import the source tree dynamically, the development instructions should call Pester directly (and optionally reference the test harness) rather than importing./src.
```powershell
Import-Module ./src
Invoke-Pester
</details>
The PSModule source-code test expects public function help links to use the canonical URL ending in '/'. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Process-PSModule's manifest builder converts MaximumVersion to [System.Version], which does not accept wildcards. Use 1.999.999 as the upper bound until Process-PSModule supports wildcard versions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
CONTRIBUTING.md:35
Import-Module ./srcwill fail for a fresh checkout becausesrc/is not an importable PowerShell module directory here (no.psd1/.psm1undersrc/). Updating this snippet to import the built/installed module will make the instructions actionable for contributors.
Import-Module ./src
Invoke-Pester
Process-PSModule v6 requires a zensical.toml documentation config for site generation. The repository does not have one, so skip the site build step to unblock the v6 workflow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Process-PSModule v6 builds the documentation site with Zensical, which expects a zensical.toml configuration file. This replaces the legacy .github/mkdocs.yml with an equivalent .github/zensical.toml so the site build can run instead of being skipped. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Quote dotted extension keys (pymdownx.details, pymdownx.superfences) to comply with TOML bare-key rules, and remove the redundant search plugin section because Zensical enables search by default. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/PSModule.yml:21
.github/PSModule.ymlnow setsBuild.Site.Skip: true, which disables the site generation step. That appears to conflict with this PR’s stated goal of migrating the documentation site config to.github/zensical.tomlfor v6 site generation and linking to generated docs in the README. If the site should still be generated, this should be removed or set tofalse.
Build:
Site:
Skip: true
tests/NerdFonts.Tests.ps1:283
- This test expects
Copy-Itemto fail due to[System.IO.File]::Open(..., FileShare::None), but on non-Windows runnersCopy-Item/File.Copymay not reliably honor these share-mode locks. That can cause the test to stop exercising the cache-fallback path and become a cache-hit test instead.
$fileLock = [System.IO.File]::Open(
$cachedFile,
[System.IO.FileMode]::Open,
[System.IO.FileAccess]::Read,
[System.IO.FileShare]::None
Summary
Quality review of the repository with dependency, workflow, and test updates.
Changes
Process-PSModulefromv5.5.0tov6.1.16.TEST_*workflow secret inputs with an optionalTestDataobject. This repository does not use test secrets, so no caller changes are required.APIKeyexplicitly instead of usingsecrets: inherit, matching the v6 secret contract.actions/checkoutfromv7.0.0tov7.0.1inUpdate-FontsData.yml.Install-NerdFont.ps1:Fonts:RequiredVersion '1.1.21'→ModuleVersion '1.1.27'withMaximumVersion '1.999.999'.Admin:RequiredVersion '1.1.6'→ModuleVersion '1.1.13'withMaximumVersion '1.999.999'.'1.*'to match the Pester#Requiresstyle, but Process-PSModule's manifest builder currently fails on wildcardMaximumVersionvalues (filed Build-PSModuleManifest fails when #Requires MaximumVersion uses wildcards Process-PSModule#444).[System.IO.Path]::GetTempPath()) instead of$HOME, so leftover folders live where the OS can clean them up. (Includes PR Use system temp directory for temporary font downloads instead of $HOME #69.).github/mkdocs.ymlto.github/zensical.tomlfor Process-PSModule v6 site generation.CONTRIBUTING.mdbecauseREADME.mdlinked to a missing file.README.mdpointing to the generated command reference at psmodule.io/NerdFonts. (Includes PR 📖 [Docs]: README pages now use the standard module landing-page format #85.)Copy-Item/Move-Itemmocks with a real locked cache file, so the fallback path exercises liveCopy-Itembehavior.Get-NerdFontandInstall-NerdFontcomment-based help to end with a trailing slash, matching PSModule source-code test expectations.Validation
Invoke-ScriptAnalyzerpasses forsrc/,tests/, andscripts/.Invoke-Pesterruns against the installed module (Process-PSModule builds and installs the module before running tests in CI).Related