lib: move DEP0027 to end of life · nodejs/node@10df21b (original) (raw)

4 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -590,6 +590,9 @@ Type: End-of-Life
590 590 ### DEP0027: util.puts()
591 591 <!-- YAML
592 592 changes:
593 + - version: REPLACEME
594 + pr-url: https://github.com/nodejs/node/pull/xxxxx
595 + description: End-of-Life.
593 596 - version:
594 597 - v4.8.6
595 598 - v6.12.0
@@ -600,9 +603,9 @@ changes:
600 603 description: Runtime deprecation.
601 604 -->
602 605
603 -Type: Runtime
606 +Type: End-of-Life
604 607
605 -The [`util.puts()`][] API is deprecated. Please use [`console.log()`][] instead.
608 +`util.puts()` has been removed. Please use [`console.log()`][] instead.
606 609
607 610 <a id="DEP0028"></a>
608 611 ### DEP0028: util.debug()
@@ -2413,7 +2416,6 @@ Setting the TLS ServerName to an IP address is not permitted by
2413 2416 [`util.isSymbol()`]: util.html#util_util_issymbol_object
2414 2417 [`util.isUndefined()`]: util.html#util_util_isundefined_object
2415 2418 [`util.log()`]: util.html#util_util_log_string
2416 -[`util.puts()`]: util.html#util_util_puts_strings
2417 2419 [`util.types`]: util.html#util_util_types
2418 2420 [`util`]: util.html
2419 2421 [`worker.exitedAfterDisconnect`]: cluster.html#cluster_worker_exitedafterdisconnect
Original file line number Diff line number Diff line change
@@ -2167,16 +2167,6 @@ const util = require('util');
2167 2167 util.log('Timestamped message.');
2168 2168 ```
2169 2169
2170 -### util.puts([...strings])
2171 -<!-- YAML
2172 -added: v0.3.0
2173 -deprecated: v0.11.3
2174 --->
2175 -
2176 -> Stability: 0 - Deprecated: Use [`console.log()`][] instead.
2177 -
2178 -Deprecated predecessor of `console.log`.
2179 -
2180 2170 [`'uncaughtException'`]: process.html#process_event_uncaughtexception
2181 2171 [`'warning'`]: process.html#process_event_warning
2182 2172 [`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`.
2207 2197 [`WebAssembly.Module`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/WebAssembly/Module
2208 2198 [`assert.deepStrictEqual()`]: assert.html#assert_assert_deepstrictequal_actual_expected_message
2209 2199 [`console.error()`]: console.html#console_console_error_data_args
2210 -[`console.log()`]: console.html#console_console_log_data_args
2211 2200 [`target` and `handler`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Proxy#Terminology
2212 2201 [`util.format()`]: #util_util_format_format_args
2213 2202 [`util.inspect()`]: #util_util_inspect_object_options
Original file line number Diff line number Diff line change
@@ -326,12 +326,6 @@ function _extend(target, source) {
326 326
327 327 // Deprecated old stuff.
328 328
329 -function puts(...args) {
330 -for (var i = 0, len = args.length; i < len; ++i) {
331 -process.stdout.write(`${args[i]}\n`);
332 -}
333 -}
334 -
335 329 function debug(x) {
336 330 process.stderr.write(`DEBUG: ${x}\n`);
337 331 }
@@ -440,8 +434,5 @@ module.exports = exports = {
440 434 'DEP0028'),
441 435 error: deprecate(error,
442 436 'util.error is deprecated. Use console.error instead.',
443 -'DEP0029'),
444 -puts: deprecate(puts,
445 -'util.puts is deprecated. Use console.log instead.',
446 -'DEP0027')
437 +'DEP0029')
447 438 };
Original file line number Diff line number Diff line change
@@ -145,12 +145,10 @@ assert.strictEqual(util.isFunction(), false);
145 145 assert.strictEqual(util.isFunction('string'), false);
146 146
147 147 common.expectWarning('DeprecationWarning', [
148 -['util.puts is deprecated. Use console.log instead.', 'DEP0027'],
149 148 ['util.debug is deprecated. Use console.error instead.', 'DEP0028'],
150 149 ['util.error is deprecated. Use console.error instead.', 'DEP0029']
151 150 ]);
152 151
153 -util.puts('test');
154 152 util.debug('test');
155 153 util.error('test');
156 154