Skip to content

Reassembly is using unescaped '\n' #11

Description

@nickpalmer

On line 100 in logger.js there is this:

  function appendNewline(line) {
    this.emit('data', line + '\n');
  }

This is a bug, since '\n' isn't converted to the newline character. This should be changed to:

  function appendNewline(line) {
    this.emit('data', line + os.EOL);
  }

It causes this issue in Lerna which is streaming through strong-log-transformer:
lerna/lerna#994

Additionally, on line 77 or logger.js there is this regexp to split lines:

      var list = last.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g);

This regex is suspect and probably should just split on whatever os.EOL is set to and nothing else.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions