Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodeca/js-yaml
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.5.5
Choose a base ref
...
head repository: nodeca/js-yaml
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.6.0
Choose a head ref
  • 12 commits
  • 24 files changed
  • 2 contributors

Commits on Mar 31, 2016

  1. Rewrite scalar dumper for correctness

    Rewrote the scalar dumper with an emphasis on rigor, based on a
    careful reading of the YAML 1.2 spec and testing against LibYAML.
    
    Corrections:
    
    Block style chomping accounts for added the extra newline
    added by subsequent elements or at the end.
    Fixes #238.
    
    Top-level block scalars are indented.
    Fixes dumper side of #221.
    
    Folded style should be reliable now. The old dumper was not aware of
    the subtle rules for more-indented lines.
    More-indented lines no longer cause extra newlines to be added.
    (The old dumper also had an off-by-one error that dropped
    the last character from a long first word on a line.)
    Fixes #215, #222. Removes #217 workaround.
    
    Literal and folded styles can represent arbitrary "printable" strings,
    including leading/trailing whitespace.
    
    NB. For the 'construct-string-types' dumper test, the strings are
    dumped correctly. The test fails because a loader bug
    loses a newline when using the keep "+" chomping indicator.
    
    Additional:
    
    Added test suite covering several former bugs, new edge cases,
    and new expected behaviors. All previous applicable tests are included.
    
    Styles are chosen in a well-defined order.
    Plain and single are preferred for single lines under the width limit.
    Folded is preferred when a line is longer than the width limit
      (if enabled) and does not begin with a space.
    Literal is used for all other multi-line "printable" strings.
    Double-quoted is only used when a string is unrepresentable otherwise.
    
    Plain style is relaxed to include more characters and strings.
    Progress on #183.
    
    As indent increases, line width decreases down to min(lineWidth, 40).
    Setting lineWidth to -1 disables wrapping.
    Previously there was unexpected behavior past 40 indent:
    narrow lineWidth suddenly jumped to 40,
    and -1 (no limit) suddenly enforced a limit of 40.
    aepsilon committed Mar 31, 2016
    Configuration menu
    Copy the full SHA
    dee2c3b View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2016

  1. Update test #217

    Updated test for #217.
    It now checks that folded style preserves JS functions and regexps.
    
    Replaced String.prototype.repeat with a helper function,
    for compatibility with node 0.10.
    aepsilon committed Apr 1, 2016
    Configuration menu
    Copy the full SHA
    927caee View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2016

  1. Merge pull request #274 from aepsilon/rewrite-scalar-dump

    Rewrite scalar dumper for correctness
    Vitaly Puzrin committed Apr 4, 2016
    Configuration menu
    Copy the full SHA
    4644c6f View commit details
    Browse the repository at this point in the history
  2. Changed Buffer use workaround for browser. Fix #275

    Vitaly Puzrin committed Apr 4, 2016
    Configuration menu
    Copy the full SHA
    0375c5e View commit details
    Browse the repository at this point in the history
  3. assert.equal() -> assert.strictEqual()

    Vitaly Puzrin committed Apr 4, 2016
    Configuration menu
    Copy the full SHA
    e0c4e4e View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2016

  1. Fix block scalar leading/trailing newlines

    Fixes #253: loader should not add an extra newline at the beginning
    of block scalars that have an explicit indentation indicator.
    
    Cause: "Detected indent" was assumed logically equivalent to
    "did read non-empty line". This no longer holds with an
    indentation indicator: indent is detected before any content is read.
    
    Fixes #276: loader should not remove a trailing newline
    for block scalars with "+" chomping.
    
    Cause: "+" chomping didn't account for the last content newline
    before the trailing empty lines.
    aepsilon committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    085bf1d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    57c398d View commit details
    Browse the repository at this point in the history
  3. Add benchmark samples for block scalars

    Taken from scalar_double_quoted_simple_multiline.yaml
    aepsilon committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    10d82a2 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #278 from aepsilon/fix-block-newlines

    Fix block scalar leading/trailing newlines
    Vitaly Puzrin committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    fa11316 View commit details
    Browse the repository at this point in the history
  5. Deps bump

    Vitaly Puzrin committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    f3f55e8 View commit details
    Browse the repository at this point in the history
  6. Browser files rebuild

    Vitaly Puzrin committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    3a26b76 View commit details
    Browse the repository at this point in the history
  7. 3.6.0 released

    Vitaly Puzrin committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    87e4cdc View commit details
    Browse the repository at this point in the history
Loading