From 4a1fef24f5befed4d24fef909aba8eed3fb21cae Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 27 Jul 2018 08:54:53 -0700 Subject: [PATCH 1/4] doc: documentation deprecation of process.binding This is the first step in a long process of deprecating `process.binding()` and replacing it with `internalBinding()`. Eventually, once we have replaced internal uses of `process.binding()` with `internalBinding()`, we can escalate to a runtime deprecation and eventual end-of-life. --- doc/api/deprecations.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index ed04532f19dd7a..3ad54d553940bd 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -999,6 +999,15 @@ Type: Documentation-only The option `produceCachedData` has been deprecated. Use [`script.createCachedData()`][] instead. + +### DEP00XX: process.binding() + +Type: Documentation-only + +The `process.binding()` API is intended for use strictly by Node.js internal +code to provide a bridge between Node.js' JavaScript and native code layer. +Use of `process.binding()` by user-land code is unsupported. + [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size [`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array From 6688e010bfda423478171ad18b4477855f79080d Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sun, 29 Jul 2018 10:26:21 -0700 Subject: [PATCH 2/4] [Squash] Nits --- doc/api/deprecations.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 3ad54d553940bd..1fc6f0a80e8a0d 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -1004,9 +1004,8 @@ The option `produceCachedData` has been deprecated. Use Type: Documentation-only -The `process.binding()` API is intended for use strictly by Node.js internal -code to provide a bridge between Node.js' JavaScript and native code layer. -Use of `process.binding()` by user-land code is unsupported. +The `process.binding()` API is intended for use by Node.js internal only +code. Use of `process.binding()` by userland code is unsupported. [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size From ee33cee12e112f22d20581db589346e46a4ed060 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 29 Jul 2018 12:53:59 -0700 Subject: [PATCH 3/4] fix minor word ordering (probable copy/paste error?) --- doc/api/deprecations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 1fc6f0a80e8a0d..eec790d41a6d52 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -1004,8 +1004,8 @@ The option `produceCachedData` has been deprecated. Use Type: Documentation-only -The `process.binding()` API is intended for use by Node.js internal only -code. Use of `process.binding()` by userland code is unsupported. +The `process.binding()` API is intended for use by Node.js internal code +only. Use of `process.binding()` by userland code is unsupported. [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size From dd83b73b32f55353841b7f4327e27afec4bb3ae6 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Wed, 1 Aug 2018 09:39:44 -0400 Subject: [PATCH 4/4] [Squash] Add note to DEP0103 --- doc/api/deprecations.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index eec790d41a6d52..3f8019b18ef689 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -929,6 +929,9 @@ Type: Documentation-only (supports [`--pending-deprecation`][]) Using `process.binding()` in general should be avoided. The type checking methods in particular can be replaced by using [`util.types`][]. +This deprecation has been superseded by the deprecation of the +`process.binding()` API ([DEP00XX](#DEP00XX)). + ### DEP0104: process.env string coercion