Skip to content

v1.5.0

Compare
Choose a tag to compare
@eemeli eemeli released this 06 Apr 07:24

New Features

  • Refactor exports (#99, #107)
    • In addition to main export, use only yaml/parse-cst, yaml/types and yaml/util
    • Drop public export of custom tag objects
    • Rename tags option as customTags, and allow/prefer string identifiers for built-in custom tags
    • Add warnings to deprecated endpoints (set _YAML_SILENCE_DEPRECATION_WARNINGS to disable)
    • Drop babel-plugin-add-module-exports, using instead custom untranspiled CommonJS files for public exports
  • Add protection for exponential entity expansion attacks, such as Billion laughs and quadratic expansion attacks (#104)
    • Add maxAliasCount option, defaulting to max 100 aliases for any anchor
    • For Object, stringify mapping key as YAML rather than JSON
  • Simplify custom tag creation
    • Add default stringifier (item, ...) => item.toString(...) for collections
    • Add Schema#createPair(key, value, ctx); drop create{Map,Seq} exports
    • Improve & expand documentation on custom tags
  • Preserve float formatting when parsed to Document (#97)
    • Add optional minFractionDigits property to numbers
    • Add EXP format handling for float numbers
    • Allow scalar resolvers to return a Scalar instance
  • Add prettyErrors option, which makes errors prettier and drops their source reference (#96)
  • Add common ancestor YAMLError for error classes
  • Reorganise files, e.g. separating tags/ from schema/ and adding constants.js

Bugfixes

  • Tag presence in AST node now corresponds to explicit tags in YAML source (#97)
  • Add Pair#addToJSMap(ctx, map), fixing merge of anchor seq with mapAsMap: true