From 957084ad62e47df5d9f614f3b3841b17b9e0a3ff Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 2 Jan 2020 14:45:24 -0800 Subject: [PATCH 1/2] os: move tmpDir() to EOL The tmpDir alias was deprecated in 7.0.0 --- doc/api/deprecations.md | 8 ++++++-- lib/os.js | 6 ------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index f6fec7d1ba0f61..cef37a79d4373b 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -508,14 +508,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 2cce09211c3fe8..ceb22bbf25808d 100644 --- a/lib/os.js +++ b/lib/os.js @@ -83,9 +83,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 +282,6 @@ module.exports = { type: getOSType, userInfo, uptime: getUptime, - - // Deprecated APIs - tmpDir: deprecate(tmpdir, tmpDirDeprecationMsg, 'DEP0022') }; ObjectDefineProperties(module.exports, { From 27bca6e9472b6850ab59fbec42262ece20c6b6b3 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sun, 2 Feb 2020 09:27:27 -0800 Subject: [PATCH 2/2] fixup! os: move tmpDir() to EOL --- lib/os.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/os.js b/lib/os.js index ceb22bbf25808d..f986b1cf87866d 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 {