Packages

js-yaml

5.5.0 · 15 Oct 2026MIT322.7M / weekRepositoryHomepagenpmAtom feed

Your version

5.4.0

25 Aug 2026Where it was published

5.5.0 is the newest release of 5.x.

In short

2 breaking2 new5 fixed1 changed

  • breaking

    Flattened the low-level AST node style representation. Scalar and collection nodes now use SCALAR_STYLE and COLLECTION_STYLE values; explicit tags use the separate tagged property. Alias nodes now contain only kind and anchor. This only affects code that directly constructs or edits AST nodes.

  • breaking

    The sortKeys option was rewritten using AST mutation to avoid side effects.

Security

1 advisory affects 5.4.0; 5.4.1 fixes them

Release note

Added

  • Added the scalarStyleRules dumper option to customize string formatting.
    See Scalar styling for details.

Changed

  • breaking

    Flattened the low-level AST node style representation. Scalar
    and collection nodes now use SCALAR_STYLE and COLLECTION_STYLE values;
    explicit tags use the separate tagged property. Alias nodes now contain
    only kind and anchor. This only affects code that directly constructs or
    edits AST nodes.

  • breaking

    The sortKeys option was rewritten using AST mutation to avoid
    side effects.

  • Reworked scalar style selection. This can change formatting without changing
    loaded values; in particular, whitespace-only strings are now double-quoted.

Fixed

  • Accept a byte order mark at the start of each document in a stream, #791.

  • Produce valid flow mappings with quoteFlowKeys and flowSkipColonSpace,
    including alias and property-only keys, #786.

  • Preserve empty scalar items when converting block sequences to flow style.

  • Do not apply the 1024-character simple-key limit to flow mapping keys.

  • Count Unicode code points, rather than UTF-16 code units, for the
    1024-character simple-key limit.

  • Add an explicit document-end marker after keep-chomped block scalars when
    needed to preserve trailing newlines.