Skip to content

Commit 54b84f3

Browse files
Trotttargos
authored andcommitted
buffer: remove "new" from deprecation message
This change removes "new" as a description for `Buffer` construction methods. They are arguably not "new" anymore and they certainly won't be "new" anymore at some point. PR-URL: #19687 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Nikolai Vavilov <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b80d169 commit 54b84f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function alignPool() {
127127
var bufferWarn = true;
128128
const bufferWarning = 'The Buffer() and new Buffer() constructors are not ' +
129129
'recommended for use due to security and usability ' +
130-
'concerns. Please use the new Buffer.alloc(), ' +
130+
'concerns. Please use the Buffer.alloc(), ' +
131131
'Buffer.allocUnsafe(), or Buffer.from() construction ' +
132132
'methods instead.';
133133

test/parallel/test-buffer-pending-deprecation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const common = require('../common');
55

66
const bufferWarning = 'The Buffer() and new Buffer() constructors are not ' +
77
'recommended for use due to security and usability ' +
8-
'concerns. Please use the new Buffer.alloc(), ' +
8+
'concerns. Please use the Buffer.alloc(), ' +
99
'Buffer.allocUnsafe(), or Buffer.from() construction ' +
1010
'methods instead.';
1111

0 commit comments

Comments
 (0)