🚀 [Feature]: YAML files can be imported and exported directly#41
Closed
Marius Storhaug (MariusStorhaug) wants to merge 10 commits into
Closed
🚀 [Feature]: YAML files can be imported and exported directly#41Marius 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>
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 configuration can now be read from and written to files directly with strict Unicode handling, deterministic multi-file imports, and failure-safe atomic exports.
New: Read YAML files directly
Import-Yamlreads any file extension, expands wildcard-Pathvalues, accepts pipeline file objects, and treats-LiteralPathvalues exactly. Files are deduplicated and processed in deterministic path order while documents retain their order within each file.UTF-8 without a byte order mark is the default. UTF-8, UTF-16, and UTF-32 byte order marks are detected automatically, malformed bytes terminate with a path-specific error, and parser projection and resource-limit controls match direct YAML conversion.
New: Write YAML files safely
Export-Yamlaggregates pipeline records into one YAML value and writes UTF-8 with LF and one final newline by default. Encoding, line endings, final-newline policy, serializer limits, directory creation, overwrite behavior, and pass-through output are configurable.Serialization and encoding finish before filesystem mutation. Approved writes use a cryptographically random same-directory temporary file and atomic publication;
-WhatIfcreates nothing,-NoClobberprevents replacement, and-Forcepermits read-only replacement while restoring the read-only state.Technical Details
ConvertFrom-YamlandConvertTo-Yamlrather than duplicating engine logic.Path, whileFileInfo,PSPath, andFullNamepipeline properties bind exclusively to literal path resolution so wildcard characters in filenames are never expanded accidentally.ConvertTo-Yaml.finally.Related issues