-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(core): add support for tags with (print-)affected(:*)
and run-many
#10085
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
adbc649
to
9fe94d0
Compare
Hello @vsavkin ! Thank you for your help and valuable time 🙏🏼 ! |
Any update on this? I would love to use it 😁 Also, I thought it might be worth adding this to |
Hello ! The
nx/packages/nx/src/command-line/affected.ts Lines 79 to 113 in 7f5137d
I can imagine there is latent question with regard to the use/semantic of |
affected
and run-many
(print-)affected
and run-many
(print-)affected
and run-many
(print-)affected(:*)
and run-many
9dafbd4
to
09a5683
Compare
Would love to see this merged into Nx and my PR closed. |
09a5683
to
3fe40bc
Compare
3fe40bc
to
e20c1f4
Compare
e20c1f4
to
96cafe7
Compare
96cafe7
to
90bbec4
Compare
90bbec4
to
e71664a
Compare
This would be a big QoL feature for us, would love to see this in the next release! Any indications when that might be? |
e71664a
to
bdeba8e
Compare
bdeba8e
to
e78c056
Compare
24a5493
to
567ab39
Compare
567ab39
to
526bb4b
Compare
if (minimatch.match(tags, pattern.value).length) | ||
(pattern.exclude ? excludedProjects : selectedProjects).add( | ||
projectName | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
future: I think we should consider caching the tags which match a pattern.
Because projects usually share the same tag, there's no point in matching the pattern with the same tag over and over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll look at this in the future
526bb4b
to
5017b9b
Compare
packages/nx/src/project-graph/build-nodes/workspace-projects.ts
Outdated
Show resolved
Hide resolved
5017b9b
to
b9fa86a
Compare
b9fa86a
to
ca6d497
Compare
ca6d497
to
d2ffdb6
Compare
Thank you @AgentEnder ! Extending to the whole Nx team of course ! Thrilled to see this merged 🎉 |
Congrats @fguitton, you've put a lot of work on this and it shows! Thank you for all your effort, I'm sure it'll bring immense value to a lot of people 🙏🏻🙏🏻🙏🏻 |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
When running the
(print-)affected(:*)
command you get all affected projects for a target.With the
run-many
command filtering is only possible with--projects
.Both accept a
--all
, it being warned for inaffected
.Expected Behavior
We would expect to be able to select projects by
tags
.This PR
This could be seen as a first step only acting to select projects in the same way
--projects
does it forrun-many
. Tags are not applied in compound but rather asOR
statement in comma separated fashion.That is in the example below the command would select projects that either contain the tag
sdk
or the tagapp
, not necessarily projects containing both tags.Related Issue(s)
This relates to very long standing #1621, #2675 or #8292 and a Nx v14 compatible treatment while being different from #8364 which attempts to support globs but does not address
run-many
.Closes #1621
Closes #2675