• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sindresorhus / execa / 91 / 3
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 28 Apr 2016 10:08PM UTC
Files 2
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Apr 2016 10:04PM UTC coverage: 93.519% (+1.5%) from 92.045%
91.3

push

travis-ci

jamestalmage
Use spawn instead of execFile (#27)

* [WIP]: just use spawn instead of execFile

childProcess.execFile pays no attention `opts.stdio`.

`execa.spawn` allows you to set `opts.stdio` options, but it doesn't return a promise.

I think we should forgoe using `childProcess.execFile` and just use spawn. We can reimplement much of `execFile`s utility ourself.

Rather than having two separate methods `spawn` and `execFile` - I think we should work towards a single method. What options the user sets for `opts.stdio` or `opts.stdin`, etc; Those should determine whether or not the stream is buffered and made part of the promise result, or if they are just streamed (or sent to an Observable), or ignored. This simplifies the API, and offers potentially far more control. Want to use streams/observables for `stdout` because you know it will contain lots of data and you don't want to buffer, but it would nice to just have `stderr` buffered for you to print in case of an error? That would be doable this way, and really separates it from child_process.

childProcess.execFile is really just a wrapper around spawn anyways. It's main utility is that in concats `stdio` and `stdout`. Which is pretty easy for us to achieve on our own using `get-stream`

This reimplements nearly all of the functionality of execFile.

Remaining items to be feature complete with execFile:
- [ ] timeout support (should be easy to add back).
- [ ] errname resolution. See TODO note on that. I'm not sure we want to use `process.bind('uv')`. I don't really know what it does.
- [ ] some stream cleanup code (see childProces.execFile's internal `kill` method. It calls `stream.destroy()`. I am not sure how that will affect `get-stream`)

* use regex test so I can see what went wrong on Windows

* remove leading `./` - If this fixes windows, we should figure out why.

* Why? Why? Why Windows???

Why does this make the tests pass?
Could you possibly make the error output any more cryptic?

I don't understand you Windows! We are not friends anymore.

* deprecate execa.spawn

* tweaks

* more tweaks

* update deprecation message

101 of 108 relevant lines covered (93.52%)

8.35 hits per line

Source Files on job 91.3
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 91
  • Travis Job 91.3
  • 31a8d87d on github
  • Prev Job for on master (#84.3)
  • Next Job for on master (#94.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc