From 859064ccd8e5020242f1604c4bedbc9223656473 Mon Sep 17 00:00:00 2001 From: ehmicky Date: Sun, 11 Aug 2019 14:58:47 +0200 Subject: [PATCH 1/4] Document the reasons why the returned promise might fail --- index.d.ts | 10 ++++++++++ readme.md | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/index.d.ts b/index.d.ts index 54f2a1afdb..47ff63cb6f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -268,6 +268,16 @@ declare namespace execa { extends ExecaReturnBase { } + /** + Result of a child process execution. On success this is a plain object. On failure this is also an `Error` instance. + + The child process fails when: + - its exit code is not `0` + - it was killed with a signal + - timing out + - being canceled + - there's not enough memory or there are already too many child processes + */ interface ExecaReturnValue extends ExecaSyncReturnValue { /** diff --git a/readme.md b/readme.md index 83a55c0f5c..e3f60578d1 100644 --- a/readme.md +++ b/readme.md @@ -200,6 +200,13 @@ Type: `object` Result of a child process execution. On success this is a plain object. On failure this is also an `Error` instance. +The child process [fails](#failed) when: + - its [exit code](#exitcode) is not `0` + - it was [killed](#killed) with a [signal](#signal) + - [timing out](#timedout) + - [being canceled](#iscanceled) + - there's not enough memory or there are already too many child processes + #### command Type: `string` From 708b481b3f802ede778ef9c6f951543b79d36d73 Mon Sep 17 00:00:00 2001 From: ehmicky Date: Sun, 11 Aug 2019 14:58:56 +0200 Subject: [PATCH 2/4] Fix whitespaces --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index e3f60578d1..fb74bf5a5f 100644 --- a/readme.md +++ b/readme.md @@ -202,9 +202,9 @@ Result of a child process execution. On success this is a plain object. On failu The child process [fails](#failed) when: - its [exit code](#exitcode) is not `0` - - it was [killed](#killed) with a [signal](#signal) - - [timing out](#timedout) - - [being canceled](#iscanceled) + - it was [killed](#killed) with a [signal](#signal) + - [timing out](#timedout) + - [being canceled](#iscanceled) - there's not enough memory or there are already too many child processes #### command From 6abe67a581035c4adbcdda95f58d5023be1a6b8e Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 17 Aug 2019 13:06:07 +0200 Subject: [PATCH 3/4] Update readme.md --- readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index fb74bf5a5f..fb9316cebd 100644 --- a/readme.md +++ b/readme.md @@ -201,11 +201,11 @@ Type: `object` Result of a child process execution. On success this is a plain object. On failure this is also an `Error` instance. The child process [fails](#failed) when: - - its [exit code](#exitcode) is not `0` - - it was [killed](#killed) with a [signal](#signal) - - [timing out](#timedout) - - [being canceled](#iscanceled) - - there's not enough memory or there are already too many child processes +- its [exit code](#exitcode) is not `0` +- it was [killed](#killed) with a [signal](#signal) +- [timing out](#timedout) +- [being canceled](#iscanceled) +- there's not enough memory or there are already too many child processes #### command From c142816b9882ee6d8794de4ccdd1103643b8fd0c Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 17 Aug 2019 13:06:46 +0200 Subject: [PATCH 4/4] Update index.d.ts --- index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 47ff63cb6f..f32ac41586 100644 --- a/index.d.ts +++ b/index.d.ts @@ -272,11 +272,11 @@ declare namespace execa { Result of a child process execution. On success this is a plain object. On failure this is also an `Error` instance. The child process fails when: - - its exit code is not `0` - - it was killed with a signal - - timing out - - being canceled - - there's not enough memory or there are already too many child processes + - its exit code is not `0` + - it was killed with a signal + - timing out + - being canceled + - there's not enough memory or there are already too many child processes */ interface ExecaReturnValue extends ExecaSyncReturnValue {