Skip to content

v0.7.2

Choose a tag to compare

@marcoroth marcoroth released this 22 Jun 23:24
· 56 commits to main since this release
bd8abc5

Added

  • Add Node#source for accessing CST text directly from Rust by @marcoroth in c909cef
    • Document#source(selector) navigates to a node and returns its original YAML text in a single FFI call, without serializing the whole document
    • Map#to_s and Sequence#to_s use source when connected to a document, returning the original YAML text with formatting preserved
    • Scalar#to_s continues to return the plain value (e.g., "Alice" not "\"Alice\"")
    • Use scalar.source to get the CST text with quotes (e.g., "\"Alice\"")
  • Add stale file detection to Yerba::Document by @marcoroth in 6ce421b
    • Track file mtime on load and check before save to prevent overwriting external changes
    • Document#stale? returns true if the file was modified since it was loaded
    • Document#save! and Document#apply! raise Yerba::StaleFileError if the file was modified externally
    • @loaded_mtime is updated after every successful write
    • Add Yerba::StaleFileError error class

Commits

Full Changelog: v0.7.1...v0.7.2

Full Changelog: v0.7.1...v0.7.2