Skip to content

Commit

Permalink
doc: clarify options for single customization hooks thread
Browse files Browse the repository at this point in the history
  • Loading branch information
dygabo committed May 15, 2024
1 parent 9807ede commit 80c8692
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,8 @@ changes:
> [`--import` with `register()`][module customization hooks: enabling] instead.
Specify the `module` containing exported [module customization hooks][].
`module` may be any string accepted as an [`import` specifier][].
`module` may be any string accepted as an [`import` specifier][]. This option
has no effect on worker threads.

### `--experimental-network-imports`

Expand Down
4 changes: 3 additions & 1 deletion doc/api/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ changes:
`initialize` hook.
Register a module that exports [hooks][] that customize Node.js module
resolution and loading behavior. See [Customization hooks][].
resolution and loading behavior. Registering modules that export [hooks][] only
has an effect on the main thread. All worker threads inherit the customization
hooks chain of the main thread. See [Customization hooks][].
### `module.syncBuiltinESMExports()`
Expand Down
5 changes: 4 additions & 1 deletion doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,10 @@ changes:
* `execArgv` {string\[]} List of node CLI options passed to the worker.
V8 options (such as `--max-old-space-size`) and options that affect the
process (such as `--title`) are not supported. If set, this is provided
as [`process.execArgv`][] inside the worker. By default, options are
as [`process.execArgv`][] inside the worker. `--experimental-loader`
and `--import` with `module.register()` calls to contribute to the hooks
chain do not have an effect on the worker threads. These options affect
only the configuration of the main thread. By default, options are
inherited from the parent thread.
* `stdin` {boolean} If this is set to `true`, then `worker.stdin`
provides a writable stream whose contents appear as `process.stdin`
Expand Down

0 comments on commit 80c8692

Please sign in to comment.