Skip to content

Releases: eemeli/yaml

v1.1.0

11 Dec 23:19
Compare
Choose a tag to compare

New Features

  • Support for JavaScript Set, Map and 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 option mapAsMap creates 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

28 Nov 21:10
Compare
Choose a tag to compare
  • Stop splitting \ escapes in double-quoted strings across line endings (#48)
  • Quote plain strings consisting of just - or ? (#52)

v1.0.2

15 Nov 10:54
Compare
Choose a tag to compare
  • fix(setOrigRanges): add missing props (#45)

v1.0.1

07 Nov 10:35
Compare
Choose a tag to compare
  • Bugfix: Doesn't quote colons #43
  • Update dev dependencies

v1.0.0

19 Sep 20:06
Compare
Choose a tag to compare

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:

  • Drop the need for .default when using require('yaml')
  • Fix for the bug part of #28, now always putting collection comments on their own line
  • Fix setOrigRanges() for flow collections, adding origOffset to FlowChar objects (Fixes #40)

v1.0.0-rc.8

23 Aug 05:29
Compare
Choose a tag to compare

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

11 Jul 15:47
Compare
Choose a tag to compare

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:

  • parseCST is now also included in the default YAML export
  • 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

08 Jul 12:45
Compare
Choose a tag to compare
v1.0.0-rc.6 Pre-release
Pre-release

v1.0.0-rc.5

30 Jun 15:35
Compare
Choose a tag to compare
v1.0.0-rc.5 Pre-release
Pre-release

v1.0.0-rc.4

27 Jun 21:29
Compare
Choose a tag to compare
v1.0.0-rc.4 Pre-release
Pre-release
  • Rename lowest API level more appropriately as a CST parser rather than an AST parser, so you'll now need to import yaml/parse-cst rather than yaml/parse-ast to use it.
  • Simplify the object-level API, dropping Node#origTag, skip setting empty values, and letting Pair extend Node.
  • Document the YAML.Document contents more clearly as an AST.