Skip to content

Commit 3e10bbd

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 4917f44 commit 3e10bbd

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
@@ -3163,6 +3163,20 @@ Use [`diagnostics_channel.subscribe(name, onMessage)`][] or
31633163
[`diagnostics_channel.unsubscribe(name, onMessage)`][] which does the same
31643164
thing instead.
31653165

3166+
### DEP0164: `process.exit([code])` coercion to integer
3167+
3168+
<!-- YAML
3169+
changes:
3170+
- version: REPLACEME
3171+
pr-url: https://github.com/nodejs/node/pull/43738
3172+
description: Documentation-only deprecation.
3173+
-->
3174+
3175+
Type: Documentation-only
3176+
3177+
Implicit coercion of a non-integer `code` parameter in [`process.exit()`][] is
3178+
deprecated. Please use an integer value.
3179+
31663180
[Legacy URL API]: url.md#legacy-url-api
31673181
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
31683182
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -3241,6 +3255,7 @@ thing instead.
32413255
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
32423256
[`os.tmpdir()`]: os.md#ostmpdir
32433257
[`process.env`]: process.md#processenv
3258+
[`process.exit()`]: process.md#processexitcode
32443259
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
32453260
[`process.mainModule`]: process.md#processmainmodule
32463261
[`punycode`]: punycode.md

0 commit comments

Comments
 (0)