diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 4902106a595de9..56449d1a6ec193 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -3229,12 +3229,12 @@ if `size` is less than or equal to half [`Buffer.poolSize`][]. Instances returned by [`Buffer.allocUnsafeSlow()`][] *never* use the shared internal memory pool. -### The `--zero-fill-buffers` command line option +### The `--zero-fill-buffers` command-line option -Node.js can be started using the `--zero-fill-buffers` command line option to +Node.js can be started using the `--zero-fill-buffers` command-line option to cause all newly-allocated `Buffer` instances to be zero-filled upon creation by default. Without the option, buffers created with [`Buffer.allocUnsafe()`][], [`Buffer.allocUnsafeSlow()`][], and `new SlowBuffer(size)` are not zero-filled. diff --git a/doc/api/child_process.md b/doc/api/child_process.md index d88adf49885b11..7ef5c82387346b 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -449,7 +449,7 @@ changes: * Returns: {ChildProcess} The `child_process.spawn()` method spawns a new process using the given -`command`, with command line arguments in `args`. If omitted, `args` defaults +`command`, with command-line arguments in `args`. If omitted, `args` defaults to an empty array. **If the `shell` option is enabled, do not pass unsanitized user input to this @@ -1398,7 +1398,7 @@ the child process if any, else `null`. * {Array} -The `subprocess.spawnargs` property represents the full list of command line +The `subprocess.spawnargs` property represents the full list of command-line arguments the child process was launched with. ### `subprocess.spawnfile` @@ -1547,7 +1547,7 @@ to `stdout` although there are only 4 characters. ## Shell requirements The shell should understand the `-c` switch. If the shell is `'cmd.exe'`, it -should understand the `/d /s /c` switches and command line parsing should be +should understand the `/d /s /c` switches and command-line parsing should be compatible. ## Default Windows shell diff --git a/doc/api/cli.md b/doc/api/cli.md index 9f9a07056f0600..b0ff3fe30c2f13 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1,4 +1,4 @@ -# Command line options +# Command-line options @@ -43,7 +43,7 @@ environment variable. added: v8.0.0 --> -Alias for stdin. Analogous to the use of `-` in other command line utilities, +Alias for stdin. Analogous to the use of `-` in other command-line utilities, meaning that the script is read from stdin, and the rest of the options are passed to that script. @@ -128,7 +128,7 @@ Specify the directory where the CPU profiles generated by `--cpu-prof` will be placed. The default value is controlled by the -[--diagnostic-dir](#cli_diagnostic_dir_directory) command line option. +[--diagnostic-dir](#cli_diagnostic_dir_directory) command-line option. ### `--cpu-prof-interval` -Print V8 command line options. +Print V8 command-line options. ### `--v8-pool-size=num` -Print node command line options. +Print node command-line options. The output of this option is less detailed than this document. ### `-i`, `--interactive` @@ -1185,8 +1185,8 @@ When set to `1`, process warnings are silenced. added: v8.0.0 --> -A space-separated list of command line options. `options...` are interpreted -before command line options, so command line options will override or +A space-separated list of command-line options. `options...` are interpreted +before command-line options, so command-line options will override or compound after anything in `options...`. Node.js will exit with an error if an option that is not allowed in the environment is used, such as `-p` or a script file. @@ -1197,7 +1197,7 @@ If an option value contains a space, it can be escaped using double quotes: NODE_OPTIONS='--require "./my path/file.js"' ``` -A singleton flag passed as a command line option will override the same flag +A singleton flag passed as a command-line option will override the same flag passed into `NODE_OPTIONS`: ```bash @@ -1206,7 +1206,7 @@ NODE_OPTIONS='--inspect=localhost:4444' node --inspect=localhost:5555 ``` A flag that can be passed multiple times will be treated as if its -`NODE_OPTIONS` instances were passed first, and then its command line +`NODE_OPTIONS` instances were passed first, and then its command-line instances afterwards: ```bash @@ -1331,7 +1331,7 @@ When set to `1`, emit pending deprecation warnings. Pending deprecations are generally identical to a runtime deprecation with the notable exception that they are turned *off* by default and will not be emitted -unless either the `--pending-deprecation` command line flag, or the +unless either the `--pending-deprecation` command-line flag, or the `NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations are used to provide a kind of selective "early warning" mechanism that developers may leverage to detect deprecated API usage. @@ -1479,7 +1479,7 @@ Load an OpenSSL configuration file on startup. Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with `./configure --openssl-fips`. -If the [`--openssl-config`][] command line option is used, the environment +If the [`--openssl-config`][] command-line option is used, the environment variable is ignored. ### `SSL_CERT_DIR=dir` diff --git a/doc/api/events.md b/doc/api/events.md index 37f2468970bd1e..a3b77553bab46e 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -355,7 +355,7 @@ emitter.once('event', () => { }); ``` -The [`--trace-warnings`][] command line flag can be used to display the +The [`--trace-warnings`][] command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with [`process.on('warning')`][] and will diff --git a/doc/api/index.md b/doc/api/index.md index f5ef2b312f72b3..756b79ec0812dc 100644 --- a/doc/api/index.md +++ b/doc/api/index.md @@ -18,7 +18,7 @@ * [C++ embedder API](embedding.html) * [Child processes](child_process.html) * [Cluster](cluster.html) -* [Command line options](cli.html) +* [Command-line options](cli.html) * [Console](console.html) * [Crypto](crypto.html) * [Debugger](debugger.html) diff --git a/doc/api/process.md b/doc/api/process.md index 3c733b70c2bb42..385f0c30feb4eb 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -440,16 +440,16 @@ $ node --no-warnings The `--trace-warnings` command-line option can be used to have the default console output for warnings include the full stack trace of the warning. -Launching Node.js using the `--throw-deprecation` command line flag will +Launching Node.js using the `--throw-deprecation` command-line flag will cause custom deprecation warnings to be thrown as exceptions. -Using the `--trace-deprecation` command line flag will cause the custom +Using the `--trace-deprecation` command-line flag will cause the custom deprecation to be printed to `stderr` along with the stack trace. -Using the `--no-deprecation` command line flag will suppress all reporting +Using the `--no-deprecation` command-line flag will suppress all reporting of the custom deprecation. -The `*-deprecation` command line flags only affect warnings that use the name +The `*-deprecation` command-line flags only affect warnings that use the name `'DeprecationWarning'`. #### Emitting custom warnings @@ -616,11 +616,11 @@ added: v0.1.27 * {string[]} -The `process.argv` property returns an array containing the command line +The `process.argv` property returns an array containing the command-line arguments passed when the Node.js process was launched. The first element will be [`process.execPath`][]. See `process.argv0` if access to the original value of `argv[0]` is needed. The second element will be the path to the JavaScript -file being executed. The remaining elements will be any additional command line +file being executed. The remaining elements will be any additional command-line arguments. For example, assuming the following script for `process-args.js`: @@ -2398,7 +2398,7 @@ the current value of `ps`. When a new value is assigned, different platforms will impose different maximum length restrictions on the title. Usually such restrictions are quite limited. For instance, on Linux and macOS, `process.title` is limited to the size of the -binary name plus the length of the command line arguments because setting the +binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) diff --git a/doc/api/repl.md b/doc/api/repl.md index f8ab8fa7e7d104..e3daa00da8ea35 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -224,7 +224,7 @@ Error: foo #### `await` keyword -With the [`--experimental-repl-await`][] command line option specified, +With the [`--experimental-repl-await`][] command-line option specified, experimental support for the `await` keyword is enabled. ```console @@ -537,7 +537,7 @@ added: v11.10.0 * `repl` {repl.REPLServer} Initializes a history log file for the REPL instance. When executing the -Node.js binary and using the command line REPL, a history file is initialized +Node.js binary and using the command-line REPL, a history file is initialized by default. However, this is not the case when creating a REPL programmatically. Use this method to initialize a history log file when working with REPL instances programmatically. diff --git a/doc/api/synopsis.md b/doc/api/synopsis.md index 8ae933a499a16c..1a8fd3ab4bbc88 100644 --- a/doc/api/synopsis.md +++ b/doc/api/synopsis.md @@ -7,7 +7,7 @@ `node [options] [V8 options] [script.js | -e "script" | - ] [arguments]` -Please see the [Command Line Options][] document for more information. +Please see the [Command-line options][] document for more information. ## Example An example of a [web server][] written with Node.js which responds with @@ -86,6 +86,6 @@ Now, open any preferred web browser and visit `http://127.0.0.1:3000`. If the browser displays the string `Hello, World!`, that indicates the server is working. -[Command Line Options]: cli.html#cli_command_line_options +[Command-line options]: cli.html#cli_command_line_options [this guide]: https://nodejs.org/en/download/package-manager/ [web server]: http.html diff --git a/doc/api/tls.md b/doc/api/tls.md index 7746f25df8dda5..19ec9e1aa38b26 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -308,10 +308,10 @@ HIGH !CAMELLIA ``` -This default can be replaced entirely using the [`--tls-cipher-list`][] command -line switch (directly, or via the [`NODE_OPTIONS`][] environment variable). For -instance, the following makes `ECDHE-RSA-AES128-GCM-SHA256:!RC4` the default TLS -cipher suite: +This default can be replaced entirely using the [`--tls-cipher-list`][] +command-line switch (directly, or via the [`NODE_OPTIONS`][] environment +variable). For instance, the following makes `ECDHE-RSA-AES128-GCM-SHA256:!RC4` +the default TLS cipher suite: ```bash node --tls-cipher-list='ECDHE-RSA-AES128-GCM-SHA256:!RC4' server.js diff --git a/doc/api/util.md b/doc/api/util.md index e39fb08e240a04..bc75caa1b7bcbe 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -217,20 +217,20 @@ fn1(); // Emits a deprecation warning with code DEP0001 fn2(); // Does not emit a deprecation warning because it has the same code ``` -If either the `--no-deprecation` or `--no-warnings` command line flags are +If either the `--no-deprecation` or `--no-warnings` command-line flags are used, or if the `process.noDeprecation` property is set to `true` *prior* to the first deprecation warning, the `util.deprecate()` method does nothing. -If the `--trace-deprecation` or `--trace-warnings` command line flags are set, +If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, or the `process.traceDeprecation` property is set to `true`, a warning and a stack trace are printed to `stderr` the first time the deprecated function is called. -If the `--throw-deprecation` command line flag is set, or the +If the `--throw-deprecation` command-line flag is set, or the `process.throwDeprecation` property is set to `true`, then an exception will be thrown when the deprecated function is called. -The `--throw-deprecation` command line flag and `process.throwDeprecation` +The `--throw-deprecation` command-line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation` and `process.traceDeprecation`. diff --git a/doc/api/v8.md b/doc/api/v8.md index 921c4378199496..a70567475f03d8 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -21,7 +21,7 @@ added: v8.0.0 * Returns: {integer} Returns an integer representing a "version tag" derived from the V8 version, -command line flags and detected CPU features. This is useful for determining +command-line flags and detected CPU features. This is useful for determining whether a [`vm.Script`][] `cachedData` buffer is compatible with this instance of V8. @@ -198,7 +198,7 @@ added: v1.0.0 * `flags` {string} The `v8.setFlagsFromString()` method can be used to programmatically set -V8 command line flags. This method should be used with care. Changing settings +V8 command-line flags. This method should be used with care. Changing settings after the VM has started may result in unpredictable behavior, including crashes and data loss; or it may simply do nothing. diff --git a/doc/api/wasi.md b/doc/api/wasi.md index b08c6c5558fcda..85a75bd104f857 100644 --- a/doc/api/wasi.md +++ b/doc/api/wasi.md @@ -83,7 +83,7 @@ added: The `WASI` class provides the WASI system call API and additional convenience methods for working with WASI-based applications. Each `WASI` instance represents a distinct sandbox environment. For security purposes, each `WASI` -instance must have its command line arguments, environment variables, and +instance must have its command-line arguments, environment variables, and sandbox directory structure configured explicitly. ### `new WASI([options])` @@ -95,7 +95,7 @@ added: * `options` {Object} * `args` {Array} An array of strings that the WebAssembly application will - see as command line arguments. The first argument is the virtual path to the + see as command-line arguments. The first argument is the virtual path to the WASI command itself. **Default:** `[]`. * `env` {Object} An object similar to `process.env` that the WebAssembly application will see as its environment. **Default:** `{}`. diff --git a/doc/node.1 b/doc/node.1 index 45c82c2009ec66..f52014dbdcb9dc 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -95,7 +95,7 @@ The directory where the CPU profiles generated by will be placed. The default value is controlled by the .Fl -diagnostic-dir . -command line option. +command-line option. . .It Fl -cpu-prof-interval The sampling interval in microseconds for the CPU profiles generated by @@ -198,7 +198,7 @@ The directory where the heap profiles generated by will be placed. The default value is controlled by the .Fl -diagnostic-dir . -command line option. +command-line option. . .It Fl -heap-prof-interval The average sampling interval in bytes for the heap profiles generated by @@ -319,7 +319,7 @@ will be generated. The `file` name may be an absolute path. If it is not, the default directory it will be written to is controlled by the .Fl -diagnostic-dir . -command line option. +command-line option. . .It Fl -report-filename Name of the file to which the @@ -554,7 +554,7 @@ process warnings are silenced. .It Ev NODE_OPTIONS Ar options... A space-separated list of command-line .Ar options , -which are interpreted as if they had been specified on the command-line before the actual command (so they can be overridden). +which are interpreted as if they had been specified on the command line before the actual command (so they can be overridden). Node.js will exit with an error if an option that is not allowed in the environment is used, such as .Fl -print or a script file. @@ -580,7 +580,7 @@ Write process warnings to the given instead of printing to stderr. Equivalent to passing .Fl -redirect-warnings Ar file -on command-line. +on the command line. .It Ev NODE_REPL_HISTORY Ar file Path to the .Ar file