Skip to content
Myr

Change `maxBuffer` default value from `10 MB` to `100 MB` (#286)

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

authored by ehmicky · committed by Sindre Sorhus · parent 49c74ac · Browse files · 3 files+6 added−6 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+6 added−6 removed

  • other:+6 added−6 removed

3 files+6 added−6 removed

modified:index.d.ts+2 added-2 removed
157 unmodified lines
158 */159 readonly timeout?: number;160161 /**162 Largest amount of data in bytes allowed on `stdout` or `stderr`. Default: 10MB.162 Largest amount of data in bytes allowed on `stdout` or `stderr`. Default: 100 MB.163164 @default 10000000164 @default 100_000_000165 */166 readonly maxBuffer?: number;167168 /**
254 unmodified lines
modified:index.js+2 added-2 removed
11 unmodified lines
12const pFinally = require('p-finally');13const onExit = require('signal-exit');14const stdio = require('./lib/stdio');1516const TEN_MEGABYTES = 1000 * 1000 * 10;16const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;17const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;1819const SPACES_REGEXP = / +/g;20
3 unmodified lines
24 args = parsed.args;25 options = parsed.options;2627 options = {28 maxBuffer: TEN_MEGABYTES,28 maxBuffer: DEFAULT_MAX_BUFFER,29 buffer: true,30 stripFinalNewline: true,31 preferLocal: true,32 localDir: options.cwd || process.cwd(),
495 unmodified lines
modified:readme.md+2 added-2 removed
10 unmodified lines
11- Promise interface.12- [Strips the final newline](#stripfinalnewline) from the output so you don't have to do `stdout.trim()`.13- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform.14- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why)15- Higher max buffer. 10 MB instead of 200 KB.15- Higher max buffer. 100 MB instead of 200 KB.16- [Executes locally installed binaries by name.](#preferlocal)17- [Cleans up spawned processes when the parent process dies.](#cleanup)18- [Get interleaved output](#all) from `stdout` and `stderr` similar to what is printed on the terminal. [*(Async only)*](#execasyncfile-arguments-options)19- [Can specify file and arguments as a single string without a shell](#execacommandcommand-options)
390 unmodified lines
410411#### maxBuffer412413Type: `number`<br>414Default: `10000000` (10MB)414Default: `100_000_000` (100 MB)415416Largest amount of data in bytes allowed on `stdout` or `stderr`.417418#### killSignal
56 unmodified lines