js-yaml
5.5.0 · 15 Oct 2026MIT322.7M / weekRepositoryHomepagenpmAtom feed
94 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 5.x · latest line
5.5.0
15 Oct 2026Updated
argparseto v3.Updated development dependencies.
Correct percent-encoding of shorthand and verbatim tags.
5.4.0
25 Aug 2026- breaking
Flattened the low-level AST node style representation. Scalar and collection nodes now use
SCALAR_STYLEandCOLLECTION_STYLEvalues; explicit tags use the separatetaggedproperty. Alias nodes now contain onlykindandanchor. This only affects code that directly constructs or edits AST nodes. - breaking
The
sortKeysoption was rewritten using AST mutation to avoid side effects. Added the
scalarStyleRulesdumper option to customize string formatting. See Scalar styling for details.
Added
Added the
scalarStyleRulesdumper 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_STYLEandCOLLECTION_STYLEvalues; explicit tags use the separatetaggedproperty. Alias nodes now contain onlykindandanchor. This only affects code that directly constructs or edits AST nodes. - breaking
The
sortKeysoption 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
quoteFlowKeysandflowSkipColonSpace, 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.
5.3.0
14 Aug 2026- deprecated
Deprecated flat constant exports. Use grouped ones instead.
- breaking
Removed the
MERGE_KEYexport (not used anymore after last fixes). Added completely new documentation.
This release focuses on reworking the documentation and making small architectural improvements before moving forward.
Added
Added completely new documentation.
Exported
DUMP_SCHEMA, the default schema used by the dumper.Added
YAMLException.throwAt()for throwing an error at a source position.
Changed
Changed flat constant exports to grouped exports:
EVENT_ID,SCALAR_STYLE,COLLECTION_STYLE, andCHOMPING_MODE, along with their value types. The old exports are still preserved, but deprecated.Made
identifymandatory for custom tag definitions. Useidentify: () => falsefor load-only tags.
Deprecated
- deprecated
Deprecated flat constant exports. Use grouped ones instead.
Removed
- breaking
Removed the
MERGE_KEYexport (not used anymore after last fixes).
Fixed
Validate
<<sequence items at merge time, so aliased merge sources are checked too.Resolve
<<outside of a mapping key as the plain string'<<', matching v4, instead of leaking an internal symbol into the result.
5.2.3
1 Aug 2026Prevent prototype fallback when resolving tags and mapping entries, #782.
Resolve
!!timestampyears 0000-0099 correctly, #775.Preserve implicit null mapping values before document markers and reject unpaired mapping event streams, #784.
Fixed
Prevent prototype fallback when resolving tags and mapping entries, #782.
Resolve
!!timestampyears 0000-0099 correctly, #775.Preserve implicit null mapping values before document markers and reject unpaired mapping event streams, #784.
Preserve folded scalar values with tab-indented lines when round-tripping a parsed AST through
present();dump()and loading are unaffected, #780.
5.2.1
2 Jul 2026- security
Remove quadratic complexity from !!omap
addItem. Regression from v5 (usually not critical, because YAML11_SCHEMA is not default anymore). Add
Mapsupport to !!omap (should work whenrealMapTagused)
5.2.0
26 Jun 2026- breaking
maxMergeSeqLengthreplaced withmaxTotalMergeKeysfor limiting YAML merge processing. Added
maxTotalMergeKeys(10000) loader option to limit the total number of keys processed by YAML merge (<<) across oneload()/loadAll()call.Added
maxAliases(-1) loader option to limit the number of YAML aliases per document.
Added
Added
maxTotalMergeKeys(10000) loader option to limit the total number of keys processed by YAML merge (<<) across oneload()/loadAll()call.Added
maxAliases(-1) loader option to limit the number of YAML aliases per document.
Removed
- breaking
maxMergeSeqLengthreplaced withmaxTotalMergeKeysfor limiting YAML merge processing.
Fixed
Round-trip of integers with exponential form (>=
1e21)
5.1.0
22 Jun 2026- breaking
quoteStylenow selects the preferred quote style; use the restoredforceQuotesoption to force quoting non-key strings. Collection tags can finalize an incrementally populated carrier into a different result value.
5.0.0
20 Jun 2026- deprecated
Deprecated the
loadAllsignature with an iterator (still works, but is a candidate for removal). - breaking
Removed deprecated
safeLoad(),safeLoadAll()andsafeDump()exports. - breaking
Removed
DEFAULT_SCHEMAand the nestedtypesexport.
Added
Added named exports for schemas, tags, parser events and AST utilities.
Reworked
JSON_SCHEMAandCORE_SCHEMAwith spec-compliant scalar resolution rules, and addedYAML11_SCHEMA.Added
realMapTagfor lossless mappings with non-string and complex keys. Object-based mappings now reject complex keys instead of stringifying them.Added
dump()transformoption for changing the generated AST before rendering.Added
dump()optionsseqInlineFirst,flowBracketPadding,flowSkipCommaSpace,flowSkipColonSpace,quoteFlowKeys,quoteStyleandtagBeforeAnchor.Added formal data layers (events and AST) for modular data pipelines.
Added low-level parser (to events), presenter and visitor APIs.
Added the YAML Test Suite to the test set.
Changed
Rewritten in TypeScript and reorganized the public API around flat named exports.
Reduced the set of exported schemas:
YAML 1.2 schemas:
CORE_SCHEMA(loader default),JSON_SCHEMA,FAILSAFE_SCHEMA.YAML11_SCHEMA, a combination of all YAML 1.1 tags (YAML 1.1 does not specify a schema, only "types").
load/dumpdefault behaviour is now specified exactly via schemas:loadusesCORE_SCHEMA, without!!mergeby default.dumpusesYAML11_SCHEMA+CORE_SCHEMAfor the quoting check, to guarantee backward compatibility by default.
!!setis now loaded as a JavaScriptSet.Replaced the
TypeAPI with a tags API. Similar, but more precise and simpler. See examples for details. Tags can be defined viadefineScalarTag(),defineSequenceTag()anddefineMappingTag(), or as a spread + override of an existing tag.Renamed
Schema.extend()toSchema.withTags().Expanded YAML 1.2 conformance and improved handling of directives, document markers, block keys, multiline scalars, tag syntax and other things.
load()now throws on empty input instead of returningundefined.Moved browser builds to the
js-yaml/browserexport.- deprecated
Deprecated the
loadAllsignature with an iterator (still works, but is a candidate for removal).
Removed
- breaking
Removed deprecated
safeLoad(),safeLoadAll()andsafeDump()exports. - breaking
Removed
DEFAULT_SCHEMAand the nestedtypesexport. - breaking
Removed loader options
onWarning,legacyandlistener. - breaking
Removed dumper options
styles,replacer,noCompatMode,condenseFlow,quotingTypeandforceQuotes. RenamednoArrayIndenttoseqNoIndent. Formatting and representation are now configured through presenter options, schemas and tag definitions. See migration guide on how to replace. - breaking
Removed support for importing internal files from
lib/.
- 4.x
4.3.0
26 Jun 2026Reading the note…
4.2.0
31 May 2026Reading the note…
4.1.1
12 Nov 2025Reading the note…
4.1.0
14 Apr 2021Reading the note…
4.0.0
3 Jan 2021Reading the note…
- 3.x
3.15.0
26 Jun 2026Reading the note…
3.14.2
14 Nov 2025Reading the note…
3.14.1
7 Dec 2020Reading the note…
3.14.0
22 May 2020Reading the note…
3.13.1
5 Apr 2019Reading the note…
3.13.0
20 Mar 2019Reading the note…
3.12.2
26 Feb 2019Reading the note…
3.12.1
5 Jan 2019Reading the note…
3.12.0
1 Jun 2018Reading the note…
3.11.0
5 Mar 2018Reading the note…
3.10.0
11 Sep 2017Reading the note…
3.9.1
30 Jul 2017Reading the note…
3.9.0
8 Jul 2017Reading the note…
3.8.4
8 May 2017Reading the note…
3.8.3
5 Apr 2017Reading the note…
3.8.2
2 Mar 2017Reading the note…
3.8.1
7 Feb 2017Reading the note…
3.8.0
7 Feb 2017Reading the note…
3.7.0
12 Nov 2016Reading the note…
3.6.1
11 May 2016Reading the note…
3.6.0
15 Apr 2016Reading the note…
3.5.5
17 Mar 2016Reading the note…
3.5.4
9 Mar 2016Reading the note…
3.5.3
11 Feb 2016Reading the note…
3.5.2
11 Jan 2016Reading the note…
3.5.1
11 Jan 2016Reading the note…
3.5.0
10 Jan 2016Reading the note…
3.4.6
26 Nov 2015Reading the note…
3.4.5
23 Nov 2015Reading the note…