npm / yaml
yaml
What changed in yaml 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
1 breaking1 security1 new APIs and options1 behavior and defaults7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inityaml 211 changes
Breaking changes 1
Recursive merge aliases are limited, changing how YAML documents with recursive merge aliases are handled.
Security 1
yaml is vulnerable to Stack Overflow via deeply nested YAML collections
New APIs and options 1
Adds the trailingComma option for multiline flow formatting.
Behavior and default changes 1
Setting maxAliasCount to 0 disables alias resolution.
Fixes and other changes 7
Avoids calling Array.prototype.push.apply() with a large source array.
Avoids recursive lexer calls that may exhaust the call stack.
Invalid unicode escapes are now handled.
minFractionDigits is applied only to decimal strings.
Catches stack overflows during node composition.
Empty map values are no longer serialized with double newlines.
Serialization preserves -0 as -0.