Migrate to Microsoft.PowerShell.PlatyPS and psake v5#55
Open
HeyItsGilbert wants to merge 9 commits intomainfrom
Open
Migrate to Microsoft.PowerShell.PlatyPS and psake v5#55HeyItsGilbert wants to merge 9 commits intomainfrom
HeyItsGilbert wants to merge 9 commits intomainfrom
Conversation
✅ Deploy Preview for psake ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Replace Alt3.Docusaurus.Powershell + PlatyPS v0 with Microsoft.PowerShell.PlatyPS - Add scripts/New-PsakeDocusaurusHelp.ps1 to transform PlatyPS v2 markdown to Docusaurus MDX - Bump psake to 5.0.3; convert main tasks to v5 declarative hashtable syntax - Add -Quiet flag to build.ps1 for structured PsakeBuildResult output (reduces token usage) - Add 8 new command reference MDX files for psake v5 commands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The sidebar was generated by the old Alt3 module and only listed 12 commands. The 8 new v5 command MDX files are now included. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add PowerShellBuild module to requirements.psd1 - Add $psbOptions/$psbVersion/$psbOutputFolder to Properties block - Add GenerateCommandReferencePSB task set (Clean, Gen) - Wire GenerateCommandReferencePSB into Build task DependsOn - Add docs/psb-commands/ placeholder sidebar (empty until task runs) - Import psbCommands in sidebars.ts with conditional category in powershellBuildSidebar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename New-PsakeDocusaurusHelp.ps1 -> New-DocusaurusModuleHelp.ps1 - Rename function to New-DocusaurusModuleHelp (works for any PS module) - Add CommandVersionMap parameter; injects :::note Since <module> X.Y::: admonition - Add CommandVersionMap to $docusaurusOptions for the 8 psake v5-only commands - Update both GenerateCommandReference-Gen and GenerateCommandReferencePSB-Gen to use new script/function - Remove Exec.mdx (command was renamed to Execute in psake v5; no longer exported) - Remove 'commands/Exec' from docusaurus.sidebar.js Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…en fix - psakeFile: add Inputs/Outputs caching to Init and FrontMatterCMSSync tasks - psakeFile: add PreCondition to GenerateCommandReferencePSB; convert all tasks to hashtable syntax; fix #requires statement - build.ps1: add -NoCache and -OutputFormat params; use splatting for Invoke-Psake - requirements.psd1: fix 'latest3' typo for psake version - New-DocusaurusModuleHelp: guard Import-Module with Get-Module check to prevent force-reimporting psake mid-run (was blowing away Restore-Environment scope) - Delete stale scripts/New-PsakeDocusaurusHelp.ps1 (superseded by New-DocusaurusModuleHelp) - .gitignore: add .psake/ (v5 task cache directory) - Regenerate all 19 command reference MDX files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docusaurus.config.ts: fix navbar link Invoke-psake -> Invoke-Psake (case) - docs/intro.md, docs/tutorial-basics/getting-help.md: same case fix - New-DocusaurusModuleHelp: skip Convert-ParameterTablesToYamlFences when PlatyPS v2 native yaml blocks are present (avoids duplicate yaml and stray blocks bleeding into RELATED LINKS section) - requirements.psd1: add Import=\$false for Pester to prevent PSDepend from reimporting already-loaded assemblies on CI (fixes 'Assembly with same name is already loaded' bootstrap failure) - Regenerate all 19 command reference MDX files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2 passthrough - Switch RELATED LINKS generation from relative .mdx paths to absolute URL paths (/docs/<sidebar>/<cmd>) — avoids Linux case-sensitivity issues with git-tracked filename (Invoke-psake.mdx vs Invoke-Psake.mdx) - Rename git-tracked docs/commands/Invoke-psake.mdx -> Invoke-Psake.mdx (correct case) - Replace backtick line continuation with splat in ConvertTo-DocusaurusMdx call - Regenerate all 19 MDX files; local bun build passes with no broken links Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PlatyPS v2 changed from v1 behavior: example code is now emitted as plain text instead of fenced code blocks. Detect the first paragraph of each ### EXAMPLE section and wrap it in ```powershell fences. The guard (?!```) prevents double-wrapping if a fence is already present. Issue is in PlatyPS v2 export behavior, not in psake CBH (which correctly uses C:\PS> prompt prefix convention that PlatyPS strips). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove ## ALIASES section when it contains only the no-aliases placeholder
(PlatyPS v2 emits this for every command with no real aliases)
- Remove '{{ Fill in the related links here }}' from RELATED LINKS sections
- Warn via Write-Warning for any remaining {{...}} placeholders after cleanup
(currently: Include, Invoke-Psake, Test-BuildEnvironment have unfilled
Description fields in their CBH — these should be fixed upstream in psake)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b4fe974 to
7c20728
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Alt3.Docusaurus.Powershell+PlatyPSv0 pipeline withMicrosoft.PowerShell.PlatyPS(v2 schema)scripts/New-PsakeDocusaurusHelp.ps1— a custom transformer that converts PlatyPS v2 markdown (tables, new frontmatter) into the same Docusaurus MDX format the site already uses5.0.3and adopts v5 features:Version 5declaration, declarative hashtable task syntax,Inputs/Outputscaching onInit,exec {}wrappers for external commands-Quietflag tobuild.ps1for structuredPsakeBuildResultoutput — reduces token usage when running from Claude CodeBuildSetup,BuildTearDown,Clear-PsakeCache,Execute,Get-PsakeBuildPlan,Test-BuildEnvironment,Test-PsakeTask,Version)Test plan
.\build.ps1 -Bootstrapto installMicrosoft.PowerShell.PlatyPS.\build.ps1 -Quiet -Task GenerateCommandReferenceand inspectdocs/commands/Assert.mdx— frontmatter, yaml param fences,.mdxcross-links, and escaped curly braces should all be present.\build.ps1 -Quiet -Task Test— all 44 Pester tests pass.\build.ps1 -Quiet -Task Build— Docusaurus build completes without broken-link errors🤖 Generated with Claude Code