child_process: move _channel to end-of-life · nodejs/node@df16f0f · GitHub
Skip to content

Commit df16f0f

Browse files
authored
child_process: move _channel to end-of-life
The `._channel` property has been deprecated for many years now. It's time to remove it. PR-URL: #58527 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 2be863b commit df16f0f

3 files changed

Lines changed: 5 additions & 20 deletions

File tree

doc/api/deprecations.md

Lines changed: 4 additions & 1 deletion

lib/internal/child_process.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const {
77
ArrayPrototypeSlice,
88
FunctionPrototype,
99
FunctionPrototypeCall,
10-
ObjectDefineProperty,
1110
ObjectSetPrototypeOf,
1211
ReflectApply,
1312
StringPrototypeSlice,
@@ -56,7 +55,7 @@ const { TTY } = internalBinding('tty_wrap');
5655
const { UDP } = internalBinding('udp_wrap');
5756
const SocketList = require('internal/socket_list');
5857
const { owner_symbol } = require('internal/async_hooks').symbols;
59-
const { convertToValidSignal, deprecate } = require('internal/util');
58+
const { convertToValidSignal } = require('internal/util');
6059
const { isArrayBufferView } = require('internal/util/types');
6160
const spawn_sync = internalBinding('spawn_sync');
6261
const { kStateSymbol } = require('internal/dgram');
@@ -575,27 +574,12 @@ class Control extends EventEmitter {
575574
}
576575
}
577576

578-
const channelDeprecationMsg = '_channel is deprecated. ' +
579-
'Use ChildProcess.channel instead.';
580-
581577
let serialization;
582578
function setupChannel(target, channel, serializationMode) {
583579
const control = new Control(channel);
584580
target.channel = control;
585581
target[kChannelHandle] = channel;
586582

587-
ObjectDefineProperty(target, '_channel', {
588-
__proto__: null,
589-
get: deprecate(() => {
590-
return target.channel;
591-
}, channelDeprecationMsg, 'DEP0129'),
592-
set: deprecate((val) => {
593-
target.channel = val;
594-
}, channelDeprecationMsg, 'DEP0129'),
595-
configurable: true,
596-
enumerable: false,
597-
});
598-
599583
target._handleQueue = null;
600584
target._pendingMessage = null;
601585

test/parallel/test-child-process-fork.js

Lines changed: 0 additions & 2 deletions

0 commit comments

Comments
 (0)