From 431a2f8b7b42bd8c6228623fee1aa2f95f75a91f Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 22 Feb 2021 15:21:49 -0800 Subject: [PATCH] process: upgrade process.binding to runtime deprecation Signed-off-by: James M Snell --- doc/api/deprecations.md | 5 ++++- lib/internal/bootstrap/pre_execution.js | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 11b14015cfb0fb..dbc4db6e5142af 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2084,6 +2084,9 @@ The `produceCachedData` option is deprecated. Use ### DEP0111: `process.binding()` -Type: Documentation-only (supports [`--pending-deprecation`][]) +Type: Runtime `process.binding()` is for use by Node.js internal code only. diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 23b328b14487e4..08012598a44291 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -288,11 +288,11 @@ function initializeDeprecations() { }); } - if (pendingDeprecation) { - process.binding = deprecate(process.binding, - 'process.binding() is deprecated. ' + - 'Please use public APIs instead.', 'DEP0111'); + process.binding = deprecate(process.binding, + 'process.binding() is deprecated. ' + + 'Please use public APIs instead.', 'DEP0111'); + if (pendingDeprecation) { process._tickCallback = deprecate(process._tickCallback, 'process._tickCallback() is deprecated', 'DEP0134');