Packages

yaml

2.9.1 · 11 Sep 2026ISC330.2M / weekRepositoryHomepagenpmAtom feed

Your version

1.2.0

1 Jan 2019Where it was published

1.10.3 is the newest release of 1.x.

In short

8 new7 fixed1 internal

Security

1 advisory affects 1.2.0; 1.10.3 fixes them

Release note

New Features

  • Support blank lines

    • Add BLANK_LINE nodes to the CST

    • Add a boolean property spaceBefore for all AST nodes

    • cst: Assign comments & blank lines at end of collection to parent unless sufficiently indented

    • Always separate document comments from the rest by a blank line

  • Add missing YAML 1.1 collections: !!omap, !!pairs, and !!set

  • Add tag argument for createNode(), along with its refactored schema-specific implementation

  • Add optional createNode and nodeClass properties to tag objects (bcb8d9c, 3ae63bc)

  • Add property based tests using fast-check, thanks to @dubzzz

Bugfixes

  • Fix parsing of minimal strings: '', '-', '?', ':'

  • Revert earlier fix for #48, which is now properly handled thanks to the fix for #57

  • cst/ParseContext: Stop advancing node.range.end past newline

  • cst/PlainValue: Limit valueRange.end to actual value end

  • cst: Stop breaking the spec by allowing tab indents for map values

  • Stop aliasing Pair comment to the comment of its value (9b49ddb, 6d3cb36):

    key: # this is now a pair comment
      value
  • Render maps with all null values as ? a\n? b\n or { a, b }

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.