NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #139 most downloaded on npm
JavaScript parser and stringifier for YAML
Last release 23 days ago
11 Sep 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
105 releases · first in 2011
Add custom ES module exports for browsers
__esModule markers from CJS transpilation (#145)BigInt values (#146)YAML.scalarOptions (#146)indent option: number of spaces (default: 2) (#147)indentSeq option: if false, consider - as indentation (default: true) (#147)@types/yaml by @ikatyang, with contributions from @ColinBradley and @shirk3y (#153)Document.cstNode typePair.Type enumYAMLError from 'yaml/util'Add Jest workaround to file deprecation tests
One column per quarter.
"browser" mappings for types.mjs & util.mjs (#142).8 and 00.4 in the core schema (#144)!!binary resolution on IE 11Add fallback export targets for Node 13.0-13.6
"./": "./" export targetNothing published for this version
Add ES module exports + set type in package.json (Fixes #138)
sortMapEntries option (#44)During schema.createNode, accept Nodes as input
Empty collection items only grab inline comments (#125, #126)
Add optional id, customTags arguments to Document#setSchema()
Allow same-column end for flow collections (#108, #113, #114)
Document#directivesEndMarker (#112)Apply previous document directives in YAML 1.1 streams
"yaml/util"Add warnings to deprecated endpoints (set _YAML_SILENCE_DEPRECATION_WARNINGS to disable)
yaml/parse-cst, yaml/types and yaml/utiltags option as customTags, and allow/prefer string identifiers for built-in custom tags_YAML_SILENCE_DEPRECATION_WARNINGS to disable)maxAliasCount option, defaulting to max 100 aliases for any anchor(item, ...) => item.toString(...) for collectionsSchema#createPair(key, value, ctx); drop create{Map,Seq} exportsminFractionDigits property to numbersEXP format handling for float numbersprettyErrors option, which makes errors prettier and drops their source reference (#96)YAMLError for error classestags/ from schema/ and adding constants.jsPair#addToJSMap(ctx, map), fixing merge of anchor seq with mapAsMap: trueDeprecate the class attribute of tags, replacing it with the more generic identify(value)
@babel/runtime as a dependency for use via "browser" (#83)YAML.stringify() (#84)class attribute of tags, replacing it with the more generic identify(value) (#86)stringify() from yaml/schema (#86)YAML definedplayground/src/polyfill.js insteadtags option (#90)Prevent clashes between the namespaces of top-level Nodes and their values
Use one- rather than zero-based indexing for line/col positions
Add context.root and rangeAsLinePos to CST nodes (#67, #68)
context.root and rangeAsLinePos to CST nodes (#67, #68)"browser" value in package.json> 0.5%, not dead to (currently) support at least IE 11@babel/runtime that is not included in the package.json dependenciestests/ (12876df).editorconfig (#69)tag value to !!set (#78)Keep empty line in comment lost during parsing (#75, #76)
Add BLANK_LINE nodes to the CST
BLANK_LINE nodes to the CSTspaceBefore for all AST nodes!!omap, !!pairs, and !!set (#65)tag argument for createNode(), along with its refactored schema-specific implementation (29f399b)createNode and nodeClass properties to tag objects (bcb8d9c, 3ae63bc)valueRange.end to actual value end (0001333)key: # this is now a pair comment
value
? a\n? b\n or { a, b } (40b7a2a)Support for JavaScript Set, Map and other iterable objects. When stringifying or creating nodes, this is automatic; Map and its descendants turn into
Set, Map and other iterable objects. When stringifying or creating nodes, this is automatic; Map and its descendants turn into YAML mappings, while other iterables become sequences. When parsing, a new option mapAsMap creates Maps rather than Objects from YAML mappings. (#46, #49, #50, #51)'yaml/schema', providing easier-to-use stringifier options (#58):, to start a plain value in flow-out (#56)Stop splitting \ escapes in double-quoted strings across line endings
\ escapes in double-quoted strings across line endings (#48)- or ? (#52)fix(setOrigRanges): add missing props
Bugfix: Doesn't quote colons #43
Whoa. It's like, ready? Just one minor bug has been reported in the last month, so now's as good a time as any to officially release this thing. A few
Whoa. It's like, ready? Just one minor bug has been reported in the last month, so now's as good a time as any to officially release this thing. A few small changes compared to the last RC:
.default when using require('yaml')origOffset to FlowChar objects (Fixes #40)More eyes reveal more bugs. Many of which have been fixed, thanks in particular to @ikatyang:
More eyes reveal more bugs. Many of which have been fixed, thanks in particular to @ikatyang:
setOrigRanges() to YAML.parseCST() output (#31)In addition to the above bugfixes, the opinions of the string stringifier have been updated (2ab3eab):
"x" as '"x"'Finally, dev dependencies have been updated, including an update to Babel 7 rc.2 that drops @babel/preset-stage-3 in favor of the specific required plugins.
As the library is now passing practically all of the yaml-test-suite tests, along with any others I've been able to find, and there are no more requir
As the library is now passing practically all of the yaml-test-suite tests, along with any others I've been able to find, and there are no more required features that are missing, this might be the last release before 1.0.0. Therefore, this version has been released on npm with the latest tag, so from now on the install command is just:
npm install yaml
In terms of features, rc.7 has rather little to offer on top of rc.6:
parseCST is now also included in the default YAML exportyaml/dist/test-eventskeepCstNodesAdd support for YAML 1.0 and YAML 1.1, renaming extended schema as yaml-1.1 (note: YAML 1.0 prefix tags are parsed and stringified, but are not resolv
extended schema as yaml-1.1 (note: YAML 1.0 prefix tags are parsed and stringified, but are not resolved)parseDocument & renaming parseDocuments as parseAllDocuments. This more closely matches the naming pattern used by other libraries.type and format to content nodes, allowing for stringification control.keepBlobsInJSON and keepNodeTypes options, both defaulting to true.YAML.defaultOptions and YAML.Document.defaults, depending on YAML version dependenceAdd `Alias` and `Merge` nodes to AST
Alias and Merge nodes to AST (#12)Rename lowest API level more appropriately as a CST parser rather than an AST parser, so you'll now need to import yaml/parse-cst rather than yaml/par
yaml/parse-cst rather than yaml/parse-ast to use it.Node#origTag, skip setting empty values, and letting Pair extend Node.YAML.Document contents more clearly as an AST.Refactor Document#resolveValue() into `YAML.createNode()`.
Document#resolveValue() into YAML.createNode().doc reference from collections, and otherwise simplify the Map and Seq objects by separating out the parsing functions -- this should also make it easier to move or copy a collection between documents. Subsequently, directly calling .toString() on a Map or Seq will now get you a JSON representation of the object; for YAML output you'll need to stringify the whole document.Switched from beta to rc because this really is nearly ready to publish.
Switched from beta to rc because this really is nearly ready to publish.
rc.1, it was missing a minor package.json updateNothing published for this version
Various bugfixes, in particular #7, #8, #9 and #10 as reported by @ikatyang.
Various bugfixes, in particular #7, #8, #9 and #10 as reported by @ikatyang.
Getting close to a v1 release...
Getting close to a v1 release...
Document#contents can be set to anythingDocument#resolveValue() to deeply wrap values in YAML objectsDocument#errors to Document#warningsYAML.stringify() and YAML.defaultOptionsYAMLSemanticError class for Document#parse() errorsString(Document) output improvements
Nothing published for this version
Tags are included in resolved nodes
Merge raw-yaml@0.2.5 as src/ast
Fix remaining stringifier mismatches with yaml-test-suite in.json
in.jsonout.yamlNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →