Skip to content

Commit

Permalink
Upgrade merge-streams (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 4, 2024
1 parent 9f65b86 commit 0423ac3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/io/iterate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {on} from 'node:events';
import {getDefaultHighWaterMark} from 'node:stream';
import {getEncodingTransformGenerator} from '../transform/encoding-transform.js';
import {getSplitLinesGenerator} from '../transform/split.js';
import {transformChunkSync, finalChunksSync} from '../transform/run-sync.js';
Expand Down Expand Up @@ -73,8 +74,7 @@ const iterateOnStream = ({stream, controller, binary, shouldEncode, encoding, sh
});
};

// @todo: replace with `getDefaultHighWaterMark(true)` after dropping support for Node <18.17.0
export const DEFAULT_OBJECT_HIGH_WATER_MARK = 16;
export const DEFAULT_OBJECT_HIGH_WATER_MARK = getDefaultHighWaterMark(true);

// The `highWaterMark` of `events.on()` is measured in number of events, not in bytes.
// Not knowing the average amount of bytes per `data` event, we use the same heuristic as streams in objectMode, since they have the same issue.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"zx"
],
"dependencies": {
"@sindresorhus/merge-streams": "^3.0.0",
"@sindresorhus/merge-streams": "^4.0.0",
"cross-spawn": "^7.0.3",
"figures": "^6.1.0",
"get-stream": "^9.0.0",
Expand Down

0 comments on commit 0423ac3

Please sign in to comment.