Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: move DEP0006 to end of life #25279

Merged
merged 1 commit into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.