diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 0da931480fc149..b43b7eded247d7 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -2708,7 +2708,7 @@ it allows injection of numbers where a naively written application that does not validate its input sufficiently might expect to always receive a string. Before Node.js 8.0.0, the 100 byte buffer might contain arbitrary pre-existing in-memory data, so may be used to expose in-memory -secrets to a remote attacker. Since Node.js 8.0.0, exposure of memory cannot +secrets to a remote attacker. Since Node.js 8.0.0, exposure of memory cannot occur because the data is zero-filled. However, other attacks are still possible, such as causing very large buffers to be allocated by the server, leading to performance degradation or crashing on memory exhaustion. diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 5657f2014ab7e4..1c1f736ed1b2da 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -349,7 +349,7 @@ changes: * `detached` {boolean} Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [`options.detached`][]). - * `env` {Object} Environment key-value pairs. **Default:** `process.env`. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `execPath` {string} Executable used to create the child process. * `execArgv` {string[]} List of string arguments passed to the executable. **Default:** `process.execArgv`. @@ -739,7 +739,7 @@ changes: * `stdio` {string|Array} Child's stdio configuration. `stderr` by default will be output to the parent process' stderr unless `stdio` is specified. **Default:** `'pipe'`. - * `env` {Object} Environment key-value pairs. **Default:** `process.env`. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process @@ -869,7 +869,7 @@ changes: * `argv0` {string} Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` if not specified. * `stdio` {string|Array} Child's stdio configuration. - * `env` {Object} Environment key-value pairs. **Default:** `process.env`. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process diff --git a/doc/api/crypto.md b/doc/api/crypto.md index d83f1190cb78b7..3c7238c036c31b 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -2072,7 +2072,7 @@ added: v0.1.92 * `options` {Object} [`stream.Writable` options][] * Returns: {Sign} -Creates and returns a `Sign` object that uses the given `algorithm`. Use +Creates and returns a `Sign` object that uses the given `algorithm`. Use [`crypto.getHashes()`][] to obtain the names of the available digest algorithms. Optional `options` argument controls the `stream.Writable` behavior. diff --git a/doc/api/fs.md b/doc/api/fs.md index 87459aa4c9529c..f9aebe2b308ce7 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3659,14 +3659,14 @@ changes: * `err` {Error} Asynchronous symlink(2) which creates the link called `path` pointing to -`target`. No arguments other than a possible exception are given to the +`target`. No arguments other than a possible exception are given to the completion callback. The `type` argument is only available on Windows and ignored on other platforms. It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not exist, `'file'` will be used. Windows junction points -require the destination path to be absolute. When using `'junction'`, the +require the destination path to be absolute. When using `'junction'`, the `target` argument will automatically be normalized to absolute path. Relative targets are relative to the link’s parent directory. @@ -4280,7 +4280,7 @@ before and/or after the newly written data. For example, if `fs.writeFile()` is called twice in a row, first to write the string `'Hello'`, then to write the string `', World'`, the file would contain `'Hello, World'`, and might contain some of the file's original data (depending -on the size of the original file, and the position of the file descriptor). If +on the size of the original file, and the position of the file descriptor). If a file name had been used instead of a descriptor, the file would be guaranteed to contain only `', World'`. diff --git a/doc/api/modules.md b/doc/api/modules.md index cc19a2dd94eba6..0d23edcbe7e8fb 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -165,15 +165,15 @@ require(X) from module at path Y 6. THROW "not found" LOAD_AS_FILE(X) -1. If X is a file, load X as its file extension format. STOP -2. If X.js is a file, load X.js as JavaScript text. STOP -3. If X.json is a file, parse X.json to a JavaScript Object. STOP -4. If X.node is a file, load X.node as binary addon. STOP +1. If X is a file, load X as its file extension format. STOP +2. If X.js is a file, load X.js as JavaScript text. STOP +3. If X.json is a file, parse X.json to a JavaScript Object. STOP +4. If X.node is a file, load X.node as binary addon. STOP LOAD_INDEX(X) -1. If X/index.js is a file, load X/index.js as JavaScript text. STOP +1. If X/index.js is a file, load X/index.js as JavaScript text. STOP 2. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP -3. If X/index.node is a file, load X/index.node as binary addon. STOP +3. If X/index.node is a file, load X/index.node as binary addon. STOP LOAD_AS_DIRECTORY(X) 1. If X/package.json is a file, @@ -234,7 +234,7 @@ LOAD_PACKAGE_EXPORTS(DIR, X) a. LOAD_AS_FILE(RESOLVED) b. LOAD_AS_DIRECTORY(RESOLVED) 12. Otherwise - a. If RESOLVED is a file, load it as its file extension format. STOP + a. If RESOLVED is a file, load it as its file extension format. STOP 13. Throw "not found" ``` diff --git a/doc/api/n-api.md b/doc/api/n-api.md index e30c1e87fc75bb..6924a5cf87361c 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -651,7 +651,7 @@ typedef void (*napi_async_execute_callback)(napi_env env, void* data); Implementations of this function must avoid making N-API calls that execute JavaScript or interact with -JavaScript objects. N-API +JavaScript objects. N-API calls should be in the `napi_async_complete_callback` instead. Do not use the `napi_env` parameter as it will likely result in execution of JavaScript. diff --git a/doc/api/net.md b/doc/api/net.md index 3e16d4a638f330..d445e417ca3575 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -721,7 +721,7 @@ added: v6.1.0 If `true`, [`socket.connect(options[, connectListener])`][`socket.connect(options)`] was called and has not yet finished. It will stay `true` until the socket becomes -connected, then it is set to `false` and the `'connect'` event is emitted. Note +connected, then it is set to `false` and the `'connect'` event is emitted. Note that the [`socket.connect(options[, connectListener])`][`socket.connect(options)`] callback is a listener for the `'connect'` event. diff --git a/doc/api/process.md b/doc/api/process.md index 870e0904ffefd6..820b95f4d66bf5 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -556,7 +556,7 @@ environment variable. `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag -representations. `process.allowedNodeEnvironmentFlags.has()` will +representations. `process.allowedNodeEnvironmentFlags.has()` will return `true` in the following cases: * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., diff --git a/doc/api/readline.md b/doc/api/readline.md index 04233f1a591d44..d70a49304ce64d 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -365,7 +365,7 @@ The current input data being processed by node. This can be used when collecting input from a TTY stream to retrieve the current value that has been processed thus far, prior to the `line` event -being emitted. Once the `line` event has been emitted, this property will +being emitted. Once the `line` event has been emitted, this property will be an empty string. Be aware that modifying the value during the instance runtime may have @@ -399,7 +399,7 @@ added: v0.1.98 The cursor position relative to `rl.line`. This will track where the current cursor lands in the input string, when -reading input from a TTY stream. The position of cursor determines the +reading input from a TTY stream. The position of cursor determines the portion of the input string that will be modified as input is processed, as well as the column where the terminal caret will be rendered. @@ -415,7 +415,7 @@ added: * `cols` {number} the screen column the cursor currently lands on Returns the real position of the cursor in relation to the input -prompt + string. Long input (wrapping) strings, as well as multiple +prompt + string. Long input (wrapping) strings, as well as multiple line prompts are included in the calculations. ## `readline.clearLine(stream, dir[, callback])` diff --git a/doc/api/stream.md b/doc/api/stream.md index e935351aeb6b79..b1bdf6903f8161 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1842,7 +1842,7 @@ changes: specified in the [`stream.write()`][stream-write] call) before passing them to [`stream._write()`][stream-_write]. Other types of data are not converted (i.e. `Buffer`s are not decoded into `string`s). Setting to - false will prevent `string`s from being converted. **Default:** `true`. + false will prevent `string`s from being converted. **Default:** `true`. * `defaultEncoding` {string} The default encoding that is used when no encoding is specified as an argument to [`stream.write()`][stream-write]. **Default:** `'utf8'`. diff --git a/doc/api/tls.md b/doc/api/tls.md index f8e9edb78a77c3..4b49260e2663df 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -321,9 +321,9 @@ in [`tls.createServer()`][], [`tls.connect()`][], and when creating new The ciphers list can contain a mixture of TLSv1.3 cipher suite names, the ones that start with `'TLS_'`, and specifications for TLSv1.2 and below cipher -suites. The TLSv1.2 ciphers support a legacy specification format, consult +suites. The TLSv1.2 ciphers support a legacy specification format, consult the OpenSSL [cipher list format][] documentation for details, but those -specifications do *not* apply to TLSv1.3 ciphers. The TLSv1.3 suites can only +specifications do *not* apply to TLSv1.3 ciphers. The TLSv1.3 suites can only be enabled by including their full name in the cipher list. They cannot, for example, be enabled or disabled by using the legacy TLSv1.2 `'EECDH'` or `'!EECDH'` specification. @@ -768,12 +768,12 @@ On the client, the `session` can be provided to the `session` option of See [Session Resumption][] for more information. For TLSv1.2 and below, [`tls.TLSSocket.getSession()`][] can be called once -the handshake is complete. For TLSv1.3, only ticket-based resumption is allowed +the handshake is complete. For TLSv1.3, only ticket-based resumption is allowed by the protocol, multiple tickets are sent, and the tickets aren't sent until after the handshake completes. So it is necessary to wait for the -`'session'` event to get a resumable session. Applications +`'session'` event to get a resumable session. Applications should use the `'session'` event instead of `getSession()` to ensure -they will work for all TLS versions. Applications that only expect to +they will work for all TLS versions. Applications that only expect to get or use one session should listen for this event only once: ```js @@ -1623,11 +1623,11 @@ changes: [OpenSSL Options][]. * `secureProtocol` {string} Legacy mechanism to select the TLS protocol version to use, it does not support independent control of the minimum and - maximum version, and does not support limiting the protocol to TLSv1.3. Use - `minVersion` and `maxVersion` instead. The possible values are listed as - [SSL_METHODS][], use the function names as strings. For example, use + maximum version, and does not support limiting the protocol to TLSv1.3. Use + `minVersion` and `maxVersion` instead. The possible values are listed as + [SSL_METHODS][], use the function names as strings. For example, use `'TLSv1_1_method'` to force TLS version 1.1, or `'TLS_method'` to allow any - TLS protocol version up to TLSv1.3. It is not recommended to use TLS + TLS protocol version up to TLSv1.3. It is not recommended to use TLS versions less than 1.2, but it may be required for interoperability. **Default:** none, see `minVersion`. * `sessionIdContext` {string} Opaque identifier used by servers to ensure @@ -1825,7 +1825,7 @@ added: v11.4.0 [`tls.createSecureContext()`][]. It can be assigned any of the supported TLS protocol versions, `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless changed using CLI options. Using - `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets + `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. diff --git a/doc/api/util.md b/doc/api/util.md index 11aab8c3285665..bc57d8ee06130f 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1267,7 +1267,7 @@ added: v10.0.0 * Returns: {boolean} Returns `true` if the value is an instance of one of the [`ArrayBuffer`][] -views, such as typed array objects or [`DataView`][]. Equivalent to +views, such as typed array objects or [`DataView`][]. Equivalent to [`ArrayBuffer.isView()`][]. ```js