From e10cb5de472e7743d191353c4937d982e5337581 Mon Sep 17 00:00:00 2001 From: Rawal27 Date: Wed, 12 Aug 2026 13:10:36 +0530 Subject: [PATCH 1/5] doc: fix grammar and punctuation in cli.md Signed-off-by: Rawal27 --- doc/api/cli.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 2052f010f4bb..47bee6161733 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -114,7 +114,7 @@ user explicitly passes the `--allow-addons` flag when starting Node.js. Example: ```cjs -// Attempt to require an native addon +// Attempt to require a native addon require('nodejs-addon-example'); ``` @@ -149,7 +149,7 @@ changes: - v22.18.0 pr-url: https://github.com/nodejs/node/pull/58853 description: When spawning process with the permission model enabled. - The flags are inherit to the child Node.js process through + The flags are inherited by the child Node.js process through NODE_OPTIONS environment variable. --> @@ -252,7 +252,7 @@ The valid arguments for the `--allow-fs-read` flag are: Examples can be found in the [File System Permissions][] documentation. -The initializer module and custom `--require` modules has a implicit +The initializer module and custom `--require` modules have an implicit read permission. ```console @@ -430,7 +430,7 @@ added: v20.0.0 When using the [Permission Model][], the process will not be able to create any worker threads by default. For security reasons, the call will throw an `ERR_ACCESS_DENIED` unless the -user explicitly pass the flag `--allow-worker` in the main Node.js process. +user explicitly passes the flag `--allow-worker` in the main Node.js process. Example: @@ -519,7 +519,7 @@ snapshot building process, which can load built-in modules, but not additional u Users can bundle their applications into a single script with their bundler of choice before building a snapshot. -As it's complicated to ensure the serializablility of all built-in modules, +As it's complicated to ensure the serializablity of all built-in modules, which are also growing over time, only a subset of the built-in modules are well tested to be serializable during the snapshot building process. The Node.js core test suite checks that a few fairly complex applications @@ -630,7 +630,7 @@ changes: description: The `--cpu-prof` flags are now stable. --> -Starts the V8 CPU profiler on start up, and writes the CPU profile to disk +Starts the V8 CPU profiler on startup, and writes the CPU profile to disk before exit. If `--cpu-prof-dir` is not specified, the generated profile is placed @@ -707,7 +707,7 @@ Specify the file name of the CPU profile generated by `--cpu-prof`. ### `--diagnostic-dir=directory` Set the directory to which all diagnostic output files are written. -Defaults to current working directory. +Defaults to the current working directory. Affects the default output directory of: @@ -741,7 +741,7 @@ changes: description: The option is no longer experimental. --> -Disable the ability of starting a debugging session by sending a +Disable the ability to start a debugging session by sending a `SIGUSR1` signal to the process. ### `--disable-warning=code-or-type` @@ -761,7 +761,7 @@ changes: Disable specific process warnings by `code` or `type`. Warnings emitted from [`process.emitWarning()`][emit_warning] may contain a -`code` and a `type`. This option will not-emit warnings that have a matching +`code` and a `type`. This option will not emit warnings that have a matching `code` or `type`. List of [deprecation warnings][]. @@ -820,7 +820,7 @@ Node.js enables V8's trap-handler-based WebAssembly bound checks on 64-bit platf which significantly improves WebAssembly performance by eliminating the need for inline bound checks. This optimization requires allocating a large virtual memory cage per WebAssembly memory instance (currently typically 8GB for 32-bit WebAssembly memory, -16GB for 64-bit WebAssembly memory) to trap out-of-bound accesses. On most 64-bit +16GB for 64-bit WebAssembly memory) to trap out-of-bounds accesses. On most 64-bit platforms, the virtual memory address space is usually large enough (around 128TB) to accommodate typical WebAssembly usages, but if the machine has manual limits on virtual memory (e.g. through `ulimit -v`), WebAssembly memory allocation is @@ -873,7 +873,7 @@ Set the default value of `order` in [`dns.lookup()`][] and * `ipv6first`: sets default `order` to `ipv6first`. * `verbatim`: sets default `order` to `verbatim`. -The default is `verbatim` and [`dns.setDefaultResultOrder()`][] have higher +The default is `verbatim` and [`dns.setDefaultResultOrder()`][] has higher priority than `--dns-result-order`. ### `--enable-fips` @@ -919,7 +919,7 @@ Error.prepareStackTrace = (error, trace) => { }; ``` -Note, enabling source maps can introduce latency to your application +Note that enabling source maps can introduce latency to your application when `Error.stack` is accessed. If you access `Error.stack` frequently in your application, take into account the performance implications of `--enable-source-maps`. @@ -994,7 +994,7 @@ An error is thrown if the file does not exist. node --env-file=.env --env-file=.development.env index.js ``` -The format of the file should be one line per key-value pair of environment +The format of the file should be one line per key-value pair, with the environment variable name and value separated by `=`: ```text From 5f5ad1be132ccee2fd9e151e7b3b34811db77cd6 Mon Sep 17 00:00:00 2001 From: Rawal27 Date: Wed, 12 Aug 2026 13:37:44 +0530 Subject: [PATCH 2/5] doc: Revert - Note that to Note, in cli.md Signed-off-by: Rawal27 --- doc/api/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 47bee6161733..bb177d21ea5a 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -919,7 +919,7 @@ Error.prepareStackTrace = (error, trace) => { }; ``` -Note that enabling source maps can introduce latency to your application +Note, enabling source maps can introduce latency to your application when `Error.stack` is accessed. If you access `Error.stack` frequently in your application, take into account the performance implications of `--enable-source-maps`. From 7cd57d0a27b29cdb6d916e577d63c278099c5eac Mon Sep 17 00:00:00 2001 From: Rawal27 Date: Wed, 12 Aug 2026 14:16:27 +0530 Subject: [PATCH 3/5] doc: improve grammar in cli.md and regenerated doc/node.1 Signed-off-by: Rawal27 --- doc/api/cli.md | 2 +- doc/node.1 | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index bb177d21ea5a..27dff48a146d 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -519,7 +519,7 @@ snapshot building process, which can load built-in modules, but not additional u Users can bundle their applications into a single script with their bundler of choice before building a snapshot. -As it's complicated to ensure the serializablity of all built-in modules, +As it's complicated to ensure the serializability of all built-in modules, which are also growing over time, only a subset of the built-in modules are well tested to be serializable during the snapshot building process. The Node.js core test suite checks that a few fairly complex applications diff --git a/doc/node.1 b/doc/node.1 index 1098bcff047f..5b67e54ee309 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -62,7 +62,7 @@ Attempts to do so will throw an \fBERR_DLOPEN_DISABLED\fR unless the user explicitly passes the \fB--allow-addons\fR flag when starting Node.js. Example: .Bd -literal -// Attempt to require an native addon +// Attempt to require a native addon require('nodejs-addon-example'); .Ed .Bd -literal @@ -150,7 +150,7 @@ Multiple paths can be allowed using multiple \fB--allow-fs-read\fR flags. Example \fB--allow-fs-read=/folder1/ --allow-fs-read=/folder2/\fR .El Examples can be found in the File System Permissions documentation. -The initializer module and custom \fB--require\fR modules has a implicit +The initializer module and custom \fB--require\fR modules have an implicit read permission. .Bd -literal $ node --permission -r custom-require.js -r custom-require-2.js index.js @@ -264,7 +264,7 @@ Error: Access to this API has been restricted When using the Permission Model, the process will not be able to create any worker threads by default. For security reasons, the call will throw an \fBERR_ACCESS_DENIED\fR unless the -user explicitly pass the flag \fB--allow-worker\fR in the main Node.js process. +user explicitly passes the flag \fB--allow-worker\fR in the main Node.js process. Example: .Bd -literal const { Worker } = require('node:worker_threads'); @@ -323,7 +323,7 @@ The snapshot currently only supports loading a single entrypoint during the snapshot building process, which can load built-in modules, but not additional user-land modules. Users can bundle their applications into a single script with their bundler of choice before building a snapshot. -As it's complicated to ensure the serializablility of all built-in modules, +As it's complicated to ensure the serializability of all built-in modules, which are also growing over time, only a subset of the built-in modules are well tested to be serializable during the snapshot building process. The Node.js core test suite checks that a few fairly complex applications @@ -377,7 +377,7 @@ node -C development app.js .Ed . .It Fl -cpu-prof -Starts the V8 CPU profiler on start up, and writes the CPU profile to disk +Starts the V8 CPU profiler on startup, and writes the CPU profile to disk before exit. If \fB--cpu-prof-dir\fR is not specified, the generated profile is placed in the current working directory. @@ -416,7 +416,7 @@ Specify the file name of the CPU profile generated by \fB--cpu-prof\fR. . .It Fl -diagnostic-dir Ns = Ns Ar directory Set the directory to which all diagnostic output files are written. -Defaults to current working directory. +Defaults to the current working directory. Affects the default output directory of: .Bl -bullet .It @@ -433,13 +433,13 @@ property is removed entirely. If \fBmode\fR is \fBthrow\fR, accesses to the property throw an exception with the code \fBERR_PROTO_ACCESS\fR. . .It Fl -disable-sigusr1 -Disable the ability of starting a debugging session by sending a +Disable the ability to start a debugging session by sending a \fBSIGUSR1\fR signal to the process. . .It Fl -disable-warning Ns = Ns Ar code-or-type Disable specific process warnings by \fBcode\fR or \fBtype\fR. Warnings emitted from \fBprocess.emitWarning()\fR may contain a -\fBcode\fR and a \fBtype\fR. This option will not-emit warnings that have a matching +\fBcode\fR and a \fBtype\fR. This option will not emit warnings that have a matching \fBcode\fR or \fBtype\fR. List of deprecation warnings. The Node.js core warning types are: \fBDeprecationWarning\fR and @@ -476,7 +476,7 @@ Node.js enables V8's trap-handler-based WebAssembly bound checks on 64-bit platf which significantly improves WebAssembly performance by eliminating the need for inline bound checks. This optimization requires allocating a large virtual memory cage per WebAssembly memory instance (currently typically 8GB for 32-bit WebAssembly memory, -16GB for 64-bit WebAssembly memory) to trap out-of-bound accesses. On most 64-bit +16GB for 64-bit WebAssembly memory) to trap out-of-bounds accesses. On most 64-bit platforms, the virtual memory address space is usually large enough (around 128TB) to accommodate typical WebAssembly usages, but if the machine has manual limits on virtual memory (e.g. through \fBulimit -v\fR), WebAssembly memory allocation is @@ -509,7 +509,7 @@ Set the default value of \fBorder\fR in \fBdns.lookup()\fR and .It \fBverbatim\fR: sets default \fBorder\fR to \fBverbatim\fR. .El -The default is \fBverbatim\fR and \fBdns.setDefaultResultOrder()\fR have higher +The default is \fBverbatim\fR and \fBdns.setDefaultResultOrder()\fR has higher priority than \fB--dns-result-order\fR. . .It Fl -enable-fips @@ -567,7 +567,7 @@ An error is thrown if the file does not exist. .Bd -literal node --env-file=.env --env-file=.development.env index.js .Ed -The format of the file should be one line per key-value pair of environment +The format of the file should be one line per key-value pair, with the environment variable name and value separated by \fB=\fR: .Bd -literal PORT=3000 From 73089f49d7173fbb85561c5553d6d54603aa0544 Mon Sep 17 00:00:00 2001 From: Kamal Rawal Date: Wed, 12 Aug 2026 14:19:24 +0530 Subject: [PATCH 4/5] Update doc/api/cli.md Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> --- doc/api/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 27dff48a146d..748e745677bd 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -820,7 +820,7 @@ Node.js enables V8's trap-handler-based WebAssembly bound checks on 64-bit platf which significantly improves WebAssembly performance by eliminating the need for inline bound checks. This optimization requires allocating a large virtual memory cage per WebAssembly memory instance (currently typically 8GB for 32-bit WebAssembly memory, -16GB for 64-bit WebAssembly memory) to trap out-of-bounds accesses. On most 64-bit +16GB for 64-bit WebAssembly memory) to trap out-of-bounds access. On most 64-bit platforms, the virtual memory address space is usually large enough (around 128TB) to accommodate typical WebAssembly usages, but if the machine has manual limits on virtual memory (e.g. through `ulimit -v`), WebAssembly memory allocation is From 65e18b1fa8e6b92b1247444ed971df793ea2de3e Mon Sep 17 00:00:00 2001 From: Rawal27 Date: Wed, 12 Aug 2026 14:29:36 +0530 Subject: [PATCH 5/5] doc: improve grammar in cli.md - sync cli.md/node.1 Signed-off-by: Rawal27 --- doc/node.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/node.1 b/doc/node.1 index 5b67e54ee309..a9d7e28d622b 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -476,7 +476,7 @@ Node.js enables V8's trap-handler-based WebAssembly bound checks on 64-bit platf which significantly improves WebAssembly performance by eliminating the need for inline bound checks. This optimization requires allocating a large virtual memory cage per WebAssembly memory instance (currently typically 8GB for 32-bit WebAssembly memory, -16GB for 64-bit WebAssembly memory) to trap out-of-bounds accesses. On most 64-bit +16GB for 64-bit WebAssembly memory) to trap out-of-bounds access. On most 64-bit platforms, the virtual memory address space is usually large enough (around 128TB) to accommodate typical WebAssembly usages, but if the machine has manual limits on virtual memory (e.g. through \fBulimit -v\fR), WebAssembly memory allocation is