Skip to content
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 -p flag to dependency-check to only check prod deps #672

Merged
merged 11 commits into from
Nov 16, 2020

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Nov 13, 2020

Adds a convenience flag to only check for missing production deps.

Also fixes the spinner when dep-checks fail so the formatting of the error message isn't all kinds of messed up.

Also, also adds --ignore options to the dep check so we can pass options to aegir and to the underlying dependency-check binary.

Would have caught ipfs/js-ipfs#3393

Adds a convenience flag to only check for missing production deps.

Also allows the user to pass files to check instead of always using
the defaults.

Also, also fixes the spinner when dep-checks fail so the formatting of the
error message isn't all kinds of messed up.

Would have caught ipfs/js-ipfs#3393
@achingbrain achingbrain force-pushed the feat/allow-passing-input-to-dep-check branch from de08f3a to 8cf33dc Compare November 13, 2020 10:56
let input = argv.input

if (argv.productionOnly) {
if (!hasPassedFileArgs(processArgs)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yargs can't handle this ?

Copy link
Member Author

@achingbrain achingbrain Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, from what I can see, there's no way to tell if a value came from a passed argument or if it came from the defaults.

You could compare the input to the defaults, but if they entered the defaults you'd end up throwing them away. 😞

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the defaults are only used below so input should be empty right ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input won't be empty - it's either the default value passed by yargs, or the input passed by the user

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhhh ok got it

let input = argv.input

if (argv.productionOnly) {
if (!hasPassedFileArgs(processArgs)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the defaults are only used below so input should be empty right ?

@achingbrain achingbrain marked this pull request as draft November 13, 2020 12:03
@achingbrain achingbrain marked this pull request as ready for review November 13, 2020 12:11
@achingbrain
Copy link
Member Author

This is running against js-ipfs here: ipfs/js-ipfs#3395

@achingbrain
Copy link
Member Author

This is broken on windows at the moment because of the issue noticed here.

It's not due to this PR though, we just weren't testing this codepath on Windows before..

@achingbrain
Copy link
Member Author

I've forked dependency-check to fix the windows breakage, PR here: dependency-check-team/dependency-check#127

@achingbrain
Copy link
Member Author

I've created a temporary fork of dependency-check so we can move forward while dependency-check-team/dependency-check#127 is resolved.

@achingbrain achingbrain changed the title feat: add -p flag to dependency-check to only check production deps feat: add -p flag to dependency-check to only check prod deps Nov 16, 2020
@achingbrain achingbrain merged commit 44d12ab into master Nov 16, 2020
@achingbrain achingbrain deleted the feat/allow-passing-input-to-dep-check branch November 16, 2020 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants