This version of yaml
has been published to npm using the next
dist-tag, so install it with:
npm install --save-exact yaml@next
The "big" thing here is the change to empty-line handling, which should allow for empty spaces before, between and after comments lines to be better represented. This also allowed me to un-skip the final block of tests that had been failing since the new parser was introduced.
Otherwise, mostly bugfixes. Feels like actually releasing v2.0.0 might happen pretty soon.
BREAKING CHANGES
Fix empty lines & trailing comments (#278)
An empty line in the source is represented by an empty line in the comment
or commentBefore
value, and a bare #
is represented by a line consisting of a single space character. This relatively small change allows for any combination of comment and blank lines to be cleanly represented by a single string, with the cost of a comment consisting of a single space character being unrepresentable.
The handling of trailing comments is also simplified somewhat; they now need to be more indented than their parent collection to attach to the preceding rather than the following node.
Drop Node.js 10 support
As Node.js 10 is now out of maintenance support, it's dropped from the CI tests. The library should continue to work fine with it, but that is no longer guaranteed.
New Features
- Check key uniqueness; add
uniqueKeys
option (#271) - Drop special-casing
COMMENT_SPACE
error; useMISSING_CHAR
for it instead