Packages

js-yaml

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

Upgrading js-yaml from 4.3.2 to 5.0.0

1 release in betweenevery note read

Other targets from 4.3.2Latest5.5.0
6
changes to make
0
advisories fixed
7
new
0
fixes

Before you upgrade

Tick each one off as you go
  • breaking5.0.0
  • breaking5.0.0
  • breaking5.0.0
  • breaking5.0.0
  • breaking5.0.0
  • deprecated5.0.0

Security

Release by release

  1. 5.0.0

    20 Jun 20267 new
    • new

      Added named exports for schemas, tags, parser events and AST utilities.

    • new

      Reworked JSON_SCHEMA and CORE_SCHEMA with spec-compliant scalar resolution rules, and added YAML11_SCHEMA.

    • new

      Added realMapTag for lossless mappings with non-string and complex keys. Object-based mappings now reject complex keys instead of stringifying them.

    • new

      Added dump() transform option for changing the generated AST before rendering.

    • new

      Added dump() options seqInlineFirst, flowBracketPadding, flowSkipCommaSpace, flowSkipColonSpace, quoteFlowKeys, quoteStyle and tagBeforeAnchor.

    • new

      Added formal data layers (events and AST) for modular data pipelines.

    • new

      Added the YAML Test Suite to the test set.

11 other lines we could not sort, mostly version bumps
  • Rewritten in TypeScript and reorganized the public API around flat named exports.

    5.0.0
  • YAML 1.2 schemas: CORE_SCHEMA (loader default), JSON_SCHEMA, FAILSAFE_SCHEMA.

    5.0.0
  • YAML11_SCHEMA, a combination of all YAML 1.1 tags (YAML 1.1 does not specify a schema, only "types").

    5.0.0
  • load uses CORE_SCHEMA, without !!merge by default.

    5.0.0
  • dump uses YAML11_SCHEMA + CORE_SCHEMA for the quoting check, to guarantee backward compatibility by default.

    5.0.0
  • !!set is now loaded as a JavaScript Set.

    5.0.0
  • Replaced the Type API with a tags API. Similar, but more precise and simpler. See examples for details. Tags can be defined via defineScalarTag(), defineSequenceTag() and defineMappingTag(), or as a spread + override of an existing tag.

    5.0.0
  • Renamed Schema.extend() to Schema.withTags().

    5.0.0
  • Expanded YAML 1.2 conformance and improved handling of directives, document markers, block keys, multiline scalars, tag syntax and other things.

    5.0.0
  • load() now throws on empty input instead of returning undefined.

    5.0.0

1 internal line (docs, tests, tooling) left out.