nested-transform.js
This file
Path
test/fixtures/nested-transform.js
13 lines · 463 bytes · JavaScript
Last changed by
Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac
History of this fileTake it
Print output with `verbose` option (#884)ehmickybefore adoption6fda30f
lines 1–2why, one step back1#!/usr/bin/env node2import process from 'node:process';Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac
line 3why, one step back3import {execa, execaSync} from '../../index.js';Add support for `std*: duplex` option (#937)ehmickybefore adoption6ca44fb
line 4why, one step back4import {generatorsMap} from '../helpers/map.js';Print output with `verbose` option (#884)ehmickybefore adoption6fda30f
line 5why, one step back5Add support for `std*: duplex` option (#937)ehmickybefore adoption6ca44fb
line 6why, one step back6const [optionsString, file, ...args] = process.argv.slice(2);Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac
lines 7–13why, one step back7const {type, isSync, ...options} = JSON.parse(optionsString);8const newOptions = {stdout: generatorsMap[type].uppercase(), ...options};9if (isSync === 'true') {10 execaSync(file, args, newOptions);11} else {12 await execa(file, args, newOptions);13}