Skip to content

Quality review: bump Process-PSModule to v6.1.16 - #91

Draft
Marius Storhaug (MariusStorhaug) wants to merge 15 commits into
mainfrom
quality-review-bump-process-psmodule
Draft

Quality review: bump Process-PSModule to v6.1.16#91
Marius Storhaug (MariusStorhaug) wants to merge 15 commits into
mainfrom
quality-review-bump-process-psmodule

Conversation

@MariusStorhaug

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Quality review of the repository with dependency, workflow, and test updates.

Changes

  • Bump Process-PSModule from v5.5.0 to v6.1.16.
    • v6 replaces fixed TEST_* workflow secret inputs with an optional TestData object. This repository does not use test secrets, so no caller changes are required.
  • Pass APIKey explicitly instead of using secrets: inherit, matching the v6 secret contract.
  • Bump actions/checkout from v7.0.0 to v7.0.1 in Update-FontsData.yml.
  • Loosen and bump PowerShell module dependencies in Install-NerdFont.ps1:
  • Use system temp directory for downloads ([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.)
  • Migrate documentation config from .github/mkdocs.yml to .github/zensical.toml for Process-PSModule v6 site generation.
  • Add CONTRIBUTING.md because README.md linked to a missing file.
  • Add Documentation section to README.md pointing to the generated command reference at psmodule.io/NerdFonts. (Includes PR 📖 [Docs]: README pages now use the standard module landing-page format #85.)
  • Fix cache-fallback Pester test by replacing Copy-Item/Move-Item mocks with a real locked cache file, so the fallback path exercises live Copy-Item behavior.
  • Fix canonical documentation links in Get-NerdFont and Install-NerdFont comment-based help to end with a trailing slash, matching PSModule source-code test expectations.

Validation

  • Invoke-ScriptAnalyzer passes for src/, tests/, and scripts/.
  • Local Invoke-Pester runs against the installed module (Process-PSModule builds and installs the module before running tests in CI).

Related

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>
Copilot AI review requested due to automatic review settings August 3, 2026 01:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-PSModule reusable workflow from v5.5.0 to v6.1.16 and update actions/checkout to v7.0.1 in Update-FontsData.yml.
  • Loosen #Requires -Modules constraints for Fonts and Admin in Install-NerdFont.ps1 by switching from fixed RequiredVersion to a version range.
  • Add CONTRIBUTING.md and 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.

Comment thread tests/NerdFonts.Tests.ps1 Outdated
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Super-linter summary

Language Validation result
CHECKOV Pass ✅
GITHUB_ACTIONS Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSON Pass ✅
MARKDOWN Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
YAML Pass ✅

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>
Copilot AI review requested due to automatic review settings August 3, 2026 01:53
- 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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-Item calls 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/>.

Copilot AI review requested due to automatic review settings August 3, 2026 01:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

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>
Copilot AI review requested due to automatic review settings August 3, 2026 02:09
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-ChildItem ordering 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 ./src will fail because src/ 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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

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>
Copilot AI review requested due to automatic review settings August 3, 2026 02:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

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>
Copilot AI review requested due to automatic review settings August 3, 2026 02:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ./src will fail for a fresh checkout because src/ is not an importable PowerShell module directory here (no .psd1/.psm1 under src/). 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>
Copilot AI review requested due to automatic review settings August 3, 2026 03:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

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>
Copilot AI review requested due to automatic review settings August 3, 2026 03:25
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 3, 2026 03:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml now sets Build.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.toml for v6 site generation and linking to generated docs in the README. If the site should still be generated, this should be removed or set to false.
Build:
  Site:
    Skip: true

tests/NerdFonts.Tests.ps1:283

  • This test expects Copy-Item to fail due to [System.IO.File]::Open(..., FileShare::None), but on non-Windows runners Copy-Item/File.Copy may 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants