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

Reassembly is using unescaped '\n' #11

Open
nickpalmer opened this issue Jun 11, 2020 · 0 comments
Open

Reassembly is using unescaped '\n' #11

nickpalmer opened this issue Jun 11, 2020 · 0 comments

Comments

@nickpalmer
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant