Repository navigation
v0.10.0
Added
Document#nodes, which builds every node of a document in one pass and keeps it until the document is edited by @marcoroth in #83- A count on
Sequence#firstandSequence#last, likeArray#first(n)by @marcoroth in #84 - A count on
QueryResult#firstandQueryResult#lastby @marcoroth in #84 - Sort keys separated by spaces, like
by: ".date .start_time", in the Yerbafile, the CLI and Ruby by @marcoroth in #85 - An Array of fields for
by:onDocument#sort, likeby: [:date, :start_time]by @marcoroth in #85 - An explicit order as a comma-separated String for
order:onDocument#sort, likeorder: "c,a,b"by @marcoroth in #85 order:onSequence#sortby @marcoroth in #85- Negative indexes in selectors, like
tags[-1]for the last item, inget,value_at,deleteand chained Ruby access by @LunaMeerkats in #67 - Negative indexes in
Yerba::Selector, as negative Integers like["tags", -1]by @LunaMeerkats in #67 - A
"flow"style forYerba.quote_scalar, for strings inside flow collections by @marcoroth in #90 Location#start_character_columnandLocation#end_character_column, which count characters and match the columns Herb reports by @marcoroth in #91ControlCharacter#character_columnby @marcoroth in #91
Changed
Document#[],Document#value_atand theeach,value_atandlengthmethods ofMapandSequenceread fromDocument#nodesinstead of calling into the extension for every node and field by @marcoroth in #83Yerba::Collection.getand other reads that return locations index the line starts of a document once, instead of rescanning the source for every node. They were quadratic in the size of the file by @nevinera in #79Document#nodesand the located reads share one cached line index per document by @marcoroth in #79SelectorSegmenthas a newIndexFromEndvariant, which is source-breaking for Rust code that matches on it exhaustively by @LunaMeerkats in #67- Bracket segments that are neither empty nor an index, like
tags[abc], are kept as a key that matches nothing. Reads returnniland writes raiseselector not found, where they used to selecttagsby @marcoroth in #86 - The writers quote every string that Psych would load as another type: dates and timestamps, sexagesimal numbers like
12:30:00, case-insensitive booleans and nulls, symbols, and numbers written with_,,,0bor a leading0by @marcoroth in #90 - Strings inside flow collections are quoted when they need it, so
["yes", "x, y"]no longer writes[yes, x, y]by @marcoroth in #90 - Location columns follow
Prism::Location: lines are 1-based and columns 0-based.directive_locationsandControlCharacteruse 0-based columns too by @marcoroth in #91 - Plain scalars are read the way Psych reads them, so
0755is493,1:30is5400,1,000is1000, and.infand.nanare floats. Forms Psych keeps as strings, like08and1e5, stay strings by @marcoroth in #93 selector:replacespath:in Yerbafile steps.path:still works and prints a deprecation warning by @marcoroth in #94selector:replacespath:onDocument#condition?andDocument#quote_style.path:still works and prints a deprecation warning by @marcoroth in #94- In the Rust crate,
SortField::pathisSortField::selector,Selector::parent_pathisSelector::parent_selectorandDocument::validate_pathisDocument::validate_selectorby @marcoroth in #94
Fixed
insert_objectwith a condition, likeafter: ".id == a", raisedYerba::Errorfrom Ruby by @marcoroth in #85- A String
order:onDocument#sortwas ignored without an error by @marcoroth in #85 sequence[-1]returned the sequence itself instead of its last item by @LunaMeerkats in #67Sequence#concatwrapped every scalar in avalue:hash by @marcoroth in #86- Assigning a collection to the first key of a map moved the key to the end by @marcoroth in #86
set --if-missingandDocument#set(..., if_missing: true)always failed, and now insert the value when the selector doesn't exist by @marcoroth in #86collection_style=split entries at a colon inside a quoted key like"a:b"by @marcoroth in #86Scalar#valuereturned the old value after the document was edited by @marcoroth in #87seton a key without a value, likenickname:, raisedselector not foundby @marcoroth in #90- Assigning a collection to the only key of a map raised at the root and wrote YAML that no longer parsed when nested by @marcoroth in #90
- A
whereresult returned items that no longer matched after the sequence was edited by @marcoroth in #92 0x1Fread as0through a node but as"0x1F"throughDocument#valuesby @marcoroth in #93Document#valuesraisedArgumentErrorwithjson3 by @marcoroth in #96
New Contributors
- @nevinera made their first contribution in #79
- @LunaMeerkats made their first contribution in #67
Commits
Full Changelog: v0.9.2...v0.10.0