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

add dependency filter regex #18

Closed
wants to merge 1 commit into from

Conversation

uforic
Copy link

@uforic uforic commented Apr 13, 2019

Howdy @JamieMason , thanks for providing syncpack to the JavaScript community!

I'd like your feedback on this pull request. I work at a company that would like to use this tool, but we need it to support one more feature: the ability to only sync certain packages.

The use case is: Our root packages.json has a number of dependencies that we don't want to sync with child folders that contain package.json files; we selectively would like to enable the packages that we sync.

The current workaround we use is to pipe the output of the syncpackage "list" command into a script that has these dependencies of interest hardcoded, and checks to make sure the version list length for those dependencies is not > 1. We figured this PR would be a better solution and one that would be useful to others, too.

The reason I chose a regex instead of list of exact string matches is that we have instances where we'd like to sync all internal packages, say @companyname/.*, and the regex seems less fragile than hardcoding one packages at a time.

Let me know if there's anything I can do to make it easier to review on your end. Thanks!

@JamieMason
Copy link
Owner

Thanks a lot @uforic! I am away in Holland at the moment and again next week but I will take a look at this as soon as I can. Always great to receive PRs, so thank you very much.

@uforic
Copy link
Author

uforic commented Apr 24, 2019

Howdy @JamieMason , just wanted to put this back on your radar! Totally understood if you haven't had a chance to take a look at it, we're just trying to avoid forking if we can🍴

@JamieMason
Copy link
Owner

Thanks very much @uforic for contributing, very much appreciated and this has been merged 👍

@uforic
Copy link
Author

uforic commented Apr 30, 2019

Thanks @JamieMason !

@uforic uforic deleted the uforic/filterDeps branch April 30, 2019 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants