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 --diff filter #323

Merged
merged 4 commits into from
Jun 17, 2022
Merged

feat: Add --diff filter #323

merged 4 commits into from
Jun 17, 2022

Conversation

olexale
Copy link
Contributor

@olexale olexale commented Jun 15, 2022

Description

We found it extremely helpful to have the possibility to run melos on packages that are different between branches. As the since option does not really work with the difference I propose to introduce a diff option that will call git diff instead of git log.

The usage might be:

melos list --diff=some_branch

or

melos list --diff=origin/main...HEAD

Type of Change

  • feat -- New feature (non-breaking change which adds functionality)
  • 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 refactor -- Code refactor
  • ci -- Build configuration change
  • 📝 docs -- Documentation
  • 🗑️ chore -- Chore

@CLAassistant
Copy link

CLAassistant commented Jun 15, 2022

CLA assistant check
All committers have signed the CLA.

@blaugold
Copy link
Collaborator

Thank you for your contribution! 🎉

Could you add documentation for the new option in the docs, with examples for a simple ref and ranges?

@Salakar
--diff=<ref>...HEAD is equivalent to --since=<ref>, so we could deprecate --since in favor of --diff.

@olexale
Copy link
Contributor Author

olexale commented Jun 16, 2022

@blaugold, done, please review.

@blaugold
Copy link
Collaborator

I've made diff and since mutually exclusive. Otherwise, LGTM.

@blaugold blaugold requested a review from Salakar June 17, 2022 14:12
@blaugold blaugold merged commit 2f6545f into invertase:main Jun 17, 2022
mspb1g12 pushed a commit to mspb1g12/melos that referenced this pull request Jun 18, 2022
Co-authored-by: Gabriel Terwesten <gabriel@terwesten.net>
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.

None yet

4 participants