Skip to content

Commit fe832a0

Browse files
daeyeonaduh95
authored andcommittedOct 11, 2022
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 <daeyeon.dev@gmail.com> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #44714 Refs: #44712 Refs: #43738 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 2cee039 commit fe832a0

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
@@ -3120,19 +3120,25 @@ Use [`diagnostics_channel.subscribe(name, onMessage)`][] or
31203120
[`diagnostics_channel.unsubscribe(name, onMessage)`][] which does the same
31213121
thing instead.
31223122

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

31253125
<!-- YAML
31263126
changes:
3127+
- version: REPLACEME
3128+
pr-url: https://github.com/nodejs/node/pull/44714
3129+
description: Documentation-only deprecation of `process.exitCode` integer
3130+
coercion.
31273131
- version: v16.17.0
31283132
pr-url: https://github.com/nodejs/node/pull/43738
3129-
description: Documentation-only deprecation.
3133+
description: Documentation-only deprecation of `process.exit(code)` integer
3134+
coercion.
31303135
-->
31313136

31323137
Type: Documentation-only
31333138

3134-
`code` values other than `undefined`, `null`, integer numbers and integer
3135-
strings (e.g., '1') are deprecated as parameter in [`process.exit()`][].
3139+
Values other than `undefined`, `null`, integer numbers, and integer strings
3140+
(e.g., `'1'`) are deprecated as value for the `code` parameter in
3141+
[`process.exit()`][] and as value to assign to [`process.exitCode`][].
31363142

31373143
### DEP0165: `--trace-atomics-wait`
31383144

@@ -3246,6 +3252,7 @@ rely on these groups should evaluate using stronger MODP groups instead.
32463252
[`os.tmpdir()`]: os.md#ostmpdir
32473253
[`process.env`]: process.md#processenv
32483254
[`process.exit()`]: process.md#processexitcode
3255+
[`process.exitCode`]: process.md#processexitcode_1
32493256
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
32503257
[`process.mainModule`]: process.md#processmainmodule
32513258
[`punycode`]: punycode.md

0 commit comments

Comments
 (0)
Please sign in to comment.