🚀 [Feature]: Parsed YAML documents render as YAML text - #72
Merged
Marius Storhaug (MariusStorhaug) merged 2 commits intoAug 7, 2026
Conversation
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Marius Storhaug (MariusStorhaug)
merged commit Aug 7, 2026
8e37203
into
main
131 of 134 checks passed
Marius Storhaug (MariusStorhaug)
deleted the
feat/yaml-document-tostring
branch
August 7, 2026 20:54
|
✅ New release: PowerShell Gallery - Yaml 1.1.0 |
|
✅ New release: GitHub - Yaml 1.1.0 |
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.
Parsed YAML mapping and sequence documents now describe themselves as YAML when converted to text. Users can inspect a parsed document with
ToString()or string interpolation without losing normal property access, indexing, or scalar behavior.New: Parsed documents render as YAML text
ConvertFrom-Yamlnow returns mapping and sequence document roots that render back to YAML text throughToString(). This makes ad-hoc inspection easier in the console and keeps string interpolation useful for parsed document values.Scalar documents keep their native text conversion. A parsed integer still renders as an integer, a parsed Boolean still renders as a Boolean, and a parsed string still renders as the string content.
Changed: Document roots keep object behavior
The rendered text reflects the current value, so edits made after parsing are visible when the document is rendered. The document marker used for rendering is not emitted as YAML content, and existing mapping property access, dictionary access, and sequence indexing continue to work as before.
Technical details
ConvertFrom-Yamldecorates projected mapping and sequence document roots with thePSModule.Yaml.Documenttype name and aToString()script method.ConvertTo-Yamlat call time and trims the final newline so interactive text output is compact.-NoEnumeratedecorates the sequence document root.README.md, command help, and the conversion guide.tests/ConvertFrom-Yaml.Tests.ps1passes locally; markdownlint passes for touched docs; PR CI is green after rerunning an external PowerShell Gallery 403 failure.src/**PowerShell module sourcetests/**Pester testsREADME.mdand command guide docsRelevant issues (or links)