summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-01-07 12:53:58 -0500
committercjihrig <cjihrig@gmail.com>2019-01-10 09:00:12 -0500
commit10df21b0714daae8ec9b1507e77bab7ae07e8fa7 (patch)
tree79cf6a3c47333bf848a8aff16c07588d57316e4c
parent2d578ad996de13acbe1227a8565c89dcd95d8bc8 (diff)
downloadnode-new-10df21b0714daae8ec9b1507e77bab7ae07e8fa7.tar.gz
lib: move DEP0027 to end of life
PR-URL: https://github.com/nodejs/node/pull/25377 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-rw-r--r--doc/api/deprecations.md8
-rw-r--r--doc/api/util.md11
-rw-r--r--lib/util.js11
-rw-r--r--test/parallel/test-util.js2
4 files changed, 6 insertions, 26 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index 63faf07626..b6ec7fb721 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -590,6 +590,9 @@ Type: End-of-Life
### DEP0027: util.puts()
<!-- YAML
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/xxxxx
+ description: End-of-Life.
- version:
- v4.8.6
- v6.12.0
@@ -600,9 +603,9 @@ changes:
description: Runtime deprecation.
-->
-Type: Runtime
+Type: End-of-Life
-The [`util.puts()`][] API is deprecated. Please use [`console.log()`][] instead.
+`util.puts()` has been removed. Please use [`console.log()`][] instead.
<a id="DEP0028"></a>
### DEP0028: util.debug()
@@ -2413,7 +2416,6 @@ Setting the TLS ServerName to an IP address is not permitted by
[`util.isSymbol()`]: util.html#util_util_issymbol_object
[`util.isUndefined()`]: util.html#util_util_isundefined_object
[`util.log()`]: util.html#util_util_log_string
-[`util.puts()`]: util.html#util_util_puts_strings
[`util.types`]: util.html#util_util_types
[`util`]: util.html
[`worker.exitedAfterDisconnect`]: cluster.html#cluster_worker_exitedafterdisconnect
diff --git a/doc/api/util.md b/doc/api/util.md
index db25a0be05..cdfaf4bdca 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -2167,16 +2167,6 @@ const util = require('util');
util.log('Timestamped message.');
```
-### util.puts([...strings])
-<!-- YAML
-added: v0.3.0
-deprecated: v0.11.3
--->
-
-> Stability: 0 - Deprecated: Use [`console.log()`][] instead.
-
-Deprecated predecessor of `console.log`.
-
[`'uncaughtException'`]: process.html#process_event_uncaughtexception
[`'warning'`]: process.html#process_event_warning
[`Array.isArray()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
@@ -2207,7 +2197,6 @@ Deprecated predecessor of `console.log`.
[`WebAssembly.Module`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module
[`assert.deepStrictEqual()`]: assert.html#assert_assert_deepstrictequal_actual_expected_message
[`console.error()`]: console.html#console_console_error_data_args
-[`console.log()`]: console.html#console_console_log_data_args
[`target` and `handler`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#Terminology
[`util.format()`]: #util_util_format_format_args
[`util.inspect()`]: #util_util_inspect_object_options
diff --git a/lib/util.js b/lib/util.js
index e0f83efdba..1cb113bad1 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -326,12 +326,6 @@ function _extend(target, source) {
// Deprecated old stuff.
-function puts(...args) {
- for (var i = 0, len = args.length; i < len; ++i) {
- process.stdout.write(`${args[i]}\n`);
- }
-}
-
function debug(x) {
process.stderr.write(`DEBUG: ${x}\n`);
}
@@ -440,8 +434,5 @@ module.exports = exports = {
'DEP0028'),
error: deprecate(error,
'util.error is deprecated. Use console.error instead.',
- 'DEP0029'),
- puts: deprecate(puts,
- 'util.puts is deprecated. Use console.log instead.',
- 'DEP0027')
+ 'DEP0029')
};
diff --git a/test/parallel/test-util.js b/test/parallel/test-util.js
index 78d1f43f4a..54aaa4266f 100644
--- a/test/parallel/test-util.js
+++ b/test/parallel/test-util.js
@@ -145,12 +145,10 @@ assert.strictEqual(util.isFunction(), false);
assert.strictEqual(util.isFunction('string'), false);
common.expectWarning('DeprecationWarning', [
- ['util.puts is deprecated. Use console.log instead.', 'DEP0027'],
['util.debug is deprecated. Use console.error instead.', 'DEP0028'],
['util.error is deprecated. Use console.error instead.', 'DEP0029']
]);
-util.puts('test');
util.debug('test');
util.error('test');