File tree Expand file tree Collapse file tree 6 files changed +7
-27
lines changed Expand file tree Collapse file tree 6 files changed +7
-27
lines changed Original file line number Diff line number Diff line change @@ -569,6 +569,9 @@ The `sys` module is deprecated. Please use the [`util`][] module instead.
569569### DEP0026: util.print()
570570<!-- YAML
571571changes:
572+ - version: REPLACEME
573+ pr-url: https://github.com/nodejs/node/pull/xxxxx
574+ description: End-of-Life.
572575 - version:
573576 - v4.8.6
574577 - v6.12.0
@@ -579,10 +582,9 @@ changes:
579582 description: Runtime deprecation.
580583-->
581584
582- Type: Runtime
585+ Type: End-of-Life
583586
584- The [ ` util.print() ` ] [ ] API is deprecated. Please use [ ` console.log() ` ] [ ]
585- instead.
587+ ` util.print() ` has been removed. Please use [ ` console.log() ` ] [ ] instead.
586588
587589<a id =" DEP0027 " ></a >
588590### DEP0027: util.puts()
@@ -2411,7 +2413,6 @@ Setting the TLS ServerName to an IP address is not permitted by
24112413[`util.isSymbol()`]: util.html#util_util_issymbol_object
24122414[`util.isUndefined()`]: util.html#util_util_isundefined_object
24132415[`util.log()`]: util.html#util_util_log_string
2414- [`util.print()`]: util.html#util_util_print_strings
24152416[`util.puts()`]: util.html#util_util_puts_strings
24162417[`util.types`]: util.html#util_util_types
24172418[`util`]: util.html
Original file line number Diff line number Diff line change @@ -2167,16 +2167,6 @@ const util = require('util');
21672167util .log (' Timestamped message.' );
21682168```
21692169
2170- ### util.print([ ...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-
21802170### util.puts([ ...strings] )
21812171<!-- YAML
21822172added: v0.3.0
Original file line number Diff line number Diff line change @@ -326,12 +326,6 @@ function _extend(target, source) {
326326
327327// Deprecated old stuff.
328328
329- function print ( ...args ) {
330- for ( var i = 0 , len = args . length ; i < len ; ++ i ) {
331- process . stdout . write ( String ( args [ i ] ) ) ;
332- }
333- }
334-
335329function puts ( ...args ) {
336330 for ( var i = 0 , len = args . length ; i < len ; ++ i ) {
337331 process . stdout . write ( `${ args [ i ] } \n` ) ;
@@ -447,9 +441,6 @@ module.exports = exports = {
447441 error : deprecate ( error ,
448442 'util.error is deprecated. Use console.error instead.' ,
449443 'DEP0029' ) ,
450- print : deprecate ( print ,
451- 'util.print is deprecated. Use console.log instead.' ,
452- 'DEP0026' ) ,
453444 puts : deprecate ( puts ,
454445 'util.puts is deprecated. Use console.log instead.' ,
455446 'DEP0027' )
Original file line number Diff line number Diff line change 2020// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121
2222( function ( ) {
23- require ( 'util' ) . print ( 'Loaded successfully!' ) ;
23+ process . stdout . write ( 'Loaded successfully!' ) ;
2424} ) ( ) ;
2525
Original file line number Diff line number Diff line change 2222( function ( ) {
2323 const fs = require ( 'fs' ) ;
2424 if ( fs . readFile ) {
25- require ( 'util' ) . print ( 'fs loaded successfully' ) ;
25+ process . stdout . write ( 'fs loaded successfully' ) ;
2626 }
2727} ) ( ) ;
2828
Original file line number Diff line number Diff line change @@ -145,13 +145,11 @@ assert.strictEqual(util.isFunction(), false);
145145assert . strictEqual ( util . isFunction ( 'string' ) , false ) ;
146146
147147common . expectWarning ( 'DeprecationWarning' , [
148- [ 'util.print is deprecated. Use console.log instead.' , 'DEP0026' ] ,
149148 [ 'util.puts is deprecated. Use console.log instead.' , 'DEP0027' ] ,
150149 [ 'util.debug is deprecated. Use console.error instead.' , 'DEP0028' ] ,
151150 [ 'util.error is deprecated. Use console.error instead.' , 'DEP0029' ]
152151] ) ;
153152
154- util . print ( 'test' ) ;
155153util . puts ( 'test' ) ;
156154util . debug ( 'test' ) ;
157155util . error ( 'test' ) ;
You can’t perform that action at this time.
0 commit comments