From 853bee0acfb79ce64202c4e23dc4343b491fa864 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 29 Dec 2018 20:30:48 -0500 Subject: [PATCH] lib: move DEP0023 to end of life MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit moves DEP0023 to end of life status. The os.getNetworkInterfaces() method was introduced in the unstable 0.5.0 release, and runtime deprecated in 0.6.0, the first stable release of its existence. This commit also fixes an inaccuracy in the deprecation, as the replacement (os.networkInterfaces()) is actually a method. PR-URL: https://github.com/nodejs/node/pull/25280 Reviewed-By: Ruben Bridgewater Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Anto Aravinth Reviewed-By: James M Snell Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Matteo Collina --- doc/api/deprecations.md | 9 ++++++--- lib/os.js | 6 ------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index c4fbacc0e0ae46..547d0e32bca958 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -513,6 +513,9 @@ The `os.tmpDir()` API is deprecated. Please use [`os.tmpdir()`][] instead. ### DEP0023: os.getNetworkInterfaces() -Type: Runtime +Type: End-of-Life The `os.getNetworkInterfaces()` method is deprecated. Please use the -[`os.networkInterfaces`][] property instead. +[`os.networkInterfaces()`][] method instead. ### DEP0024: REPLServer.prototype.convertToContext() @@ -2366,7 +2369,7 @@ Setting the TLS ServerName to an IP address is not permitted by [`http.request()`]: http.html#http_http_request_options_callback [`https.get()`]: https.html#https_https_get_options_callback [`https.request()`]: https.html#https_https_request_options_callback -[`os.networkInterfaces`]: os.html#os_os_networkinterfaces +[`os.networkInterfaces()`]: os.html#os_os_networkinterfaces [`os.tmpdir()`]: os.html#os_os_tmpdir [`process.env`]: process.html#process_process_env [`punycode`]: punycode.html diff --git a/lib/os.js b/lib/os.js index 602db10e9273c9..149289607d4952 100644 --- a/lib/os.js +++ b/lib/os.js @@ -78,9 +78,6 @@ const kEndianness = isBigEndian ? 'BE' : 'LE'; const tmpDirDeprecationMsg = 'os.tmpDir() is deprecated. Use os.tmpdir() instead.'; -const getNetworkInterfacesDepMsg = - 'os.getNetworkInterfaces is deprecated. Use os.networkInterfaces instead.'; - const avgValues = new Float64Array(3); function loadavg() { @@ -269,9 +266,6 @@ module.exports = { uptime: getUptime, // Deprecated APIs - getNetworkInterfaces: deprecate(getInterfaceAddresses, - getNetworkInterfacesDepMsg, - 'DEP0023'), tmpDir: deprecate(tmpdir, tmpDirDeprecationMsg, 'DEP0022') };