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: print info if some of the filters don't match any projects #2337

Merged
merged 3 commits into from Feb 12, 2020

Conversation

yaodingyd
Copy link
Member

@yaodingyd yaodingyd commented Feb 6, 2020

Close #2320

@yaodingyd
Copy link
Member Author

What's the correct way to do info/warning?

@zkochan
Copy link
Member

zkochan commented Feb 10, 2020

The easiest way to add logging would be to install @pnpm/logger as a peer dep and user logger.info(). But I think that would make this package a bit less generic.

I think the next solution would be nicer. Instead of logging directly in the @pnpm/filter-workspace-packages package, just add all the unmatched selectors into a list and return both the selections and the array of unmatched filters. I mean here:

return R.pick(Array.from(walked), pkgGraph)

This way, you'll be able to log the unmatched filters in the main pnpm package, where this filtering is used.

@zkochan
Copy link
Member

zkochan commented Feb 12, 2020

Looks good but some tests are failing

@zkochan zkochan merged commit 16356d8 into master Feb 12, 2020
@zkochan zkochan deleted the filter-info branch February 12, 2020 16:26
@zkochan zkochan modified the milestones: v4.9, v4.10 Feb 13, 2020
zkochan added a commit that referenced this pull request Feb 19, 2020
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.

Print an info message if some of the filters don't match any projects
2 participants