Releases: eemeli/yaml
Release list
v1.2.0
New Features
- Support blank lines (#64)
- Add
BLANK_LINEnodes to the CST - Add a boolean property
spaceBeforefor all AST nodes - cst: Assign comments & blank lines at end of collection to parent unless sufficiently indented
- Always separate document comments from the rest by a blank line
- Add
- Add missing YAML 1.1 collections:
!!omap,!!pairs, and!!set(#65) - Add
tagargument forcreateNode(), along with its refactored schema-specific implementation (29f399b) - Add optional
createNodeandnodeClassproperties to tag objects (bcb8d9c, 3ae63bc) - Add property based tests using fast-check, thanks to @dubzzz (#62)
Bugfixes
- Fix parsing of minimal strings: '', '-', '?', ':' (#61)
- Revert earlier fix for #48, which is now properly handled thanks to the fix for #57 (#59)
- cst/ParseContext: Stop advancing node.range.end past newline (08571ff)
- cst/PlainValue: Limit
valueRange.endto actual value end (0001333) - cst: Stop breaking the spec by allowing tab indents for map values (572f540)
- Stop aliasing Pair comment to the comment of its value (9b49ddb, 6d3cb36):
key: # this is now a pair comment value
- Render maps with all null values as
? a\n? b\nor{ a, b }(40b7a2a)
v1.1.0
New Features
- Support for JavaScript
Set,Mapand other iterable objects. When stringifying or creating nodes, this is automatic; Map and its descendants turn into YAML mappings, while other iterables become sequences. When parsing, a new optionmapAsMapcreates Maps rather than Objects from YAML mappings. (#46, #49, #50, #51) - Add a new public export at
'yaml/schema', providing easier-to-use stringifier options (#58)
Bugfixes
- Stop including end comments in collections if next content is not sufficiently indented (#41, #54)
- Stop folding more-indented lines at start of folded block scalars (#55)
- cst/PlainValue: Allow
:,to start a plain value in flow-out (#56) - Only advance to end of escape during double-quoted scalar folding (#57)
v1.0.3
v1.0.2
v1.0.1
v1.0.0
Whoa. It's like, ready? Just one minor bug has been reported in the last month, so now's as good a time as any to officially release this thing. A few small changes compared to the last RC:
v1.0.0-rc.8
More eyes reveal more bugs. Many of which have been fixed, thanks in particular to @ikatyang:
- schema/parseMap: Don't drop comments on empty value nodes (#19)
- cst/CollectionItem: Don't reset offset at end of document (#19)
- fix(document): add missing cstNode (#26)
- fix(document): add missing type (#27)
- fix(merge): no error when key is null (#29)
- fix(cst): correct document.valueRange.end (#30)
- Add
setOrigRanges()to YAML.parseCST() output (#31) - fix(flowSeq): explicit key with empty value (#33)
- fix: empty blockValue as empty string (#35)
- fix: checkKeyLength false positive (#37)
- cst/Collection: Set atLineStart during lineStart reset (#38)
In addition to the above bugfixes, the opinions of the string stringifier have been updated (2ab3eab):
- Quote
"x"as'"x"' - Prefer quoted over block for single line values
- Prefer block style for multiline
- Prefer literal over folded block style for short lines
Finally, dev dependencies have been updated, including an update to Babel 7 rc.2 that drops @babel/preset-stage-3 in favor of the specific required plugins.
v1.0.0-rc.7
As the library is now passing practically all of the yaml-test-suite tests, along with any others I've been able to find, and there are no more required features that are missing, this might be the last release before 1.0.0. Therefore, this version has been released on npm with the latest tag, so from now on the install command is just:
npm install yaml
In terms of features, rc.7 has rather little to offer on top of rc.6:
parseCSTis now also included in the defaultYAMLexport- Add a test harness for yaml-test-suite event tests,
yaml/dist/test-events - Add a new default-false option,
keepCstNodes - Bugfix: Encode & decode URI escapes in tag suffixes
v1.0.0-rc.6
- Add support for YAML 1.0 and YAML 1.1, renaming
extendedschema asyaml-1.1(note: YAML 1.0 prefix tags are parsed and stringified, but are not resolved) - Refactor the API a bit again, adding
parseDocument& renamingparseDocumentsasparseAllDocuments. This more closely matches the naming pattern used by other libraries. - Add
typeandformatto content nodes, allowing for stringification control. - Add
keepBlobsInJSONandkeepNodeTypesoptions, both defaulting totrue. - Split default options in
YAML.defaultOptionsandYAML.Document.defaults, depending on YAML version dependence - Update to latest yaml-test-suite (now only four tests are broken in the upstream repo: yaml/yaml-test-suite#25, yaml/yaml-test-suite#27, yaml/yaml-test-suite#38, yaml/yaml-test-suite#39)
- Various minor bugfixes