From: Jérémy Lal Date: Mon, 20 Apr 2020 07:44:09 +0000 (+0100) Subject: only emit Buffer DEP0005 warning if --pending-deprecation is set X-Git-Tag: archive/raspbian/10.19.0_dfsg1-1+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=159444e9bf3fb2c7ba54648431fad2a42e556a03;p=nodejs.git only emit Buffer DEP0005 warning if --pending-deprecation is set Forwarded: not-needed, upstream wants to do otherwise Last-Update: 2019-01-06 Gbp-Pq: Name temporarily_silence_buffer_deprecations.patch --- diff --git a/lib/buffer.js b/lib/buffer.js index 8f919a52f..a28434944 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -145,8 +145,7 @@ const bufferWarning = 'Buffer() is deprecated due to security and usability ' + function showFlaggedDeprecation() { if (bufferWarningAlreadyEmitted || ++nodeModulesCheckCounter > 10000 || - (!pendingDeprecation && - isInsideNodeModules())) { + !pendingDeprecation) { // We don't emit a warning, because we either: // - Already did so, or // - Already checked too many times whether a call is coming diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 3eda236d2..baf4fe9b4 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -30,6 +30,11 @@ test-net-listen-after-destroying-stdin: PASS,FLAKY ## fails when running with eatmydata test-fs-error-messages: PASS,FLAKY +# pending deprecation for buffer is off +test-buffer-constructor-node-modules-paths : SKIP +test-buffer-constructor-deprecation-error : SKIP +test-buffer-constructor-outside-node-modules : SKIP + # should have been disabled 'cause openssl 1.1.0 test-tls-ecdh-disable : SKIP