Skip to content

Commit

Permalink
Change maxBuffer default value from 10 MB to 100 MB (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky authored and sindresorhus committed Jun 15, 2019
1 parent 49c74ac commit 76c2e07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Expand Up @@ -159,9 +159,9 @@ declare namespace execa {
readonly timeout?: number;

/**
Largest amount of data in bytes allowed on `stdout` or `stderr`. Default: 10MB.
Largest amount of data in bytes allowed on `stdout` or `stderr`. Default: 100 MB.
@default 10000000
@default 100_000_000
*/
readonly maxBuffer?: number;

Expand Down
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -13,7 +13,7 @@ const pFinally = require('p-finally');
const onExit = require('signal-exit');
const stdio = require('./lib/stdio');

const TEN_MEGABYTES = 1000 * 1000 * 10;
const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;
const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;

const SPACES_REGEXP = / +/g;
Expand All @@ -25,7 +25,7 @@ function handleArgs(file, args, options = {}) {
options = parsed.options;

options = {
maxBuffer: TEN_MEGABYTES,
maxBuffer: DEFAULT_MAX_BUFFER,
buffer: true,
stripFinalNewline: true,
preferLocal: true,
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Expand Up @@ -12,7 +12,7 @@
- [Strips the final newline](#stripfinalnewline) from the output so you don't have to do `stdout.trim()`.
- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform.
- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why)
- Higher max buffer. 10 MB instead of 200 KB.
- Higher max buffer. 100 MB instead of 200 KB.
- [Executes locally installed binaries by name.](#preferlocal)
- [Cleans up spawned processes when the parent process dies.](#cleanup)
- [Get interleaved output](#all) from `stdout` and `stderr` similar to what is printed on the terminal. [*(Async only)*](#execasyncfile-arguments-options)
Expand Down Expand Up @@ -411,7 +411,7 @@ If timeout is greater than `0`, the parent will send the signal identified by th
#### maxBuffer

Type: `number`<br>
Default: `10000000` (10MB)
Default: `100_000_000` (100 MB)

Largest amount of data in bytes allowed on `stdout` or `stderr`.

Expand Down

0 comments on commit 76c2e07

Please sign in to comment.