Skip to content
Myr

Upgrade `merge-streams` (#717)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by ehmicky · committed by GitHub · parent 0fbd3a2 · Browse files · 3 files+20 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+20 added−10 removed

  • tests:+14 added−0 removed
  • other:+6 added−10 removed

3 files+20 added−10 removed

modified:lib/stream.js+5 added-9 removed
modified:test/stream.js+14 added
1import {Buffer} from 'node:buffer';2import {once} from 'node:events';3import process from 'node:process';4import {getDefaultHighWaterMark} from 'node:stream';5import {setTimeout} from 'node:timers/promises';6import test from 'ava';7import getStream from 'get-stream';8import {execa, execaSync} from '../index.js';
18 unmodified lines
27 const {all} = await execa('noop.js', {stdio: 'ignore', all: true});28 t.is(all, undefined);29});3031const testAllProperties = async (t, options) => {32 const childProcess = execa('empty.js', {...options, all: true});33 t.is(childProcess.all.readableObjectMode, false);34 t.is(childProcess.all.readableHighWaterMark, getDefaultHighWaterMark(false));35 await childProcess;36};3738test('childProcess.all has the right objectMode and highWaterMark - stdout + stderr', testAllProperties, {});39test('childProcess.all has the right objectMode and highWaterMark - stdout only', testAllProperties, {stderr: 'ignore'});40test('childProcess.all has the right objectMode and highWaterMark - stderr only', testAllProperties, {stdout: 'ignore'});4142const testAllIgnore = async (t, streamName, otherStreamName) => {43 const childProcess = execa('noop-both.js', {[otherStreamName]: 'ignore', all: true});44 t.is(childProcess[otherStreamName], null);45 t.not(childProcess[streamName], null);46 t.not(childProcess.all, null);47 t.is(childProcess.all.readableObjectMode, childProcess[streamName].readableObjectMode);48 t.is(childProcess.all.readableHighWaterMark, childProcess[streamName].readableHighWaterMark);4950 const result = await childProcess;51 t.is(result[otherStreamName], undefined);52 t.is(result[streamName], 'foobar');
298 unmodified lines
modified:package.json+1 added-1 removed
43 unmodified lines
44 "local",45 "zx"46 ],47 "dependencies": {48 "@sindresorhus/merge-streams": "^1.0.0",48 "@sindresorhus/merge-streams": "^2.0.1",49 "cross-spawn": "^7.0.3",50 "get-stream": "^8.0.1",51 "human-signals": "^6.0.0",52 "is-stream": "^3.0.0",
38 unmodified lines