Skip to content

Releases: eemeli/yaml

v1.8.2

11 Mar 05:54
Compare
Choose a tag to compare
  • Add a "./": "./" export target
  • Add fallback export targets for Node 13.0-13.6

v1.8.0

07 Mar 19:57
Compare
Choose a tag to compare

New Features

  • Add ES module exports + set type in package.json (Fixes #138)
  • Add custom identifiers for core tags
  • Add sortMapEntries option (#44)
  • Use ES modules in browser build (supported by all modern bundlers and other packagers)

Bugfixes

  • Create missing intermediate collections in addIn & setIn (Fixes #131)
  • Account for initial indentation when stringifying values (Fixes #133)
  • Use a Map for prevObjects in createNode (#137)
  • YAML.createNode sets tag in the result, if explicitly given
  • Drop Node 6 tests due to incompatibility with Jest 25 (transpilation remains as Node 6)
  • cst: Minor refactoring to improve legibility, add some comments
  • cst: Drop Node.atCollectionItem as unused since 93a8a44
  • cst: Drop Directive.endOfDirective as unused since 307df17
  • Clean up YAML 1.1 & JSON boolean tag objects
  • Add tests to improve code coverage
  • Update dependencies

v1.7.2

15 Oct 11:25
Compare
Choose a tag to compare
  • During schema.createNode, accept Nodes as input (#128)
  • Update dependencies

v1.7.1

07 Oct 12:41
Compare
Choose a tag to compare
  • Empty collection items only grab inline comments (#125, #126)
  • Set CST Node#context as non-enumerable, to simplify logging

v1.7.0

25 Sep 13:21
Compare
Choose a tag to compare

New Features

  • Add optional id, customTags arguments to Document#setSchema()
  • Keep explicit keys with block scalar values as such
  • Add simpleKeys option (#122)

Improved Errors & Warnings

  • Add more context to pretty error messages
  • Improve error for missing flow collection terminator char
  • Use offset when prettifying flow collection character errors
  • Add warning when stringifying map/seq-valued keys for JS Object
  • Use process.emitWarning rather than console.warn in YAML.parse if possible

Bugfixes

  • Fix aliased anchors on null-value nodes (6KGN)
  • Fix stringification of timestamp-like strings in a YAML 1.1 context (fixes #119)
  • Consider input ending after implicit map key : as valid (Fixes #120)

v1.6.0

23 May 14:10
Compare
Choose a tag to compare
  • Allow same-column end for flow collections (#108, #113, #114)
  • Add Document#directivesEndMarker (#112)
  • Add directives-end and document-end marker ranges to CST Document during parse

v1.5.1

05 May 13:17
Compare
Choose a tag to compare
  • Apply previous document directives in YAML 1.1 streams (#109)
  • Fix export of Type from "yaml/util"
  • Update dependencies

v1.5.0

06 Apr 07:24
Compare
Choose a tag to compare

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

v1.4.0

07 Mar 19:49
Compare
Choose a tag to compare

New Features

  • Add @babel/runtime as a dependency for use via "browser" (#83)
  • Support circular objects, representing circular references using YAML alias nodes when encountered during YAML.stringify() (#84)
  • Deprecate the class attribute of tags, replacing it with the more generic identify(value) (#86)
  • Turn the string stringifier into a generic scalar stringifier, fallback to it by default, and export it as stringify() from yaml/schema (#86)
  • Add yaml-playground as a git submodule, extending ESLint rules
  • Add start script, providing an interactive node env with YAML defined

Bugfixes

  • Drop overeager browser polyfill generation; use playground/src/polyfill.js instead
  • Add BrowserStack tests to Travis CI
  • Accept arrays of tag objects as values of tags option (#90)
  • Allow for blank lines after less-indented comments (#91)

v1.3.2

08 Feb 21:32
Compare
Choose a tag to compare
  • Prevent clashes between the namespaces of top-level Nodes and their values (82ac5a8)
  • Stringify pairs with single-line flow collection values on a single line (#85)
  • Fix stringification of objects set in collection values (#87)