You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`Remove-YamlEntry`| Remove selected entries or documents without losing representation graph details. |
36
37
|`Test-Yaml`| Test YAML syntax, tags, duplicate keys, and configured resource limits. |
37
38
38
39
## Parse YAML
@@ -217,6 +218,29 @@ creation, charged merge operations, and the resulting stream graph. Index,
217
218
fingerprint, candidate, alias-traversal, and equality work all consume the merge
218
219
operation budget. Alias and expanded-tag budgets are also enforced on the result.
219
220
221
+
## Remove YAML entries
222
+
223
+
`Remove-YamlEntry` removes mapping entries, sequence items, or whole documents directly from a deep-cloned representation graph. Input array elements and pipeline records are joined with LF as one YAML stream, matching `Format-Yaml`.
Paths use [RFC 6901 JSON Pointer](https://www.rfc-editor.org/rfc/rfc6901). An empty pointer selects a document root, `~0` addresses a tilde, and `~1` addresses a slash. Mapping tokens match only scalar YAML string keys by ordinal content, so numeric, complex, and unknown-tagged keys are never coerced or guessed. Sequence tokens must be `0` or a non-zero decimal index without signs or leading zeros.
231
+
232
+
Document zero is selected by default. Use `-DocumentIndex` for another zero-based document, or `-AllDocuments` to apply every path independently to every original document. `-IgnoreMissing` skips only unresolved document/path combinations.
Every required target is resolved before mutation, duplicate logical targets are coalesced, and ancestors subsume descendants. Removing inside a shared mapping or sequence changes every alias to that node; removing an alias edge removes only that edge. Original sequence indexes and document roots are removed in descending order.
241
+
242
+
Output preserves unaffected tags, anchors, aliases, shared and cyclic identity, complex keys, mapping order, and document order. It is one deterministic string with LF line endings and no final newline; removing every document returns an empty string. Parser limits are mirrored, while cloning, pointer and mutation work, and output validation use independent resource ceilings.
243
+
220
244
## Export YAML files
221
245
222
246
`Export-Yaml` aggregates pipeline records like `ConvertTo-Yaml`, serializes the
@@ -265,6 +289,8 @@ limit violations. Unexpected runtime failures are not suppressed.
265
289
YAML 1.2 core schema.
266
290
- YAML stream merging compares effective tags and structural representation
267
291
values without projecting through PowerShell objects.
292
+
- YAML entry removal resolves JSON Pointers against an immutable representation
293
+
clone and mutates shared nodes by identity without object projection.
0 commit comments