keithamus / sort-package-json

Sort an Object or package.json based on the well-known package.json keys
MIT License
790 stars 83 forks source link

feat(cli): add --quiet / -q option #281

Closed aarondill closed 1 year ago

aarondill commented 1 year ago

This PR creates a --quiet (-q) option that simply stops the CLI from outputting success messages. Node errors and file-not-found errors are still outputted.

Tests have not been written, because the current testing infrastructure doesn't seem to have a way to automatically test the stdout of a CLI call. closes #280

keithamus commented 1 year ago

I would prefer an if check, or alternatively making a log function which encapsulates both the if check and the console.log statement. Overriding globals can cause confusion or maintenance issues.

aarondill commented 1 year ago

I have made this change in my updated PR at #283

aarondill commented 1 year ago

This has been reopened as per @fisker's request. It has been updated to match the master branch + my modifications and should now be ready for review.

fisker commented 1 year ago

Can you add test for those flags?

aarondill commented 1 year ago

I'm currently working on this on a separate branch. Once I finish, I can copy the relevant tests to this branch.

aarondill commented 1 year ago

Tests have been added

aarondill commented 1 year ago

@fisker any update on this PR? I saw that you approved it, are we waiting for @keithamus to approve it or is there another holdup that I don't know about?

fisker commented 1 year ago

Let's wait for @keithamus to take a look.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 2.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: