From f77a1cef1549a4dd86c44e79301995cd317bd13a Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Sat, 24 Sep 2022 21:43:59 +0900 Subject: [PATCH] doc: update the deprecation for exit code to clarify its scope This updates the deprecation, DEP0164, to clarify its scope. Previously, `process.exitCode` wasn't mentioned but it needs to be applied with the same deprecation because its meaning is the same as the `code` value and it's overridden with the `code` value in `process.exit()`. Signed-off-by: Daeyeon Jeong Co-authored-by: Antoine du Hamel PR-URL: https://github.com/nodejs/node/pull/44714 Refs: https://github.com/nodejs/node/pull/44712 Refs: https://github.com/nodejs/node/pull/43738 Reviewed-By: Luigi Pinca Reviewed-By: Darshan Sen Reviewed-By: Antoine du Hamel --- doc/api/deprecations.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index c4dc43b0ef1166..e7c931bef47065 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -3120,19 +3120,25 @@ Use [`diagnostics_channel.subscribe(name, onMessage)`][] or [`diagnostics_channel.unsubscribe(name, onMessage)`][] which does the same thing instead. -### DEP0164: `process.exit([code])` coercion to integer +### DEP0164: `process.exit(code)`, `process.exitCode` coercion to integer Type: Documentation-only -`code` values other than `undefined`, `null`, integer numbers and integer -strings (e.g., '1') are deprecated as parameter in [`process.exit()`][]. +Values other than `undefined`, `null`, integer numbers, and integer strings +(e.g., `'1'`) are deprecated as value for the `code` parameter in +[`process.exit()`][] and as value to assign to [`process.exitCode`][]. ### DEP0165: `--trace-atomics-wait` @@ -3246,6 +3252,7 @@ rely on these groups should evaluate using stronger MODP groups instead. [`os.tmpdir()`]: os.md#ostmpdir [`process.env`]: process.md#processenv [`process.exit()`]: process.md#processexitcode +[`process.exitCode`]: process.md#processexitcode_1 [`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo [`process.mainModule`]: process.md#processmainmodule [`punycode`]: punycode.md