Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate core options from execa-specific options #256

Merged
merged 4 commits into from May 20, 2019

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented May 18, 2019

Fixes #252

I've also re-ordered the options in index.test-d.ts and index.d.ts accordingly.

readme.md Outdated
@@ -250,6 +309,24 @@ Default: `true`

Set to `false` if you don't want to extend the environment variables when providing the `env` property.

### options from child_process#spawn and child_process#exec
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels weird to have a heading here. It kinda makes it unclear how to use these options. I would rather have it like this:

---

Execa also accepts the below options which are passed directly to `child_process#spawn()`/`child_process#exec()`
---

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

child_process#exec()

We don't actually use exec() internally, so not sure why it's mentioned here.

Copy link
Collaborator Author

@ehmicky ehmicky May 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use it, but we re-implement its options (timeout, maxBuffer, killSignal).

From a user perspective, it does not matter whether we use spawn() or exec() internally. Instead, what a user sees is that options from both spawn() and exec() work.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I still think we should make that clearer, with something like a proposed above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 38c57c6

@ehmicky
Copy link
Collaborator Author

ehmicky commented May 20, 2019

Fixed. :)

readme.md Outdated

The same options as both [`child_process#spawn()`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) and [`child_process#exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) can also be used.
Execa also accepts the below options which are passed directly to [`child_process#spawn()`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)/[`child_process#exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I still don't like the wording.

Execa also accepts the below options which are the same as the options for child_process#spawn()/child_process#exec()

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in cc96aa2

readme.md Outdated
@@ -311,7 +311,7 @@ Set to `false` if you don't want to extend the environment variables when provid

---

Execa also accepts the below options which are passed directly to [`child_process#spawn()`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)/[`child_process#exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)
Execa also accepts the below options which are the same options for [`child_process#spawn()`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)/[`child_process#exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exactly what I wrote.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b186094

@sindresorhus sindresorhus merged commit 76191ae into master May 20, 2019
@sindresorhus sindresorhus deleted the feature/separate-options branch May 20, 2019 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate child_process options from execa options in the README
2 participants