Skip to content

Commit 4ceb9d5

Browse files
committed
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 [email protected]
1 parent 91020db commit 4ceb9d5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

doc/api/deprecations.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3171,10 +3171,13 @@ Use [`diagnostics_channel.subscribe(name, onMessage)`][] or
31713171
[`diagnostics_channel.unsubscribe(name, onMessage)`][] which does the same
31723172
thing instead.
31733173

3174-
### DEP0164: `process.exit([code])` coercion to integer
3174+
### DEP0164: `process.exit([code])`, `process.exitCode` coercion to integer
31753175

31763176
<!-- YAML
31773177
changes:
3178+
- version: REPLACEME
3179+
pr-url: https://github.com/nodejs/node/pull/44714
3180+
description: Added `process.exitCode`.
31783181
- version:
31793182
- v18.7.0
31803183
- v16.17.0
@@ -3184,8 +3187,9 @@ changes:
31843187

31853188
Type: Documentation-only
31863189

3187-
`code` values other than `undefined`, `null`, integer numbers and integer
3188-
strings (e.g., '1') are deprecated as parameter in [`process.exit()`][].
3190+
Values other than `undefined`, `null`, integer numbers, and integer strings
3191+
(e.g., `'1'`) are deprecated as value for the `code` parameter in
3192+
[`process.exit()`][] and as value to assign to [`process.exitCode`][].
31893193

31903194
### DEP0165: `--trace-atomics-wait`
31913195

@@ -3319,6 +3323,7 @@ rely on these groups should evaluate using stronger MODP groups instead.
33193323
[`os.tmpdir()`]: os.md#ostmpdir
33203324
[`process.env`]: process.md#processenv
33213325
[`process.exit()`]: process.md#processexitcode
3326+
[`process.exitCode`]: process.md#processexitcode_1
33223327
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
33233328
[`process.mainModule`]: process.md#processmainmodule
33243329
[`punycode`]: punycode.md

0 commit comments

Comments
 (0)