Skip to content

Commit abfeed8

Browse files
daeyeonaduh95
andauthored
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]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #44714 Refs: #44712 Refs: #43738 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 7e0097d commit abfeed8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

doc/api/deprecations.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -3171,21 +3171,27 @@ 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: Documentation-only deprecation of `process.exitCode` integer
3181+
coercion.
31783182
- version:
31793183
- v18.7.0
31803184
- v16.17.0
31813185
pr-url: https://github.com/nodejs/node/pull/43738
3182-
description: Documentation-only deprecation.
3186+
description: Documentation-only deprecation of `process.exit(code)` integer
3187+
coercion.
31833188
-->
31843189

31853190
Type: Documentation-only
31863191

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

31903196
### DEP0165: `--trace-atomics-wait`
31913197

@@ -3341,6 +3347,7 @@ Node-API callbacks.
33413347
[`os.tmpdir()`]: os.md#ostmpdir
33423348
[`process.env`]: process.md#processenv
33433349
[`process.exit()`]: process.md#processexitcode
3350+
[`process.exitCode`]: process.md#processexitcode_1
33443351
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
33453352
[`process.mainModule`]: process.md#processmainmodule
33463353
[`punycode`]: punycode.md

0 commit comments

Comments
 (0)