Require Node.js 18
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Sindre Sorhus · committed by Sindre Sorhus · parent 0d038e0 · Browse files · 5 files·+15 added−38 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+15 added−38 removed
- other:+15 added−38 removed
Provenance
- Commit
834e372- Tree
d4ef391- Author
Sindre Sorhus <sindresorhus@gmail.com>- Committer
Sindre Sorhus <sindresorhus@gmail.com>- Parent
0d038e0
5 files changed+15 added−38 removed
modified:.github/workflows/main.yml+3 added-4 removed
10 unmodified lines111213141515161718192122202122232425272627282910 unmodified lines matrix: node-version: - 20 - 18 - 16 os: - ubuntu-latest - macos-latest - windows-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install - run: npm test - uses: codecov/codecov-action@v2 - uses: codecov/codecov-action@v3 if: matrix.os == 'ubuntu-latest' && matrix.node-version == 20 with: fail_ci_if_error: truemodified:lib/stream.js+2 added-12 removed
123455678949 unmodified lines596061626364656667686970717273636465666756 unmodified linesimport {createReadStream, readFileSync} from 'node:fs';import {setTimeout} from 'node:timers/promises';import {isStream} from 'is-stream';import getStream, {getStreamAsBuffer} from 'get-stream';import mergeStream from 'merge-stream';import mergeStreams from '@sindresorhus/merge-streams';
const validateInputOptions = input => { if (input !== undefined) { throw new TypeError('The `input` and `inputFile` options cannot be both set.');49 unmodified lines if (!all || (!spawned.stdout && !spawned.stderr)) { return; }
const mixed = mergeStream();
if (spawned.stdout) { mixed.add(spawned.stdout); }
if (spawned.stderr) { mixed.add(spawned.stderr); }
return mixed; return mergeStreams([spawned.stdout, spawned.stderr].filter(Boolean));};
// On failure, `result.stdout|stderr|all` should contain the currently buffered streamconst getBufferedData = async (stream, streamPromise) => {56 unmodified linesmodified:index.d.ts+2 added-2 removed
277 unmodified lines278 Write some input to the `stdin` of your binary.279 280 If the input is a file, use the `inputFile` option instead.281 */282- readonly input?: string | Buffer | ReadableStream;282+ readonly input?: string | Uint8Array | ReadableStream;283 284 /**285 Use a file as input to the the `stdin` of your binary.286 7 unmodified lines294 Write some input to the `stdin` of your binary.295 296 If the input is a file, use the `inputFile` option instead.297 */298- readonly input?: string | Buffer;298+ readonly input?: string | Uint8Array;299 300 /**301 Use a file as input to the the `stdin` of your binary.302 653 unmodified linesmodified:package.json+7 added-7 removed
14 unmodified lines15 "types": "./index.d.ts",16 "default": "./index.js"17 },18 "engines": {19- "node": ">=16.17"19+ "node": ">=18"20 },21 "scripts": {22 "test": "xo && c8 ava && tsd"23 },20 unmodified lines44 "local",45 "zx"46 ],47 "dependencies": {48+ "@sindresorhus/merge-streams": "^1.0.0",49 "cross-spawn": "^7.0.3",50 "get-stream": "^8.0.1",51 "human-signals": "^5.0.0",52 "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": "^4.1.0",56 "strip-final-newline": "^3.0.0"57 },58 "devDependencies": {59- "@types/node": "^20.4.0",60- "ava": "^5.2.0",59+ "@types/node": "^20.8.9",60+ "ava": "^5.3.1",61 "c8": "^8.0.1",62- "get-node": "^14.2.0",62+ "get-node": "^14.2.1",63 "is-running": "^2.1.0",64 "p-event": "^6.0.0",65 "path-key": "^4.0.0",66 "tempfile": "^5.0.0",67- "tsd": "^0.28.1",68- "xo": "^0.55.0"67+ "tsd": "^0.29.0",68+ "xo": "^0.56.0"69 },70 "c8": {71 "reporter": [72 "text",18 unmodified linesmodified:readme.md+1 added-13 removed
539 unmodified lines540 If the spawned process fails, [`error.stdout`](#stdout), [`error.stderr`](#stderr), and [`error.all`](#all) will contain the buffered data.541 542 #### input543 544-Type: `string | Buffer | stream.Readable`544+Type: `string | Uint8Array | stream.Readable`545 546 Write some input to the `stdin` of your binary.\547 Streams are not allowed when using the synchronous methods.548 258 unmodified lines807 ## Maintainers808 809 - [Sindre Sorhus](https://github.com/sindresorhus)810 - [@ehmicky](https://github.com/ehmicky)811-812----813-814-<div align="center">815- <b>816- <a href="https://tidelift.com/subscription/pkg/npm-execa?utm_source=npm-execa&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>817- </b>818- <br>819- <sub>820- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.821- </sub>822-</div>