Request for --json flag to output the result in JSON
Closed this issue · 3 comments
I'm hoping to use testen to programatically set the "engines.node" flag in my package.json file.
As such, I don't particularly wish to have to manually parse:
✖ 0.8 failed 3693ms
✖ 0.10 failed 1490ms
✖ 0.12 failed 4206ms
✖ 4 failed 4164ms
✔ 6 success 4263ms
✔ 8 success 3739ms
✔ 10 success 3656ms
It would be a lot nicer if running testen with say a --json
flag returned the following:
{
"success": [4, 6, 8],
"failed": [0.8, 0.10, 0.12]
}
That way I can do this:
cat package.json | json -e "this.engines.node = '>=$(testen --json | jq .success[0]')'" > package.json
Working on this now
Ok done, will push up nowish
Alright. I've accomplished it over at bevry/testen. And is live on the @bevry/testen
npm package with version 3.0.0.
The fork is a significant rewrite, hence why it is a fork instead of a PR.
@egoist if you would like to co-maintain the new package with me, that would be great. The only caveat though is that it would have to remain on the bevry
github org, due to the automated release cycle that is now adopted. (the documentation publish and npm release occur via continuous integration). I'd add you as a team member on the @bevry org, and you'd have write access to the repo. Any git tag will trigger a new release, and git tags can be verified and created via npm run our:release:prepare
then npm our:release
as detailed in the CONTRIBUTING.md
document. Happy to discuss this with you!