Skip to content

Commit

Permalink
lib: move DEP0006 to end of life
Browse files Browse the repository at this point in the history
This commit moves DEP0006, which has been runtime deprecated
since Node 0.11, to end of life status.

PR-URL: #25279
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
  • Loading branch information
cjihrig committed Jan 4, 2019
1 parent 7d453ff commit d4934ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 67 deletions.
5 changes: 4 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ outside `node_modules` in order to better target developers, rather than users.
### DEP0006: child\_process options.customFds
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/25279
description: End-of-Life.
- version:
- v4.8.6
- v6.12.0
Expand All @@ -171,7 +174,7 @@ changes:
description: Documentation-only deprecation.
-->

Type: Runtime
Type: End-of-Life

Within the [`child_process`][] module's `spawn()`, `fork()`, and `exec()`
methods, the `options.customFds` option is deprecated. The `options.stdio`
Expand Down
20 changes: 1 addition & 19 deletions lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
'use strict';

const util = require('util');
const {
deprecate, convertToValidSignal, getSystemErrorName
} = require('internal/util');
const { convertToValidSignal, getSystemErrorName } = require('internal/util');
const { isArrayBufferView } = require('internal/util/types');
const debug = util.debuglog('child_process');
const { Buffer } = require('buffer');
Expand Down Expand Up @@ -384,20 +382,6 @@ Object.defineProperty(exports.execFile, util.promisify.custom, {
value: customPromiseExecFunction(exports.execFile)
});

const _deprecatedCustomFds = deprecate(
function deprecateCustomFds(options) {
options.stdio = options.customFds.map(function mapCustomFds(fd) {
return fd === -1 ? 'pipe' : fd;
});
}, 'child_process: options.customFds option is deprecated. ' +
'Use options.stdio instead.', 'DEP0006');

function _convertCustomFds(options) {
if (options.customFds && !options.stdio) {
_deprecatedCustomFds(options);
}
}

function normalizeSpawnArguments(file, args, options) {
validateString(file, 'file');

Expand Down Expand Up @@ -526,8 +510,6 @@ function normalizeSpawnArguments(file, args, options) {
}
}

_convertCustomFds(options);

return {
file: file,
args: args,
Expand Down
47 changes: 0 additions & 47 deletions test/parallel/test-child-process-custom-fds.js

This file was deleted.

0 comments on commit d4934ae

Please sign in to comment.