Skip to content

Commit 8332bd2

Browse files
committed
doc: deprecate coercion to integer in process.exit
This warns of invalid uses of process.exit([code]) and recommends the correct practice. Signed-off-by: Daeyeon Jeong [email protected]
1 parent adef64c commit 8332bd2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/api/deprecations.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,6 +3145,20 @@ parameter in [`fs.write()`][], [`fs.writeFile()`][], [`fs.appendFile()`][],
31453145
[`fs.writeFileSync()`][], and [`fs.appendFileSync()`][] is deprecated.
31463146
Convert them to primitive strings.
31473147

3148+
### DEP0163: `process.exit([code])` coercion to integer
3149+
3150+
<!-- YAML
3151+
changes:
3152+
- version: REPLACEME
3153+
pr-url: https://github.com/nodejs/node/pull/43738
3154+
description: Documentation-only deprecation.
3155+
-->
3156+
3157+
Type: Documentation-only
3158+
3159+
Implicit coercion of a non-integer `code` parameter in [`process.exit()`][] is
3160+
deprecated. Please use an integer value.
3161+
31483162
[Legacy URL API]: url.md#legacy-url-api
31493163
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
31503164
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -3221,6 +3235,7 @@ Convert them to primitive strings.
32213235
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
32223236
[`os.tmpdir()`]: os.md#ostmpdir
32233237
[`process.env`]: process.md#processenv
3238+
[`process.exit()`]: process.md#processexitcode
32243239
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
32253240
[`process.mainModule`]: process.md#processmainmodule
32263241
[`punycode`]: punycode.md

0 commit comments

Comments
 (0)