Closed brettz9 closed 4 years ago
This is definitely a much longer route to take, but would it not make more sense to make a feature request over at npm? Either to not complain about missing peer deps, or to be able to filter them out. npm ls
takes plenty of options already.
Alternatively, use https://github.com/npm/npm-remote-ls to do the ls
and throw in your own logic, instead of spawning npm
.
When the npm community forums were active, I submitted a number of suggestions and don't think I received much of any replies, from what I recall.
The programmatic approach sounds like a good one to me. If that doesn't provide the specific error, I realized I probably should have checked stderr here for the specific problem, maybe even recovering without the need to add an option?
@brettz9 things are different now; file an RFC and it will receive attention.
The need for this PR was avoided by commit 20a96638d50140a9d60412c959da32738b593e6a by @amonks , so closing. Nice!
Hi,
Have been enjoying using licensee.js within my license-badger program.
I ran into an issue just now though in that I get an exit code from the process which runs
npm ls
. I happen to know that the error can be safely ignored (a stated peer dependency is missing, but I know its absence to be safe), so I'd like to proceed (and if I skip the aborting, it goes on to check the licenses well as needed).So this PR offers to disable such error exit codes from causing an abort. (I didn't re-indent the commands, as I figured there could be some desire to change the option name, assuming there was openness to adding the option.)