pahen / madge

Create graphs from your CommonJS, AMD or ES6 module dependencies
MIT License
8.95k stars 318 forks source link

Disable spinner when running in CI #356

Closed todor-a closed 1 year ago

todor-a commented 1 year ago

Added support for disabling the spinner via an env var to make the output more CI-friendly.

For that, I updated commander to version 8.2.0, which added support for option values via env vars.

kamiazya commented 1 year ago

@tdranv Thanks for the PR!

If we are talking about CI considerations, how about using the ci-info package?

It seems preferable for users to be able to use it without knowing that the option exists.

todor-a commented 1 year ago

Hey, thanks for the prompt response.

Do I understand correctly - you are suggesting disabling the spinner in general, if the command is running in a CI?

kamiazya commented 1 year ago

Yes, I could not think of a case where a spinner would be effective in CI, so I thought it would be acceptable to disable the spinner in CI.

Any cases to consider?

todor-a commented 1 year ago

Sounds reasonable.

We should definitely add it to the documentation tho.

todor-a commented 1 year ago

I've made the requested changes. Let me know what you think when you get a chance, @kamiazya.

Not sure where to add the disclaimer in the readme tho. 🤔

todor-a commented 1 year ago

Hey, @kamiazya. Do you plan to release a new version soon? Thank you! :)