Skip to content

Commit

Permalink
lib: move DEP0023 to end of life
Browse files Browse the repository at this point in the history
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: #25280
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
cjihrig committed Jan 6, 2019
1 parent 6c01621 commit 853bee0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 6 additions & 3 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ The `os.tmpDir()` API is deprecated. Please use [`os.tmpdir()`][] instead.
### DEP0023: os.getNetworkInterfaces()
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/25280
description: End-of-Life.
- version:
- v4.8.6
- v6.12.0
Expand All @@ -523,10 +526,10 @@ changes:
description: Runtime deprecation.
-->

Type: Runtime
Type: End-of-Life

The `os.getNetworkInterfaces()` method is deprecated. Please use the
[`os.networkInterfaces`][] property instead.
[`os.networkInterfaces()`][] method instead.

<a id="DEP0024"></a>
### DEP0024: REPLServer.prototype.convertToContext()
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions lib/os.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -269,9 +266,6 @@ module.exports = {
uptime: getUptime,

// Deprecated APIs
getNetworkInterfaces: deprecate(getInterfaceAddresses,
getNetworkInterfacesDepMsg,
'DEP0023'),
tmpDir: deprecate(tmpdir, tmpDirDeprecationMsg, 'DEP0022')
};

Expand Down

0 comments on commit 853bee0

Please sign in to comment.