From 8332bd281fcc80904bc6600ed36f117fc0c09996 Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Sat, 9 Jul 2022 02:05:18 +0900 Subject: [PATCH] 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 daeyeon.dev@gmail.com --- doc/api/deprecations.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 9dd2f7628d84b0..fb309c317f85a8 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -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 + + + +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 @@ -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