summaryrefslogtreecommitdiff
path: root/lib/internal/bootstrap/pre_execution.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-02-25 22:28:35 +0100
committerAnna Henningsen <anna@addaleax.net>2019-03-11 10:04:15 +0000
commit148254744134793cd6556c9749658f3872b03d00 (patch)
tree3d1bd0568e8c0248873854f948114d6fbb821428 /lib/internal/bootstrap/pre_execution.js
parent137d3d2734a6f6e891ebab68ec6da16c8a6b397c (diff)
downloadandroid-node-v8-148254744134793cd6556c9749658f3872b03d00.tar.gz
android-node-v8-148254744134793cd6556c9749658f3872b03d00.tar.bz2
android-node-v8-148254744134793cd6556c9749658f3872b03d00.zip
process: add --pending-deprecation to `process.binding()`
Print a deprecation warning for `process.binding()` when using `--pending-deprecation`. PR-URL: https://github.com/nodejs/node/pull/26500 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Diffstat (limited to 'lib/internal/bootstrap/pre_execution.js')
-rw-r--r--lib/internal/bootstrap/pre_execution.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index 30c0d89a4a..936dc4673c 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -195,6 +195,12 @@ function initializeDeprecations() {
value: noBrowserGlobals
});
}
+
+ if (pendingDeprecation) {
+ process.binding = deprecate(process.binding,
+ 'process.binding() is deprecated. ' +
+ 'Please use public APIs instead.', 'DEP0111');
+ }
}
function setupChildProcessIpcChannel() {