Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7c5ae6c
Bump Process-PSModule to v6.1.16
MariusStorhaug Aug 3, 2026
44ac4e2
Add CONTRIBUTING.md
MariusStorhaug Aug 3, 2026
6d51070
Bump actions/checkout to v7.0.1
MariusStorhaug Aug 3, 2026
1cacbd8
Loosen and bump module dependencies
MariusStorhaug Aug 3, 2026
6c873b8
Fix cache-fallback test mock
MariusStorhaug Aug 3, 2026
3458b25
Pass APIKey explicitly instead of secrets: inherit
MariusStorhaug Aug 3, 2026
4d77dfd
Use clean 2.0.0 upper bound for dependencies
MariusStorhaug Aug 3, 2026
34ff7d7
Use live data and wildcard bounds
MariusStorhaug Aug 3, 2026
50f1fc2
Load source module in tests instead of installed version
MariusStorhaug Aug 3, 2026
4a1cd0e
Revert source-module import in tests
MariusStorhaug Aug 3, 2026
d938845
Add trailing slash to canonical documentation links
MariusStorhaug Aug 3, 2026
cddeb15
Use concrete MaximumVersion for dependencies
MariusStorhaug Aug 3, 2026
df3945d
Skip site build until zensical.toml is configured
MariusStorhaug Aug 3, 2026
418f120
Migrate documentation config from mkdocs.yml to zensical.toml
MariusStorhaug Aug 3, 2026
f84b94c
Fix zensical.toml syntax
MariusStorhaug Aug 3, 2026
892aea3
Add agent guidance and relax dependency version bounds
MariusStorhaug Aug 7, 2026
eacd7c5
Remove site build skip from PSModule config
MariusStorhaug Aug 7, 2026
b391cf9
Merge branch 'main' into quality-review-bump-process-psmodule
MariusStorhaug Aug 7, 2026
dfa7760
test: pin process workflow to wildcard fix
MariusStorhaug Aug 8, 2026
516336e
test: pin process workflow to zensical fix
MariusStorhaug Aug 8, 2026
6a35af6
test: pin process workflow to valid zensical fix
MariusStorhaug Aug 8, 2026
5d43665
Update Process-PSModule to v6.1.17
MariusStorhaug Aug 8, 2026
518b111
Update Process-PSModule to v6.1.19
MariusStorhaug Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 0 additions & 75 deletions .github/mkdocs.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/Process-PSModule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ permissions:

jobs:
Process-PSModule:
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@11117919e65242d3388727819a751f74ad24ea9e # v5.5.0
secrets: inherit
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@bf67cd90269ca5ce25cd76b203678907dc2984b4 # v6.1.19
secrets:
APIKey: ${{ secrets.APIKey }}
71 changes: 71 additions & 0 deletions .github/zensical.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[project]
site_name = "-{{ REPO_NAME }}-"
repo_name = "-{{ REPO_OWNER }}-/-{{ REPO_NAME }}-"
repo_url = "https://github.com/-{{ REPO_OWNER }}-/-{{ REPO_NAME }}-"

[project.theme]
variant = "classic"
language = "en"
font.text = "Roboto"
font.code = "Sono"
logo = "Assets/icon.png"
favicon = "Assets/icon.png"
features = [
"navigation.instant",
"navigation.instant.progress",
"navigation.indexes",
"navigation.top",
"navigation.tracking",
"navigation.expand",
"search.suggest",
"search.highlight",
"content.code.copy"
]

[[project.theme.palette]]
media = "(prefers-color-scheme)"
toggle.icon = "material/link"
toggle.name = "Switch to dark mode"

[[project.theme.palette]]
media = "(prefers-color-scheme: dark)"
scheme = "slate"
primary = "black"
accent = "green"
toggle.icon = "material/toggle-switch-off-outline"
toggle.name = "Switch to light mode"

[[project.theme.palette]]
media = "(prefers-color-scheme: light)"
scheme = "default"
primary = "indigo"
accent = "green"
toggle.icon = "material/toggle-switch"
toggle.name = "Switch to system preference"

[project.theme.icon]
repo = "material/github"

[project.markdown_extensions.toc]
permalink = true

[project.markdown_extensions.attr_list]
[project.markdown_extensions.admonition]
[project.markdown_extensions.md_in_html]
[project.markdown_extensions."pymdownx.details"]
[project.markdown_extensions."pymdownx.superfences"]

[[project.extra.social]]
icon = "fontawesome/brands/discord"
link = "https://discord.gg/jedJWCPAhD"
name = "-{{ REPO_OWNER }}- on Discord"

[[project.extra.social]]
icon = "fontawesome/brands/github"
link = "https://github.com/-{{ REPO_OWNER }}-/"
name = "-{{ REPO_OWNER }}- on GitHub"

[project.extra.consent]
title = "Cookie consent"
description = "We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better."
actions = ["accept", "reject"]
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Agents

This repository follows the canonical PSModule agent guidance.

- Start with the local `README.md` and `CONTRIBUTING.md`.
- Use PSModule documentation as source of truth: <https://github.com/PSModule/docs>
- Follow MSX ways-of-working guidance for workflow, PR format, and review gates: <https://msxorg.github.io/docs/>

Use small, focused commits and keep pull requests scoped to one delivery leaf unless you are executing a documented bootstrap integration merge.
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Claude Code

@AGENTS.md
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to NerdFonts

