From 1c466798155adaba3e7a333276cbaf33c4c4da10 Mon Sep 17 00:00:00 2001 From: HumaneLogic Date: Wed, 2 Jul 2025 03:17:01 +0330 Subject: [PATCH 1/4] doc: add missing environment variables to manpage and remove test workaround --- doc/node.1 | 27 +++++++++++++++++++ .../test-cli-node-cli-manpage-env-vars.mjs | 10 ------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/doc/node.1 b/doc/node.1 index 8a7c81e6973c66..ce9d18ca42d46b 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -693,12 +693,22 @@ disabled. .It Ev NO_COLOR Alias for NODE_DISABLE_COLORS . +.It Ev NODE_COMPILE_CACHE Ar dir +Enable the +.Sy module compile cache +for the Node.js instance +. .It Ev NODE_DEBUG Ar modules... Comma-separated list of core modules that should print debug information. . .It Ev NODE_DEBUG_NATIVE Ar modules... Comma-separated list of C++ core modules that should print debug information. . +.It Ev NODE_DISABLE_COMPILE_CACHE Ar dir +Disable the +.Sy module compile cache +for the Node.js instance +. .It Ev NODE_DISABLE_COLORS When set to .Ar 1 , @@ -754,6 +764,9 @@ When set to .Ar 1 , emit pending deprecation warnings. . +.It Ev NODE_PENDING_PIPE_INSTANCES +Set the number of pending pipe instance handles when the pipe server is waiting for connections. This setting applies to Windows only. +. .It Ev NODE_PRESERVE_SYMLINKS When set to .Ar 1 , @@ -787,11 +800,25 @@ the check for a supported platform is skipped during Node.js startup. Node.js might not execute correctly. Any issues encountered on unsupported platforms will not be fixed. . +.It Ev NODE_TEST_CONTEXT +When set to +.Sq child, +test reporter options will be overridden and test output will be sent to stdout in the TAP format. +If any other value is provided, Node.js makes no guarantees about the reporter format used or its stability. +. .It Ev NODE_TLS_REJECT_UNAUTHORIZED When set to .Ar 0 , TLS certificate validation is disabled. . +.It Ev NODE_USE_ENV_PROXY +When enabled, Node.js parses the +.Ar HTTP_PROXY, +.Ar HTTPS_PROXY +and +.Ar NO_PROXY +environment variables during startup, and tunnels requests over the specified proxy. +. .It Ev NODE_V8_COVERAGE Ar dir When set, Node.js writes JavaScript code coverage information to .Ar dir . diff --git a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs index 703b1f04073615..cb4b17393325dc 100644 --- a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs +++ b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs @@ -21,16 +21,6 @@ assert(manpageEnvVarNames.size > 0, 'Unexpectedly not even a single env variable was detected when scanning the `doc/node.1` file' ); -// TODO(dario-piotrowicz): add the missing env variables to the manpage and remove this set -// (refs: https://github.com/nodejs/node/issues/58894) -const knownEnvVariablesMissingFromManPage = new Set([ - 'NODE_COMPILE_CACHE', - 'NODE_DISABLE_COMPILE_CACHE', - 'NODE_PENDING_PIPE_INSTANCES', - 'NODE_TEST_CONTEXT', - 'NODE_USE_ENV_PROXY', -]); - for (const envVarName of cliMdEnvVarNames) { if (!manpageEnvVarNames.has(envVarName) && !knownEnvVariablesMissingFromManPage.has(envVarName)) { assert.fail(`The "${envVarName}" environment variable (present in \`doc/api/cli.md\`) is missing from the \`doc/node.1\` file`); From b7bd4ae8ed842a32de54c5f63aacfa5a5d8753ea Mon Sep 17 00:00:00 2001 From: HumaneLogic Date: Thu, 3 Jul 2025 01:37:53 +0330 Subject: [PATCH 2/4] test: remove fallback for missing manpage env vars --- doc/node.1 | 15 ++++++++------- .../test-cli-node-cli-manpage-env-vars.mjs | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/node.1 b/doc/node.1 index ce9d18ca42d46b..a0750ceceb7aa4 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -695,8 +695,8 @@ Alias for NODE_DISABLE_COLORS . .It Ev NODE_COMPILE_CACHE Ar dir Enable the -.Sy module compile cache -for the Node.js instance +.Sy module compile cache +for the Node.js instance. . .It Ev NODE_DEBUG Ar modules... Comma-separated list of core modules that should print debug information. @@ -706,8 +706,8 @@ Comma-separated list of C++ core modules that should print debug information. . .It Ev NODE_DISABLE_COMPILE_CACHE Ar dir Disable the -.Sy module compile cache -for the Node.js instance +.Sy module compile cache +for the Node.js instance. . .It Ev NODE_DISABLE_COLORS When set to @@ -802,8 +802,8 @@ Any issues encountered on unsupported platforms will not be fixed. . .It Ev NODE_TEST_CONTEXT When set to -.Sq child, -test reporter options will be overridden and test output will be sent to stdout in the TAP format. +.Sq child +, test reporter options will be overridden and test output will be sent to stdout in the TAP format. If any other value is provided, Node.js makes no guarantees about the reporter format used or its stability. . .It Ev NODE_TLS_REJECT_UNAUTHORIZED @@ -813,7 +813,8 @@ TLS certificate validation is disabled. . .It Ev NODE_USE_ENV_PROXY When enabled, Node.js parses the -.Ar HTTP_PROXY, +.Ar HTTP_PROXY +, .Ar HTTPS_PROXY and .Ar NO_PROXY diff --git a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs index cb4b17393325dc..97bf4b19642257 100644 --- a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs +++ b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs @@ -22,7 +22,7 @@ assert(manpageEnvVarNames.size > 0, ); for (const envVarName of cliMdEnvVarNames) { - if (!manpageEnvVarNames.has(envVarName) && !knownEnvVariablesMissingFromManPage.has(envVarName)) { + if (!manpageEnvVarNames.has(envVarName)) { assert.fail(`The "${envVarName}" environment variable (present in \`doc/api/cli.md\`) is missing from the \`doc/node.1\` file`); } manpageEnvVarNames.delete(envVarName); From 23c4b12c05764147ee4e94a48f3ccb0cee362636 Mon Sep 17 00:00:00 2001 From: HumaneLogic Date: Wed, 2 Jul 2025 03:17:01 +0330 Subject: [PATCH 3/4] doc: add missing environment variables to manpage and remove test workaround test: remove fallback for missing manpage env vars --- doc/node.1 | 28 +++++++++++++++++++ .../test-cli-node-cli-manpage-env-vars.mjs | 12 +------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/doc/node.1 b/doc/node.1 index 8a7c81e6973c66..a0750ceceb7aa4 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -693,12 +693,22 @@ disabled. .It Ev NO_COLOR Alias for NODE_DISABLE_COLORS . +.It Ev NODE_COMPILE_CACHE Ar dir +Enable the +.Sy module compile cache +for the Node.js instance. +. .It Ev NODE_DEBUG Ar modules... Comma-separated list of core modules that should print debug information. . .It Ev NODE_DEBUG_NATIVE Ar modules... Comma-separated list of C++ core modules that should print debug information. . +.It Ev NODE_DISABLE_COMPILE_CACHE Ar dir +Disable the +.Sy module compile cache +for the Node.js instance. +. .It Ev NODE_DISABLE_COLORS When set to .Ar 1 , @@ -754,6 +764,9 @@ When set to .Ar 1 , emit pending deprecation warnings. . +.It Ev NODE_PENDING_PIPE_INSTANCES +Set the number of pending pipe instance handles when the pipe server is waiting for connections. This setting applies to Windows only. +. .It Ev NODE_PRESERVE_SYMLINKS When set to .Ar 1 , @@ -787,11 +800,26 @@ the check for a supported platform is skipped during Node.js startup. Node.js might not execute correctly. Any issues encountered on unsupported platforms will not be fixed. . +.It Ev NODE_TEST_CONTEXT +When set to +.Sq child +, test reporter options will be overridden and test output will be sent to stdout in the TAP format. +If any other value is provided, Node.js makes no guarantees about the reporter format used or its stability. +. .It Ev NODE_TLS_REJECT_UNAUTHORIZED When set to .Ar 0 , TLS certificate validation is disabled. . +.It Ev NODE_USE_ENV_PROXY +When enabled, Node.js parses the +.Ar HTTP_PROXY +, +.Ar HTTPS_PROXY +and +.Ar NO_PROXY +environment variables during startup, and tunnels requests over the specified proxy. +. .It Ev NODE_V8_COVERAGE Ar dir When set, Node.js writes JavaScript code coverage information to .Ar dir . diff --git a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs index 703b1f04073615..97bf4b19642257 100644 --- a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs +++ b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs @@ -21,18 +21,8 @@ assert(manpageEnvVarNames.size > 0, 'Unexpectedly not even a single env variable was detected when scanning the `doc/node.1` file' ); -// TODO(dario-piotrowicz): add the missing env variables to the manpage and remove this set -// (refs: https://github.com/nodejs/node/issues/58894) -const knownEnvVariablesMissingFromManPage = new Set([ - 'NODE_COMPILE_CACHE', - 'NODE_DISABLE_COMPILE_CACHE', - 'NODE_PENDING_PIPE_INSTANCES', - 'NODE_TEST_CONTEXT', - 'NODE_USE_ENV_PROXY', -]); - for (const envVarName of cliMdEnvVarNames) { - if (!manpageEnvVarNames.has(envVarName) && !knownEnvVariablesMissingFromManPage.has(envVarName)) { + if (!manpageEnvVarNames.has(envVarName)) { assert.fail(`The "${envVarName}" environment variable (present in \`doc/api/cli.md\`) is missing from the \`doc/node.1\` file`); } manpageEnvVarNames.delete(envVarName); From 5f7c9d0818a917cf453bf688d8aeb3a0dd65f50e Mon Sep 17 00:00:00 2001 From: HumaneLogic Date: Wed, 2 Jul 2025 03:17:01 +0330 Subject: [PATCH 4/4] doc: add missing environment variables to manpage and remove test workaround test: remove fallback for missing manpage env vars test: remove fallback for missing manpage env vars --- doc/node.1 | 28 +++++++++++++++++++ .../test-cli-node-cli-manpage-env-vars.mjs | 12 +------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/doc/node.1 b/doc/node.1 index 8a7c81e6973c66..a0750ceceb7aa4 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -693,12 +693,22 @@ disabled. .It Ev NO_COLOR Alias for NODE_DISABLE_COLORS . +.It Ev NODE_COMPILE_CACHE Ar dir +Enable the +.Sy module compile cache +for the Node.js instance. +. .It Ev NODE_DEBUG Ar modules... Comma-separated list of core modules that should print debug information. . .It Ev NODE_DEBUG_NATIVE Ar modules... Comma-separated list of C++ core modules that should print debug information. . +.It Ev NODE_DISABLE_COMPILE_CACHE Ar dir +Disable the +.Sy module compile cache +for the Node.js instance. +. .It Ev NODE_DISABLE_COLORS When set to .Ar 1 , @@ -754,6 +764,9 @@ When set to .Ar 1 , emit pending deprecation warnings. . +.It Ev NODE_PENDING_PIPE_INSTANCES +Set the number of pending pipe instance handles when the pipe server is waiting for connections. This setting applies to Windows only. +. .It Ev NODE_PRESERVE_SYMLINKS When set to .Ar 1 , @@ -787,11 +800,26 @@ the check for a supported platform is skipped during Node.js startup. Node.js might not execute correctly. Any issues encountered on unsupported platforms will not be fixed. . +.It Ev NODE_TEST_CONTEXT +When set to +.Sq child +, test reporter options will be overridden and test output will be sent to stdout in the TAP format. +If any other value is provided, Node.js makes no guarantees about the reporter format used or its stability. +. .It Ev NODE_TLS_REJECT_UNAUTHORIZED When set to .Ar 0 , TLS certificate validation is disabled. . +.It Ev NODE_USE_ENV_PROXY +When enabled, Node.js parses the +.Ar HTTP_PROXY +, +.Ar HTTPS_PROXY +and +.Ar NO_PROXY +environment variables during startup, and tunnels requests over the specified proxy. +. .It Ev NODE_V8_COVERAGE Ar dir When set, Node.js writes JavaScript code coverage information to .Ar dir . diff --git a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs index 703b1f04073615..97bf4b19642257 100644 --- a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs +++ b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs @@ -21,18 +21,8 @@ assert(manpageEnvVarNames.size > 0, 'Unexpectedly not even a single env variable was detected when scanning the `doc/node.1` file' ); -// TODO(dario-piotrowicz): add the missing env variables to the manpage and remove this set -// (refs: https://github.com/nodejs/node/issues/58894) -const knownEnvVariablesMissingFromManPage = new Set([ - 'NODE_COMPILE_CACHE', - 'NODE_DISABLE_COMPILE_CACHE', - 'NODE_PENDING_PIPE_INSTANCES', - 'NODE_TEST_CONTEXT', - 'NODE_USE_ENV_PROXY', -]); - for (const envVarName of cliMdEnvVarNames) { - if (!manpageEnvVarNames.has(envVarName) && !knownEnvVariablesMissingFromManPage.has(envVarName)) { + if (!manpageEnvVarNames.has(envVarName)) { assert.fail(`The "${envVarName}" environment variable (present in \`doc/api/cli.md\`) is missing from the \`doc/node.1\` file`); } manpageEnvVarNames.delete(envVarName);