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

Add .all property with interleaved stdout and stderr #171

Merged
merged 19 commits into from Mar 10, 2019

Commits on Jan 20, 2019

  1. Added result.all intermixed stdout/stderr (concat for sync)

    Added test cases for result.all intermixed output.
    
    Added fixtures/noop-132 which should output the sequence '123' but due to the unpredictable nature of the stdout/stderr it outputs '132' as the most common cases
    I've tried, as listed on noop-132, a different number of technique to make it predictable.
    
    On execa.sync, as it's using spawnSync internally, I couldn't get the stream and merge them.
    
    As such the output of result.all is just a concatenation of stdout + stderr.
    This makes the result.all in different use case (ex. async vs. sync) unreliable for string comparison, but at least useful for logging or checking on the output.
    tomsotte committed Jan 20, 2019
    Copy the full SHA
    6c46865 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2019

  1. Removed all stream from execa.sync(); fix creating mixed stream for…

    … nothing
    
    - execa.sync() cannot provide a true interleaved `all` stream because of
    the implementation of child_process.spawnSync, which does not expose `stdout`
    and `stderr` streams until termination. We could only concatenate the streams in the end.
    - Does not create the mixed stream if both streams do not exist.
    tomsotte committed Mar 7, 2019
    Copy the full SHA
    4069b17 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    97cde71 View commit details
    Browse the repository at this point in the history
  3. More predictable noop-132 fixture for testing all stream output

    The delay 6000ms is approximate, it may not work on every machine.
    tomsotte committed Mar 7, 2019
    Copy the full SHA
    23799a0 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2019

  1. Copy the full SHA
    40aa251 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    3832328 View commit details
    Browse the repository at this point in the history
  3. Fixed trailing space

    tomsotte committed Mar 8, 2019
    Copy the full SHA
    e35dcdf View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2019

  1. Using test.serial for testing result.all with lower timeout for noop-…

    …132 (1000ms)
    
    Testing with test.serial and a delay of only 1000ms seems to pass multiple
    test runs consistently. Let's see if it passes on CI testing as well.
    tomsotte committed Mar 9, 2019
    Copy the full SHA
    7f430d9 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    b500215 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    a419b4a View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    bc1450a View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    29f3f12 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2019

  1. Copy the full SHA
    43a43bd View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    dc68492 View commit details
    Browse the repository at this point in the history
  3. Removed execa.all()

    tomsotte committed Mar 10, 2019
    Copy the full SHA
    360bdb4 View commit details
    Browse the repository at this point in the history
  4. Update readme.md

    sindresorhus committed Mar 10, 2019
    Copy the full SHA
    06fbfff View commit details
    Browse the repository at this point in the history
  5. Update readme.md

    sindresorhus committed Mar 10, 2019
    Copy the full SHA
    e128464 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    e842c72 View commit details
    Browse the repository at this point in the history
  7. Update readme.md

    sindresorhus committed Mar 10, 2019
    Copy the full SHA
    b815a79 View commit details
    Browse the repository at this point in the history