Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop type property from all but Scalar nodes #240

Merged
merged 6 commits into from Mar 12, 2021
Merged

Drop type property from all but Scalar nodes #240

merged 6 commits into from Mar 12, 2021

Commits on Mar 12, 2021

  1. For collections, replace type flag with flow

    BREAKING CHANGE: YAMLMap, YAMLSeq, and Document no longer provide a
    `type` member with a value in FLOW_MAP | FLOW_SEQ | MAP | SEQ | DOCUMENT.
    Instead, YAMLMap & YAMLSeq now provide a boolean `flow` member that is
    set during composition, and which controls the flow/block styling of its
    stringified representation.
    eemeli committed Mar 12, 2021
    Copy the full SHA
    397b58e View commit details
    Browse the repository at this point in the history
  2. Drop type for Pair & Merge

    eemeli committed Mar 12, 2021
    Copy the full SHA
    ccfd98c View commit details
    Browse the repository at this point in the history
  3. Drop Merge class; rely on duck-typing !!merge instead

    BREAKING CHANGE: The Merge class is no more.
    eemeli committed Mar 12, 2021
    Copy the full SHA
    2d9a9f6 View commit details
    Browse the repository at this point in the history
  4. Drop type for Alias

    eemeli committed Mar 12, 2021
    Copy the full SHA
    b00b162 View commit details
    Browse the repository at this point in the history
  5. Drop Type enum; use Scalar class instead for its values

    BREAKING CHANGE: As all the other type values have been dropped, it's
    clearer to drop the generic Type, and to use Scalar instead:
    
    -import { Type } from 'yaml'
    -scalar.type = Type.BLOCK_LITERAL
    +import { Scalar } from 'yaml'
    +scalar.type = Scalar.BLOCK_LITERAL
    eemeli committed Mar 12, 2021
    Copy the full SHA
    fdb5446 View commit details
    Browse the repository at this point in the history
  6. Move remaining constants from constants.ts to log.ts & doc/createNode.ts

    Also simplifies log level parsing.
    eemeli committed Mar 12, 2021
    Copy the full SHA
    9c5ba3b View commit details
    Browse the repository at this point in the history