Skip to content

Support js-yaml v5 #2015

Description

@renatodeleao
  • Rollup Plugin Name: yaml
  • Rollup Plugin Version: 5.0.0

Feature Use Case

Support new js-yaml@5.x parser and its new features

Feature Proposal

Not sure how you want to handle this version wise, but could be two releases or just one

v5.1.0

  • upgrades js-yaml to v5, internally defaults YAML 1.1 schema. Everything stays the same besides the internal parser
  • a small wrapper around load/loadAll functions will needs to be made so it doesn't throw on empty (new behaviour, compared to v4).

v6.0.0

Breaking change

  • defaults to new YAML 1.2 schema if not specified
  • allow consumers to pass loadOptions/parserOptions via the plugin config, which will be forward them to the internal YAML.load/YAML.loadAll calls.
    1. Move js-yaml as peerDependency instead of devDependency requiring explicit install, ensures that schemas can be imported from js-yaml at consumers and forward via parserOptions
    2. Or re-export the schemas and forward them through @rollup/plugin-yaml package.

Cheers ✌️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions