🚀 [Feature]: YAML streams can now be merged without representation loss#45
Closed
Marius Storhaug (MariusStorhaug) wants to merge 8 commits into
Closed
🚀 [Feature]: YAML streams can now be merged without representation loss#45Marius Storhaug (MariusStorhaug) wants to merge 8 commits into
Marius Storhaug (MariusStorhaug) wants to merge 8 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Jul 25, 2026
Member
Author
|
Superseded by #47 (release/v1.0.0 consolidation PR). Closing this stacked layer as part of release cleanup. |
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.
YAML configuration layers can now be combined without converting representation data into PowerShell objects, preserving tags, complex keys, anchors, aliases, shared nodes, cycles, document boundaries, and deterministic mapping order.
New: Representation-preserving YAML stream merging
Merge-Yamlaccepts two or more complete YAML streams. Later streams take precedence, mappings merge recursively, and every stream must contain the same positive document count.Compatible sequences can be replaced, appended, or structurally deduplicated with
-SequenceAction. Incompatible scalar, collection-kind, or effective-tag values can be replaced or rejected with-ConflictAction. YAML null overlays can replace existing values or be ignored with-NullAction.The result is exactly one normalized YAML 1.2 string with LF line endings and no final newline. Each array element or pipeline record is one complete stream, so file content should be read with
Get-Content -Rawwhen passed directly.Technical Details
PSCustomObjector dictionary projection participates in merging.-MaxNodesapplies independently to each parsed stream, invocation-wide clone creation, charged merge operations, and the resulting representation graph.Review Hardening
-ConflictAction Errorreports the actual value conflict instead of producing a duplicate key.Validation
Merge-Yamlsuite passed all 77 tests.f4b418f.Related issues