Thank you for your interest in contributing! This repository is part of the
[PSModule](https://github.com/PSModule) framework and follows the shared
contribution guidelines.

## Getting started

1. Read the repository [README](README.md) to understand what the module does
and how it is built.
2. Familiarize yourself with the PSModule framework documentation at
<https://msxorg.github.io/docs/Frameworks/Process-PSModule/>.

## How to contribute

- **Bug reports and feature requests:** open a [GitHub issue](../../issues).
- **Code changes:** open a [pull request](../../pulls).
- **Keep changes small and focused.** Each pull request should address one
concern.
- **Open draft pull requests early** so maintainers can provide feedback while
work is in progress.

## Repository conventions

- Source code lives in `src/`.
- Tests live in `tests/` and are run with [Pester](https://pester.dev/).
- The module manifest is generated by the
[Process-PSModule](https://github.com/PSModule/Process-PSModule) workflow.
- Commit messages should be short and specific.

## Development

```powershell
Import-Module ./src
Invoke-Pester
```

## Code of conduct

Be respectful and constructive. We want this project to be welcoming for
everyone.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ To uninstall a NerdFont for all users (requires elevated privileges):
Uninstall-Font -Name 'FiraCode*' -Scope AllUsers
```

## Documentation

Every command has full reference documentation, generated from its comment-based help and published at [psmodule.io/NerdFonts](https://psmodule.io/NerdFonts/). Explore the commands and read detailed help directly from PowerShell:

```powershell
Get-Command -Module NerdFonts
Get-Help -Name Install-NerdFont -Examples
```

## Contributing

Coder or not, you can contribute to the project! We welcome all contributions.
Expand Down
2 changes: 1 addition & 1 deletion src/functions/public/Get-NerdFont.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Get the NerdFont with the name ending with 'Code'.

.LINK
https://psmodule.io/NerdFonts/Functions/Get-NerdFont
https://psmodule.io/NerdFonts/Functions/Get-NerdFont/

.NOTES
More information about the NerdFonts can be found at:
Expand Down
8 changes: 4 additions & 4 deletions src/functions/public/Install-NerdFont.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Requires -Modules @{ ModuleName = 'Fonts'; RequiredVersion = '1.1.21' }
#Requires -Modules @{ ModuleName = 'Admin'; RequiredVersion = '1.1.6' }
#Requires -Modules @{ ModuleName = 'Fonts'; ModuleVersion = '1.1.0'; MaximumVersion = '1.*' }
#Requires -Modules @{ ModuleName = 'Admin'; ModuleVersion = '1.1.0'; MaximumVersion = '1.*' }

function Install-NerdFont {
<#
Expand Down Expand Up @@ -40,7 +40,7 @@ function Install-NerdFont {
Installs only the monospace variant of all Nerd Fonts to the current user.

.LINK
https://psmodule.io/NerdFonts/Functions/Install-NerdFont
https://psmodule.io/NerdFonts/Functions/Install-NerdFont/

.NOTES
More information about the NerdFonts can be found at:
Expand Down Expand Up @@ -95,7 +95,7 @@ Please run the command again with elevated rights (Run as Administrator) or prov
$seenNames = [System.Collections.Generic.HashSet[string]]::new([System.StringComparer]::OrdinalIgnoreCase)

$guid = (New-Guid).Guid
$tempPath = Join-Path -Path $HOME -ChildPath "NerdFonts-$guid"
$tempPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath "NerdFonts-$guid"
if (-not (Test-Path -Path $tempPath -PathType Container)) {
Write-Verbose "Create folder [$tempPath]"
$null = New-Item -Path $tempPath -ItemType Directory
Expand Down
25 changes: 18 additions & 7 deletions tests/NerdFonts.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -265,25 +265,36 @@ Describe 'Module' {
$script:NerdFonts = $fonts
}

$fileLock = $null
try {
# Place a regular placeholder file so Test-Path returns true for cache-hit detection
# Lock the cached file with an exclusive share so Copy-Item fails, forcing the
# function to fall back to a real download using live test data.
if (-not (Test-Path -LiteralPath $cacheTagDir)) {
$null = New-Item -ItemType Directory -Path $cacheTagDir -Force
}
Set-Content -LiteralPath $cachedFile -Value 'placeholder'
if (Test-Path -LiteralPath $cachedFile) {
Remove-Item -LiteralPath $cachedFile -Recurse -Force -ErrorAction SilentlyContinue
}
Set-Content -LiteralPath $cachedFile -Value 'locked-cache-entry' -Force
$fileLock = [System.IO.File]::Open(
$cachedFile,
[System.IO.FileMode]::Open,
[System.IO.FileAccess]::Read,
[System.IO.FileShare]::None
)

Mock -ModuleName NerdFonts Get-Font { @() }
Mock -ModuleName NerdFonts Install-Font {}
# Mock Copy-Item to throw only for the cache-read path, simulating
# a locked/unreadable cached file cross-platform.
Mock -ModuleName NerdFonts Copy-Item {
throw 'Simulated cache read failure'
} -ParameterFilter { $LiteralPath -and $LiteralPath -eq $cachedFile }

# Should not throw — falls back to download
{ Install-NerdFont -Name $fontName -Force:$false -ErrorAction Stop } | Should -Not -Throw
Should -Invoke -ModuleName NerdFonts Install-Font -Times 1 -Exactly
} finally {
# Release the lock before restoring cache state.
if ($fileLock) {
$fileLock.Dispose()
$fileLock = $null
}
# Restore original cache state so no user/CI state is mutated
if ($hadExistingCache) {
Move-Item -LiteralPath $backupPath -Destination $cachedFile -Force -ErrorAction SilentlyContinue
Expand Down
Loading