Skip to content

Commit

Permalink
doc: deprecate coercion to integer in process.exit
Browse files Browse the repository at this point in the history
This warns of invalid uses of process.exit([code]) and recommends the
correct practice.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
  • Loading branch information
daeyeon committed Jul 8, 2022
1 parent adef64c commit 8332bd2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3145,6 +3145,20 @@ parameter in [`fs.write()`][], [`fs.writeFile()`][], [`fs.appendFile()`][],
[`fs.writeFileSync()`][], and [`fs.appendFileSync()`][] is deprecated.
Convert them to primitive strings.

### DEP0163: `process.exit([code])` coercion to integer

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/43738
description: Documentation-only deprecation.
-->

Type: Documentation-only

Implicit coercion of a non-integer `code` parameter in [`process.exit()`][] is
deprecated. Please use an integer value.

[Legacy URL API]: url.md#legacy-url-api
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
Expand Down Expand Up @@ -3221,6 +3235,7 @@ Convert them to primitive strings.
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
[`os.tmpdir()`]: os.md#ostmpdir
[`process.env`]: process.md#processenv
[`process.exit()`]: process.md#processexitcode
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
[`process.mainModule`]: process.md#processmainmodule
[`punycode`]: punycode.md
Expand Down

0 comments on commit 8332bd2

Please sign in to comment.