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

Allow paths or specific files #538

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Conversation

timothymcmackin
Copy link
Collaborator

For dependency checks we should be able to pass individual paths or files. This PR allows you to pass any combination, as in these examples:

npm run check-dependencies -- --major -d=smartpy,taquito docs/developing/octez-client/accounts.md docs/tutorials

npm run check-dependencies -- --major -d=smartpy,taquito docs/*

The shell expands the * in the anonymous arguments before it gets to the script but I think I've got it working despite that.

Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs-staging ✅ Ready (Inspect) Visit Preview Jan 31, 2025 3:24pm

@NicNomadic
Copy link
Collaborator

Is this extension necessary? The whole point for passing arguments expanded by the shell (that you already implemented) is to count on the support of orthogonal tools to do it for you, according to the general philosophy of Unix. For instance, if we want to scan all the MD files in "docs/" we can:

find docs -name "*.md" | xargs npm run check-dependencies -- --major

@timothymcmackin
Copy link
Collaborator Author

This makes the script easier to use and doesn't prevent you from piping data from another program like that.

Copy link
Collaborator

@NicNomadic NicNomadic left a comment

Choose a reason for hiding this comment

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

This makes the script easier to use and doesn't prevent you from piping data from another program like that.

OK then.

@timothymcmackin timothymcmackin merged commit 820afe6 into main Feb 6, 2025
4 checks passed
@timothymcmackin timothymcmackin deleted the dependencies-allow-paths branch February 6, 2025 14:58
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.

2 participants