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

doc: improve the visibility of Worker threads cli options #31380

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
Node.js comes with a variety of CLI options. These options expose built-in
debugging, multiple ways to execute scripts, and other helpful runtime options.

Worker threads inherit non-process-specific options by default. Refer to
Copy link
Member

Choose a reason for hiding this comment

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

Is this a good place for this information? This is in a very prominent place in this document but it only applies to worker threads. This page is the documentation I would look at to figure out what CLI options I want to use. For what worker threads inherit, I would look in the worker_threads docs or maybe at process.argv and friends.

It took me a while to figure out what non-process-specific options means here, but I'm also not coming up with better terminology.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Trott ,thanks. Added in worker_threads.

[`Worker constructor options`][] to know how to customize worker thread options.
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to specifically mention the argv and execArgv options? Otherwise, the user may have to do a bit of looking for a needle in a haystack in the worker threads doc.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Trott, thanks. Mentioned argv and execArgv.


To view this documentation as a manual page in a terminal, run `man node`.

## Synopsis
Expand Down Expand Up @@ -1371,6 +1374,7 @@ greater than `4` (its current default value). For more information, see the
[`tls.DEFAULT_MAX_VERSION`]: tls.html#tls_tls_default_max_version
[`tls.DEFAULT_MIN_VERSION`]: tls.html#tls_tls_default_min_version
[`unhandledRejection`]: process.html#process_event_unhandledrejection
[`Worker constructor options`]: worker_threads.html#worker_threads_new_worker_filename_options
[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/
[Conditional Exports]: esm.html#esm_conditional_exports
[REPL]: repl.html
Expand Down