Skip to content
Myr

Require Node.js 16 (#569)

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

authored by ehmicky · committed by GitHub · parent db58085 · Browse files · 8 files+22 added−24 removed
This commit

State

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

Trailers

  • Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>

Diff stats

8 files+22 added−24 removed

  • tests:+4 added−4 removed
  • other:+18 added−20 removed

8 files+22 added−24 removed

modified:.github/workflows/main.yml+2 added-2 removed
modified:lib/command.js+3 added-4 removed
modified:test/pipe.js+1 added-1 removed
30 unmodified lines
31test('pipeAll() can pipe stdout to streams', pipeToStream, 'noop.js', 'pipeAll', 'stdout');32test('pipeAll() can pipe stderr to streams', pipeToStream, 'noop-err.js', 'pipeAll', 'stderr');3334const pipeToFile = async (t, fixtureName, funcName, streamName) => {35 const file = tempfile('.txt');35 const file = tempfile({extension: '.txt'});36 const result = await execa(fixtureName, ['test'], {all: true})[funcName](file);37 t.is(result[streamName], 'test');38 t.is(await readFile(file, 'utf8'), 'test\n');39};
39 unmodified lines
modified:test/stream.js+2 added-2 removed
16 unmodified lines
17 t.is(stdout.toString(), 'foo');18});1920test('pass `stdout` to a file descriptor', async t => {21 const file = tempfile('.txt');21 const file = tempfile({extension: '.txt'});22 await execa('noop.js', ['foo bar'], {stdout: fs.openSync(file, 'w')});23 t.is(fs.readFileSync(file, 'utf8'), 'foo bar\n');24});2526test('pass `stderr` to a file descriptor', async t => {27 const file = tempfile('.txt');27 const file = tempfile({extension: '.txt'});28 await execa('noop-err.js', ['foo bar'], {stderr: fs.openSync(file, 'w')});29 t.is(fs.readFileSync(file, 'utf8'), 'foo bar\n');30});31
225 unmodified lines
modified:test/verbose.js+1 added-1 removed
modified:index.d.ts-2 removed
206 unmodified lines
207 You can abort the spawned process using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).208209 When `AbortController.abort()` is called, [`.isCanceled`](https://github.com/sindresorhus/execa#iscanceled) becomes `false`.210211 *Requires Node.js 16 or later.*212211 @example212 ```213 import {execa} from 'execa';214
721 unmodified lines
modified:package.json+13 added-10 removed
9 unmodified lines
10 "email": "sindresorhus@gmail.com",11 "url": "https://sindresorhus.com"12 },13 "type": "module",14 "exports": "./index.js",14 "exports": {15 "types": "./index.d.ts",16 "default": "./index.js"17 },18 "engines": {16 "node": "^14.18.0 || ^16.14.0 || >=18.0.0"19 "node": ">=16.17"20 },21 "scripts": {22 "test": "xo && c8 ava && tsd"23 },
22 unmodified lines
46 ],47 "dependencies": {48 "cross-spawn": "^7.0.3",49 "get-stream": "^6.0.1",47 "human-signals": "^4.3.0",50 "human-signals": "^5.0.0",51 "is-stream": "^3.0.0",52 "merge-stream": "^2.0.0",53 "npm-run-path": "^5.1.0",54 "onetime": "^6.0.0",55 "signal-exit": "^3.0.7",56 "strip-final-newline": "^3.0.0"57 },58 "devDependencies": {56 "@types/node": "^18.13.0",59 "@types/node": "^20.4.0",60 "ava": "^5.2.0",58 "c8": "^7.12.0",59 "get-node": "^13.5.0",61 "c8": "^8.0.1",62 "get-node": "^14.2.0",63 "is-running": "^2.1.0",61 "p-event": "^5.0.1",64 "p-event": "^6.0.0",65 "path-key": "^4.0.0",63 "tempfile": "^4.0.0",64 "tsd": "^0.25.0",65 "xo": "^0.54.2"66 "tempfile": "^5.0.0",67 "tsd": "^0.28.1",68 "xo": "^0.55.0"69 },70 "c8": {71 "reporter": [72 "text",
18 unmodified lines
modified:readme.md-2 removed
711 unmodified lines
712You can abort the spawned process using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).713714When `AbortController.abort()` is called, [`.isCanceled`](#iscanceled) becomes `false`.715716*Requires Node.js 16 or later.*717716#### windowsVerbatimArguments717718Type: `boolean`\719Default: `false`
103 unmodified lines