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

fix(core): adjust how findMatchingProjects works when provided additive patterns after an exclusion to be more intuitive #19295

Conversation

AgentEnder
Copy link
Member

Current Behavior

A list of patterns such as ['*', '!packages/*', 'my-package'] will not include 'my-package' as a result. This behavior feels weird though, as intuitively the patterns are parsed as:

  • Select everything
  • Remove anything under packages directory
  • Add my-package

However, mechanically, we currently handle exclusions at the very end of processing patterns. This means we parse it as:

  • Select everything
  • Add my-package
  • Remove everything under packages directory

Expected Behavior

Pattern parsing is intuitive.

Related Issue(s)

Fixes #19210

@AgentEnder AgentEnder requested a review from a team as a code owner September 22, 2023 14:44
@vercel
Copy link

vercel bot commented Sep 22, 2023

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

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Oct 3, 2023 4:37pm

@AgentEnder AgentEnder force-pushed the fix/find-matching-project-negation-addition branch from 78b5fbe to b760669 Compare September 22, 2023 16:04
@AgentEnder AgentEnder force-pushed the fix/find-matching-project-negation-addition branch from b760669 to a27eeca Compare September 22, 2023 16:11
@AgentEnder AgentEnder force-pushed the fix/find-matching-project-negation-addition branch 2 times, most recently from a90e93d to 52ba219 Compare September 27, 2023 14:23
…ve patterns after an exclusion to be more intuitive
@AgentEnder AgentEnder force-pushed the fix/find-matching-project-negation-addition branch from 52ba219 to 7a2885d Compare October 3, 2023 16:37
@FrozenPandaz FrozenPandaz merged commit 51d9b86 into nrwl:master Oct 3, 2023
4 of 6 checks passed
FrozenPandaz pushed a commit that referenced this pull request Oct 4, 2023
…ve patterns after an exclusion to be more intuitive (#19295)

(cherry picked from commit 51d9b86)
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclude flag for affected and run-many commands doesn't work as expected
2 participants