🚀 [Feature]: YAML entries can now be removed without representation loss#46
Closed
Marius Storhaug (MariusStorhaug) wants to merge 10 commits into
Closed
🚀 [Feature]: YAML entries can now be removed without representation loss#46Marius Storhaug (MariusStorhaug) wants to merge 10 commits into
Marius Storhaug (MariusStorhaug) wants to merge 10 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>
8 tasks
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>
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 streams can now have selected entries or whole documents removed without losing tags, complex keys, anchors, aliases, shared nodes, cycles, mapping order, or document order.
New: Representation-preserving YAML entry removal
Remove-YamlEntryaccepts one or more RFC 6901 JSON Pointers and applies them as one transaction to document zero by default.Use
-DocumentIndexto select another zero-based document, or-AllDocumentsto apply every pointer independently to every document. An empty pointer removes the selected document root, and-IgnoreMissingskips only unresolved document/path combinations.Mapping tokens match only YAML string keys by ordinal scalar content. Sequence tokens must be canonical non-negative decimal indexes. JSON Pointer escapes are strict:
~0addresses a tilde and~1addresses a slash.Review hardening
!!set, and!!omapusing bounded fingerprint candidate indexes plus cycle-safe structural equality.!!pairsretains its repeated-key semantics.StringComparison.Ordinal, including composed/decomposed Unicode and near-standard unknown tags.-AllDocuments:$falsenow follows default single-document behavior for nested and root removals; only an explicitly present true switch selects every document.Technical Details
!!omap,!!pairs, and!!setshapes before deterministic representation emission.Validation
Remove-YamlEntryand packaging suites passed all 90 tests.0941489, including source and built-module tests/lint on PowerShell 7.6 for Windows, Linux, and macOS, every per-command artifact suite, conformance/corpus tests, module build, generated command documentation, and site build.Related issues