-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Open
Copy link
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
The platyPS module (v0.14.2) used by PowerShellBuild is no longer supported. Microsoft has released a complete rewrite named Microsoft.PowerShell.PlatyPS v1.x, which is now the supported version. This issue tracks migrating all three platyPS-dependent public functions and updating the module dependency.
Reference: https://learn.microsoft.com/en-us/powershell/utility-modules/platyps/overview?view=ps-modules
Affected files
requirements.psd1— dependency declarationPowerShellBuild/Public/Build-PSBuildMarkdown.ps1PowerShellBuild/Public/Build-PSBuildMAMLHelp.ps1PowerShellBuild/Public/Build-PSBuildUpdatableHelp.ps1- Existing markdown docs under
docs/— must be migrated to the new schema
Cmdlet mapping
Old (platyPS v0.14.x) |
New (Microsoft.PowerShell.PlatyPS v1.x) |
|---|---|
New-MarkdownHelp |
New-MarkdownCommandHelp |
Update-MarkdownHelp |
Import-MarkdownCommandHelp | Export-MarkdownCommandHelp |
New-ExternalHelp |
Import-MarkdownCommandHelp | Export-MamlCommandHelp |
New-ExternalHelpCab |
Import-MarkdownCommandHelp | Export-MamlCommandHelp (cab via pipeline) |
Tasks
- Update
requirements.psd1to replaceplatyPS = '0.14.2'withMicrosoft.PowerShell.PlatyPS = '1.0.1' - Update
Build-PSBuildMarkdownto useNew-MarkdownCommandHelp/Import-MarkdownCommandHelp | Export-MarkdownCommandHelp - Update
Build-PSBuildMAMLHelpto useImport-MarkdownCommandHelp | Export-MamlCommandHelp - Update
Build-PSBuildUpdatableHelpto use the new cab pipeline - Migrate existing
docs/markdown files to the new schema usingMeasure-PlatyPSMarkdown | Import-MarkdownCommandHelp | Export-MarkdownCommandHelp - Update CI (
requirements.psd1/ GitHub Actions) to install the new module name - Verify
Get-Helpoutput is correct end-to-end after migration
Migration note for existing markdown
The new module ships Measure-PlatyPSMarkdown specifically to detect old-schema files and pipe them through the conversion:
$mdfiles = Measure-PlatyPSMarkdown -Path .\docs\en-US\*.md
$mdfiles | Where-Object Filetype -match 'CommandHelp' |
Import-MarkdownCommandHelp -Path { $_.FilePath } |
Export-MarkdownCommandHelp -OutputFolder .\docs\en-US -ForceRun this once as part of the migration to bring existing markdown into the new schema before updating the build functions.
Notes
- The new module is a full C# rewrite using
markdig(the same parser used by Microsoft Learn), so parsing is significantly more accurate and faster. - The new
CommandHelpobject model is pipeline-friendly — theImport-* | Export-*pattern replaces most single-step cmdlets from v0.14.x. platyPSv0.14.2 is still installable from the Gallery but receives no further fixes or updates.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request