From ab4115f17cf2859f336b3c0588d2bf9eca0e65b8 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 2 Jan 2020 14:45:24 -0800 Subject: [PATCH] os: move tmpDir() to EOL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tmpDir alias was deprecated in 7.0.0 PR-URL: https://github.com/nodejs/node/pull/31169 Reviewed-By: Luigi Pinca Reviewed-By: Michaël Zasso Reviewed-By: Tobias Nießen Reviewed-By: Matteo Collina --- doc/api/deprecations.md | 8 ++++++-- lib/os.js | 7 ------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index c225455b24..154b9c667d 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -519,14 +519,18 @@ The `Server.listenFD()` method was deprecated and removed. Please use ### DEP0022: `os.tmpDir()` -Type: Runtime +Type: End-of-Life -The `os.tmpDir()` API is deprecated. Please use [`os.tmpdir()`][] instead. +The `os.tmpDir()` API iws deprecated in Node.js 7.0.0 and has since been +removed. Please use [`os.tmpdir()`][] instead. ### DEP0023: `os.getNetworkInterfaces()` diff --git a/lib/os.js b/lib/os.js index 2cce09211c..f986b1cf87 100644 --- a/lib/os.js +++ b/lib/os.js @@ -28,7 +28,6 @@ const { const { safeGetenv } = internalBinding('credentials'); const constants = internalBinding('constants').os; -const { deprecate } = require('internal/util'); const isWindows = process.platform === 'win32'; const { @@ -83,9 +82,6 @@ getUptime[SymbolToPrimitive] = () => getUptime(); const kEndianness = isBigEndian ? 'BE' : 'LE'; -const tmpDirDeprecationMsg = - 'os.tmpDir() is deprecated. Use os.tmpdir() instead.'; - const avgValues = new Float64Array(3); function loadavg() { @@ -285,9 +281,6 @@ module.exports = { type: getOSType, userInfo, uptime: getUptime, - - // Deprecated APIs - tmpDir: deprecate(tmpdir, tmpDirDeprecationMsg, 'DEP0022') }; ObjectDefineProperties(module.exports, {