-
-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add debug logs #344
feat: Add debug logs #344
Conversation
Codecov Report
@@ Coverage Diff @@
## master #344 +/- ##
=========================================
+ Coverage 97.79% 98.1% +0.31%
=========================================
Files 10 10
Lines 181 211 +30
Branches 23 23
=========================================
+ Hits 177 207 +30
Misses 4 4
Continue to review full report at Codecov.
|
ba93313
to
a792a9d
Compare
@sudo-suhas this looks amazing. I'm wondering if we should close #319 in favor of this? |
We could. I also felt that |
a792a9d
to
684e34f
Compare
Overriding the |
Okay. Here's what I am going to do:
Let me know if you have any concerns or any suggestions. |
- Parse command line option `--debug` and enable debug logs if it was passed. - Propagate debug mode - `src/index.js -> runAll -> runScript -> findBin`. - Set npm `--silent` flag using debug mode. - Remove `verbose` from default config, add entry to deprecated options. - Set `listr` renderer using debug mode. - Tweak logs in `src/index.js` depending on debug mode. - Update tests. - Update readme, add section on command line flags. BREAKING CHANGE: `verbose` config option has been deprecated and is superseded by the command line option `--debug`.
what do you guys think about meow? I use it in some of my CLI projects and I love it IMO it'll make our jobs easier here |
I am not clear on how it is better. In any case, even if we do wish to switch to it, it probably shouldn't be a part of this PR. |
@sudo-suhas your plan sounds good to me! Please go ahead since I'll need this work in #75 |
Please note that I have marked it as a breaking change in the commit message. We should take care while squashing and merging. |
Looks good! |
Please merge it. I’m on my 📱 |
Merged and release 🎉. |
This integrates
debug
which can be enabled by setting the environment variable$DEBUG
tolint-staged*
. It can also be specified inline by doing the following:Example output:
Edit: Closes #319.