Skip to content

Commit

Permalink
Remove deprecated .spawn() method
Browse files Browse the repository at this point in the history
It was deprecated a long time ago. Time to remove it.
  • Loading branch information
sindresorhus committed Aug 20, 2018
1 parent ff2f4b8 commit 8bea281
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
const path = require('path');
const childProcess = require('child_process');
const util = require('util');
const crossSpawn = require('cross-spawn');
const stripEof = require('strip-eof');
const npmRunPath = require('npm-run-path');
Expand Down Expand Up @@ -360,5 +359,3 @@ module.exports.sync = (cmd, args, opts) => {
};

module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts);

module.exports.spawn = util.deprecate(module.exports, 'execa.spawn() is deprecated. Use execa() instead.');
5 changes: 0 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ test('execa.shell()', async t => {
t.is(stdout, 'foo');
});

test('execa.spawn()', async t => {
t.is(typeof m.spawn('noop').pid, 'number');
t.is((await getStream(m.spawn('noop', ['foo']).stdout)).trim(), 'foo');
});

test('execa.sync()', t => {
const {stdout} = m.sync('noop', ['foo']);
t.is(stdout, 'foo');
Expand Down

0 comments on commit 8bea281

Please sign in to comment.