| Crates.io | yamlpatch |
| lib.rs | yamlpatch |
| version | 0.3.0 |
| created_at | 2025-07-02 23:37:36.27948+00 |
| updated_at | 2025-07-21 01:13:41.78297+00 |
| description | Comment and format-preserving YAML patch operations |
| homepage | https://docs.zizmor.sh |
| repository | https://github.com/zizmorcore/zizmor/tree/main/crates/yamlpatch |
| max_upload_size | |
| id | 1735675 |
| size | 116,917 |
Comment and format-preserving YAML patch operations.
yamlpatch builds on yamlpath to provide surgical modification capabilities
while preserving comments, formatting, and structure.
[!IMPORTANT]
This is not a substitute for comprehensive YAML processing libraries. It's designed for targeted modifications that preserve the original document's formatting and comments.
When working with YAML configuration files, it's often necessary to make programmatic changes while preserving the human-readable aspects of the file: comments, formatting, indentation, and style choices.
Traditional YAML processing involves parsing to a document model, making changes, and re-serializing. This approach destroys the original formatting and comments, making the result less suitable for version control and human review.
yamlpatch solves this by providing targeted patch operations that:
yamlpatch supports several types of patch operations:
Each operation is designed to work with the existing document structure and formatting, making minimal changes while achieving the desired result.
MIT License.