Skip to content

v2.0.0-11

Compare
Choose a tag to compare
@eemeli eemeli released this 22 Mar 08:56

This version of yaml has been published to npm using the next dist-tag, so install it with:

npm install --save-exact yaml@next

BREAKING CHANGES

YAML.defaultOptions is removed (#346)

For a while, it's been undocumented, but still available. Since the options refactor of #235, it has only provided defaults for Parse & Document options, and not any of the others, so its name is a bit misleading as well.

If you're using YAML.defaultOptions, you'll need to explicitly set the options in the appropriate parse*() and new Document() calls after this change.

directives.marker is renamed as directives.docStart (#371)

The behaviour of the property stays the same as before.

New Features

  • Add warning for aliases & anchors ending with a colon (#370)
  • Add directives.docEnd, for ... marker (#371)
  • Add YAML.visitAsync() (#372)

Bugfixes

  • Flow collection keys in block maps (redhat-developer/vscode-yaml#712)
  • Error on %YAML directives with content after version (#348)
  • Use correct check for empty null source (#366)
  • Do not throw during composition, even for bad tokens (#367)
  • Error on invalid %YAML directives
  • Empty block scalars with chomp=keep & trailing whitespace
  • Parse ? : x as { ? { : x } }
  • Do not consider tabs as indent for flow collections
  • Include trailing more-indented empty lines in block scalar contents
  • Should complain about -, and -] in flow collections
  • Update dev dependencies, including @types/node downgrade

Test Improvements

  • Update yaml-test-suite, skipping some new tests
  • Don't needlessly skip yaml-test-suite B63P test
  • test-events: Do not skip events for only apparently empty documents
  • yaml-test-suite: Skip in.json tests when expecting errors