only emit Buffer DEP0005 warning if --pending-deprecation is set
authorJérémy Lal <kapouer@melix.org>
Mon, 20 Apr 2020 07:44:09 +0000 (08:44 +0100)
committerJérémy Lal <kapouer@melix.org>
Mon, 20 Apr 2020 07:44:09 +0000 (08:44 +0100)
Forwarded: not-needed, upstream wants to do otherwise
Last-Update: 2019-01-06

Gbp-Pq: Name temporarily_silence_buffer_deprecations.patch

lib/buffer.js
test/parallel/parallel.status

index 8f919a52f1d3779de0a23f1d619c09702843825a..a2843494456c8935763fa9936a3c555b1d75e88d 100644 (file)
@@ -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
index 3eda236d2739cff5c01ac90f1100f541cccf1b7d..baf4fe9b4fd64bfb69d0dd92232c869acbfc830f 100644 (file)
@@ -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