Skip to content
Myr

Remove deprecated `.spawn()` method

Before adoption: this commit came in with the history the project adopted, so no landing records it.

It was deprecated a long time ago. Time to remove it.

authored by Sindre Sorhus · committed by Sindre Sorhus · parent ff2f4b8 · Browse files · 2 files+0 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+0 added−8 removed

  • other:+0 added−8 removed

2 files+0 added−8 removed

modified:index.js-3 removed
1'use strict';2const path = require('path');3const childProcess = require('child_process');4const util = require('util');4const crossSpawn = require('cross-spawn');5const stripEof = require('strip-eof');6const npmRunPath = require('npm-run-path');7const isStream = require('is-stream');
350 unmodified lines
358 };359};360361module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts);363364module.exports.spawn = util.deprecate(module.exports, 'execa.spawn() is deprecated. Use execa() instead.');
modified:test.js-5 removed
96 unmodified lines
97 const {stdout} = await m.shell('node fixtures/noop foo');98 t.is(stdout, 'foo');99});100101test('execa.spawn()', async t => {102 t.is(typeof m.spawn('noop').pid, 'number');103 t.is((await getStream(m.spawn('noop', ['foo']).stdout)).trim(), 'foo');104});105101test('execa.sync()', t => {102 const {stdout} = m.sync('noop', ['foo']);103 t.is(stdout, 'foo');104});
439 unmodified lines